From dab9ebac81e664fe350c588000290b04742ece48 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 18 Aug 2024 22:30:08 +0200 Subject: [PATCH 1/2] changed from `actions-rs` to more maintained alternatives --- .github/workflows/build-ci.yml | 13 ++++--------- .github/workflows/publish-libosdp-sys.yml | 4 ++-- .github/workflows/publish-libosdp.yml | 4 ++-- .github/workflows/publish-osdpctl.yml | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 5b7587f..0dc0f0d 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -21,14 +21,11 @@ jobs: with: submodules: recursive - name: Setup rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable components: rustfmt, clippy - - name: Cargo check - uses: actions-rs/cargo@v1 - with: - command: check + - run: cargo check test: runs-on: ubuntu-latest steps: @@ -37,10 +34,8 @@ jobs: with: submodules: recursive - name: Setup rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable - name: Cargo test - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test diff --git a/.github/workflows/publish-libosdp-sys.yml b/.github/workflows/publish-libosdp-sys.yml index dd18c0f..7eb12a2 100644 --- a/.github/workflows/publish-libosdp-sys.yml +++ b/.github/workflows/publish-libosdp-sys.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable override: true @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable override: true diff --git a/.github/workflows/publish-libosdp.yml b/.github/workflows/publish-libosdp.yml index c70c92e..23b134d 100644 --- a/.github/workflows/publish-libosdp.yml +++ b/.github/workflows/publish-libosdp.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable override: true @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable override: true diff --git a/.github/workflows/publish-osdpctl.yml b/.github/workflows/publish-osdpctl.yml index 87b3bf3..4706d09 100644 --- a/.github/workflows/publish-osdpctl.yml +++ b/.github/workflows/publish-osdpctl.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 with: toolchain: stable override: true From f6e623e05f21e67405176f90e0c35515ff8ddeba Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 18 Aug 2024 22:52:43 +0200 Subject: [PATCH 2/2] added `#[allow(unused)]` for the false-positive unused errors in integration-tests --- libosdp/tests/common/device.rs | 1 + libosdp/tests/common/threadbus.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libosdp/tests/common/device.rs b/libosdp/tests/common/device.rs index bb75022..a4bc868 100644 --- a/libosdp/tests/common/device.rs +++ b/libosdp/tests/common/device.rs @@ -16,6 +16,7 @@ type Result = core::result::Result; pub struct CpDevice { dev: Arc>, + #[allow(unused)] // false positive, it is used! pub receiver: Receiver<(i32, OsdpEvent)>, } diff --git a/libosdp/tests/common/threadbus.rs b/libosdp/tests/common/threadbus.rs index aa43251..77ca78b 100644 --- a/libosdp/tests/common/threadbus.rs +++ b/libosdp/tests/common/threadbus.rs @@ -20,6 +20,7 @@ pub struct ThreadBus { recv: Mutex>>, } +#[allow(unused)] // false positive, it is used! fn str_to_channel_id(key: &str) -> i32 { let mut hasher = DefaultHasher::new(); key.hash(&mut hasher); @@ -29,6 +30,7 @@ fn str_to_channel_id(key: &str) -> i32 { } impl ThreadBus { + #[allow(unused)] // false positive, it is used! pub fn new(name: &str) -> Self { let (send, recv) = multiqueue::broadcast_queue(4); Self {