From e6c2bd76a110cd52bc340a686a104437ba9599a0 Mon Sep 17 00:00:00 2001 From: Sean OMeara Date: Thu, 12 Jan 2023 16:38:55 +0100 Subject: [PATCH 1/3] tweaking github build --- .github/workflows/build.yml | 60 +++++++++---------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3c63087c..c119698c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,8 +20,14 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - - name: make - run: make + - name: cargo fmt + run: cargo fmt --all -- --check + + - name: cargo build + run: cargo build + + - name: cargo test + run: cargo test build_macos: runs-on: macos-latest @@ -42,52 +48,14 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - - name: make - run: make - - test_ubuntu: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + - name: cargo fmt + run: cargo fmt --all -- --check + + - name: cargo build + run: cargo build - name: cargo test - run: cargo test -v - - test_macos: - runs-on: macos-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - - name: cargo test - run: cargo test -v + run: cargo test # build_windows: # runs-on: windows-latest From b622475357a3a170116624d28f8a93edff7dd8c9 Mon Sep 17 00:00:00 2001 From: Sean OMeara Date: Wed, 11 Jan 2023 15:04:49 +0100 Subject: [PATCH 2/3] README cleanup --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index 0f2e07e52..c45828731 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,3 @@ DO NOT expect this code to work or be useful for anything yet. Also note that it Eventually the plan is that this repository will be merged back into the main repo as a branch and then this branch will become the new release, replacing the current v1 code base. Until then, feel free to look around. Once again: do not expect this to be done and do not try to post bug reports about it. It's very much under construction. - -=) -=) -=) -=) -=) -=) -=) From 52234c44fb43284c9b1e3c022292eaba298c551c Mon Sep 17 00:00:00 2001 From: Sean OMeara Date: Wed, 18 Jan 2023 16:27:25 +0100 Subject: [PATCH 3/3] silence compiler warnings about _unused_variables (#1852) --- controller/src/postgresdatabase.rs | 10 +++++----- network-hypervisor/src/vl1/peer.rs | 32 +++++++++++++++--------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/controller/src/postgresdatabase.rs b/controller/src/postgresdatabase.rs index cc7198ed9..8b48ab8c5 100644 --- a/controller/src/postgresdatabase.rs +++ b/controller/src/postgresdatabase.rs @@ -193,7 +193,7 @@ impl VL1DataStorage for PostgresDatabase { Some(self.local_identity.clone()) } - fn save_node_identity(&self, id: &Valid) -> bool { + fn save_node_identity(&self, _id: &Valid) -> bool { panic!("local identity saving not supported by PostgresDatabase") } } @@ -389,7 +389,7 @@ impl Database for PostgresDatabase { })) } - async fn save_network(&self, obj: Network, generate_change_notification: bool) -> Result<(), Error> { + async fn save_network(&self, _obj: Network, _generate_change_notification: bool) -> Result<(), Error> { todo!() } @@ -405,11 +405,11 @@ impl Database for PostgresDatabase { Ok(r) } - async fn get_member(&self, network_id: NetworkId, node_id: Address) -> Result, Error> { + async fn get_member(&self, _network_id: NetworkId, _node_id: Address) -> Result, Error> { todo!() } - async fn save_member(&self, obj: Member, generate_change_notification: bool) -> Result<(), Error> { + async fn save_member(&self, _obj: Member, _generate_change_notification: bool) -> Result<(), Error> { todo!() } @@ -443,7 +443,7 @@ impl Database for PostgresDatabase { return Ok(false); } - async fn log_request(&self, obj: RequestLogItem) -> Result<(), Error> { + async fn log_request(&self, _obj: RequestLogItem) -> Result<(), Error> { todo!() } } diff --git a/network-hypervisor/src/vl1/peer.rs b/network-hypervisor/src/vl1/peer.rs index 3178b213b..e53800df6 100644 --- a/network-hypervisor/src/vl1/peer.rs +++ b/network-hypervisor/src/vl1/peer.rs @@ -784,7 +784,7 @@ impl Peer { inner: &Inner, node: &Node, time_ticks: i64, - message_id: MessageId, + _message_id: MessageId, payload: &PacketBuffer, ) -> PacketHandlerResult { if node.this_node_is_root() || inner.should_respond_to(&self.identity) { @@ -813,12 +813,12 @@ impl Peer { fn handle_incoming_rendezvous( self: &Arc, - app: &Application, + _app: &Application, node: &Node, - time_ticks: i64, - message_id: MessageId, - source_path: &Arc, - payload: &PacketBuffer, + _time_ticks: i64, + _message_id: MessageId, + _source_path: &Arc, + _payload: &PacketBuffer, ) -> PacketHandlerResult { if node.is_peer_root(self) {} return PacketHandlerResult::Ok; @@ -853,22 +853,22 @@ impl Peer { fn handle_incoming_push_direct_paths( self: &Arc, - app: &Application, - node: &Node, - time_ticks: i64, - source_path: &Arc, - payload: &PacketBuffer, + _app: &Application, + _node: &Node, + _time_ticks: i64, + _source_path: &Arc, + _payload: &PacketBuffer, ) -> PacketHandlerResult { PacketHandlerResult::Ok } fn handle_incoming_user_message( self: &Arc, - app: &Application, - node: &Node, - time_ticks: i64, - source_path: &Arc, - payload: &PacketBuffer, + _app: &Application, + _node: &Node, + _time_ticks: i64, + _source_path: &Arc, + _payload: &PacketBuffer, ) -> PacketHandlerResult { PacketHandlerResult::Ok }