From bd95a43c2fed03d28c62cee9625144a8e7719460 Mon Sep 17 00:00:00 2001 From: FranchuFranchu <38839219+FranchuFranchu@users.noreply.github.com> Date: Tue, 27 Feb 2024 18:55:07 -0300 Subject: [PATCH] [sc-478] Update CI (#67) --- .github/workflows/checks.yml | 14 ++++++++------ benches/benches.rs | 4 ++++ rust-toolchain.toml | 4 ++++ src/util.rs | 1 - 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c9578848..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: | @@ -34,13 +34,13 @@ 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 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: | @@ -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"] 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! {