From 77f76ebfb1885bddb96673ef9845b0d080eaff70 Mon Sep 17 00:00:00 2001 From: FranchuFranchu Date: Tue, 27 Feb 2024 16:22:45 -0300 Subject: [PATCH 1/3] Update CI. - Tests are now run on release mode - Slow benchmarks are now skipped - Fix rust toolchain to specific version - Fix cspell --- .github/workflows/checks.yml | 6 ++++-- benches/benches.rs | 4 ++++ rust-toolchain.toml | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c9578848..cd628954 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -34,7 +34,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }} - - run: cargo test + - run: cargo test --release - run: cargo test --release --features _fuzz --test fuzz fmt: runs-on: ubuntu-latest @@ -65,4 +65,6 @@ jobs: with: incremental_files_only: false config: ./cspell.json - files: "**/*.rs **/*.md" + files: | + **/*.rs + **/*.md diff --git a/benches/benches.rs b/benches/benches.rs index 4f0a03f2..96d1dd0d 100644 --- a/benches/benches.rs +++ b/benches/benches.rs @@ -37,6 +37,10 @@ fn run_dir(path: &PathBuf, group: Option, c: &mut Criterion) { run_dir(entry, Some(group), c) } else { + // Skip stress tests and sort. + if entry.components().any(|x| matches!(x.as_os_str().to_str(), Some("stress_tests" | "sort"))) { + continue; + } if entry.extension().unwrap().to_str().unwrap() == "hvmc" { run_file(entry, group.clone(), c); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..2e4d1842 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +profile = "minimal" +channel = "nightly-2024-01-27" +components = ["rustfmt", "clippy"] From 51fd0dd634bdaa6d770a27b51e0e948380d3c134 Mon Sep 17 00:00:00 2001 From: FranchuFranchu Date: Tue, 27 Feb 2024 16:34:37 -0300 Subject: [PATCH 2/3] Remove old `allow` attribute. --- src/util.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util.rs b/src/util.rs index 5fb1a7ae..b9d0bdff 100644 --- a/src/util.rs +++ b/src/util.rs @@ -117,7 +117,6 @@ macro_rules! bi_enum { pub(crate) use bi_enum; #[test] -#[allow(non_local_definitions)] fn test_bi_enum() { use std::str::FromStr; bi_enum! { From 12841945d2e87ac54651ccac90378342a2e0e811 Mon Sep 17 00:00:00 2001 From: FranchuFranchu Date: Tue, 27 Feb 2024 17:10:03 -0300 Subject: [PATCH 3/3] Update Rust toolchain used by CI --- .github/workflows/checks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index cd628954..2b2bb99b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@nightly + - uses: dsherret/rust-toolchain-file@v1 - uses: actions/cache@v2 with: path: | @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@nightly + - uses: dsherret/rust-toolchain-file@v1 - uses: actions/cache@v2 with: path: | @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@nightly + - uses: dsherret/rust-toolchain-file@v1 with: components: rustfmt - run: cargo fmt --check @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@nightly + - uses: dsherret/rust-toolchain-file@v1 - uses: actions/cache@v2 with: path: |