From 11bf7b004f57f32d7237ffde208411be1f76d142 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 27 Aug 2024 16:36:12 -0400 Subject: [PATCH 1/2] Update CI images and actions workflows --- .github/workflows/ci.yml | 18 +++++++++++------- src/lib.rs | 4 ++-- src/test_keys.rs | 1 + 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a7e0a6..a5d164f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: rustfmt: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: dtolnay/rust-toolchain@master @@ -16,11 +16,11 @@ jobs: toolchain: nightly components: rustfmt - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: cargo fmt -- --check clippy: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: dtolnay/rust-toolchain@master @@ -28,11 +28,11 @@ jobs: toolchain: nightly components: clippy - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: cargo +nightly clippy -- --deny warnings ci: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false @@ -42,11 +42,15 @@ jobs: - toolchain: stable - toolchain: beta - toolchain: nightly - - toolchain: 1.57.0 # MSRV + - toolchain: 1.57.0 # MSRV steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - run: cargo test + - run: cargo test --no-default-features + - run: cargo test --no-default-features --features=aead + - run: cargo test --no-default-features --features=ecdsa + - run: cargo test --no-default-features --features=rsa_sig diff --git a/src/lib.rs b/src/lib.rs index 52ea1dd..d398631 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,7 +65,6 @@ #![forbid(unsafe_code)] use serde::{de::Error, Deserialize, Deserializer}; -use std::collections::HashMap; use std::fmt; /// The error type @@ -315,7 +314,7 @@ macro_rules! define_test_set { pub number_of_tests: usize, #[serde(deserialize_with = "combine_header")] pub header: String, - pub notes: HashMap, + pub notes: std::collections::HashMap, schema: TestSchema, #[serde(rename = "testGroups")] pub test_groups: Vec, @@ -555,6 +554,7 @@ impl LargeInteger { } mod test_keys; +#[allow(unused_imports)] pub use test_keys::*; #[cfg(feature = "aead")] diff --git a/src/test_keys.rs b/src/test_keys.rs index 6bba2f5..de8f183 100644 --- a/src/test_keys.rs +++ b/src/test_keys.rs @@ -1,5 +1,6 @@ use super::*; +#[allow(dead_code)] fn int_from_base64<'de, D: Deserializer<'de>>(deserializer: D) -> Result { let s: &str = Deserialize::deserialize(deserializer)?; let bytes = data_encoding::BASE64URL_NOPAD From c91ccd5bb976f080221f6c7c42d15bb9bfbb694a Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 27 Aug 2024 16:53:31 -0400 Subject: [PATCH 2/2] Try to avoid slow crates.io update with 1.57.0 --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5d164f..ce1605d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ master ] +env: + # https://github.com/rust-lang/cargo/issues/11014 + CARGO_NET_GIT_FETCH_WITH_CLI: true + jobs: rustfmt: runs-on: ubuntu-24.04