From 2055434fa6b8137a44d6f3ea2b48b9947268abb9 Mon Sep 17 00:00:00 2001 From: Samuel Maier Date: Fri, 9 Aug 2024 14:18:38 +0200 Subject: [PATCH] use stable compiler for native execution in ci, this avoids cache busting see: https://github.com/Swatinem/rust-cache/issues/161 --- .github/workflows/rust.yml | 22 +++++++++++----------- src/profile/mod.rs | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 08b4f0c..a918e34 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -3,7 +3,7 @@ on: [push, pull_request, workflow_dispatch] name: CI env: - RUST_TOOLCHAIN_VERSION: "nightly-2024-08-02" + RUST_NIGHTLY_TOOLCHAIN_VERSION: "nightly-2024-08-02" jobs: fmt: @@ -13,10 +13,10 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{env.RUST_TOOLCHAIN_VERSION}} + toolchain: stable components: rustfmt - uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - run: cargo +stable fmt --all -- --check clippy: name: Clippy @@ -31,10 +31,10 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{env.RUST_TOOLCHAIN_VERSION}} + toolchain: stable components: clippy - uses: Swatinem/rust-cache@v2 - - run: cargo clippy --workspace --target ${{matrix.target}} --all-features -- -D warnings + - run: cargo +stable clippy --workspace --target ${{matrix.target}} --all-features -- -D warnings test: name: Test Suite @@ -43,9 +43,9 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{env.RUST_TOOLCHAIN_VERSION}} + toolchain: stable - uses: Swatinem/rust-cache@v2 - - run: cargo test --locked --target x86_64-unknown-linux-gnu --lib + - run: cargo +stable test --locked --target x86_64-unknown-linux-gnu --lib build-webpage: runs-on: ubuntu-latest @@ -61,7 +61,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{env.RUST_TOOLCHAIN_VERSION}} + toolchain: ${{env.RUST_NIGHTLY_TOOLCHAIN_VERSION}} targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 - name: Download and install Trunk binary @@ -120,7 +120,7 @@ jobs: # Ref: https://github.com/cross-rs/cross/issues/1510 if: matrix.cross run: | - cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7 + cargo +stable install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7 - name: Building ${{ matrix.TARGET }} run: echo "${{ matrix.TARGET }}" @@ -128,7 +128,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{env.RUST_TOOLCHAIN_VERSION}} + toolchain: stable targets: ${{ matrix.TARGET }} - name: Rust Cache @@ -142,7 +142,7 @@ jobs: - if: ${{ !matrix.cross }} name: Cargo Build - run: cargo build --locked --verbose --release --target=${{ matrix.TARGET }} + run: cargo +stable build --locked --verbose --release --target=${{ matrix.TARGET }} - if: matrix.cross name: Cross Build diff --git a/src/profile/mod.rs b/src/profile/mod.rs index 7647af3..6dd2202 100644 --- a/src/profile/mod.rs +++ b/src/profile/mod.rs @@ -7,6 +7,7 @@ pub mod tracing; #[macro_export] #[allow(clippy::module_name_repetitions)] +#[allow(unknown_lints)] // not a lint of stable... #[allow(edition_2024_expr_fragment_specifier)] macro_rules! profile_scope { ($scope_name:expr) => {