Skip to content

Commit

Permalink
add github actions for lint/test/etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbournhonesque-sc committed Nov 28, 2023
1 parent c574dbb commit 1df91de
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: cargo clippy --no-deps --tests -- -D warnings

- name: Rustdoc
run: cargo rustdoc -- -D warnings
run: cargo rustdoc -p lightyear_shared -- -D warnings

doctest:
name: Doctest
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Clone repo
uses: actions/checkout@v4

- name: Instal stable toolchain
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache crates
Expand Down
2 changes: 1 addition & 1 deletion shared/src/channel/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub struct ChannelSettings {

#[derive(Clone, Debug, PartialEq)]
/// ChannelMode specifies how packets are sent and received
/// See more information: http://www.jenkinssoftware.com/raknet/manual/reliabilitytypes.html
/// See more information [here](http://www.jenkinssoftware.com/raknet/manual/reliabilitytypes.html)
pub enum ChannelMode {
/// Packets may arrive out-of-order, or not at all
UnorderedUnreliable,
Expand Down
4 changes: 2 additions & 2 deletions shared/src/connection/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// Defines a [`ConnectionEvents`](ConnectionEvents) struct that is used to store all events that are received from a [`Connection`](Connection)
/// Defines a [`ConnectionEvents`] struct that is used to store all events that are received from a [`Connection`]
// only public for proc macro
pub mod events;

/// Provides a [`ProtocolMessage`](ProtocolMessage) enum that is a wrapper around all the possible messages that can be sent over the network
/// Provides a [`ProtocolMessage`] enum that is a wrapper around all the possible messages that can be sent over the network
pub(crate) mod message;

use crate::_reexport::PingChannel;
Expand Down
2 changes: 1 addition & 1 deletion shared/src/inputs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Handles dealing with inputs (keyboard presses, mouse clicks) sent from a player (client) to server

/// Defines an [`InputBuffer`] buffer to store the inputs of a player for each tick
/// Defines an [`InputBuffer`](input_buffer::InputBuffer) buffer to store the inputs of a player for each tick
pub mod input_buffer;

/// Defines the bevy plugin that handles inputs
Expand Down
4 changes: 2 additions & 2 deletions shared/src/packet/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub(crate) struct PacketHeader {
last_ack_packet_id: PacketId,
/// Bitfield of the last 32 packet ids before `ack_id`
/// (this means that in total we send acks for 33 packet-ids)
/// See more information at: https://gafferongames.com/post/reliability_ordering_and_congestion_avoidance_over_udp/
/// See more information at: [GafferOnGames](https://gafferongames.com/post/reliability_ordering_and_congestion_avoidance_over_udp/)
ack_bitfield: u32,
/// Current tick
pub(crate) tick: Tick,
Expand All @@ -47,7 +47,7 @@ const ACK_BITFIELD_SIZE: u8 = 32;
const MAX_SEND_PACKET_QUEUE_SIZE: u8 = 255;

/// Keeps track of sent and received packets to be able to write the packet headers correctly
/// For more information: https://gafferongames.com/post/reliability_ordering_and_congestion_avoidance_over_udp/
/// For more information: [GafferOnGames](https://gafferongames.com/post/reliability_ordering_and_congestion_avoidance_over_udp/)
#[derive(Default)]
pub struct PacketHeaderManager {
// Local packet id which we'll bump each time we send a new packet over the network.
Expand Down
2 changes: 0 additions & 2 deletions shared/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub(crate) mod registry;
///#[derive(Message, Serialize, Deserialize, Clone, PartialEq)]
///pub struct Message1(pub String);
///
///#[derive(PartialEq)]
///#[message_protocol(protocol = "MyProtocol")]
///pub enum MyMessageProtocol {
/// Message1(Message1),
Expand All @@ -53,7 +52,6 @@ pub(crate) mod registry;
///#[derive(Component, Serialize, Deserialize, Clone, PartialEq)]
///pub struct Component1;
///
///#[derive(PartialEq)]
///#[component_protocol(protocol = "MyProtocol")]
///pub enum MyComponentsProtocol {
/// Component1(Component1),
Expand Down
4 changes: 2 additions & 2 deletions shared/src/shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ pub mod plugin;
/// Module to handle replicating entities and components from server to client
pub mod replication;

/// Bevy [`bevy::prelude::SystemSet`] that are shared between the server and client
/// Bevy [`SystemSet`](bevy::prelude::SystemSet) that are shared between the server and client
pub mod sets;

// TODO: refactor this out
/// Bevy [`bevy::prelude::System`] that are shared between the server and client
/// Bevy [`System`](bevy::prelude::System) that are shared between the server and client
pub mod systems;

/// Module to handle the [`tick_manager::Tick`], a sequence number incremented at each [`bevy::prelude::FixedUpdate`] schedule run
Expand Down

0 comments on commit 1df91de

Please sign in to comment.