Skip to content

Commit

Permalink
use stable compiler for native execution in ci, this avoids cache bus…
Browse files Browse the repository at this point in the history
  • Loading branch information
9SMTM6 committed Aug 9, 2024
1 parent 761b871 commit 2055434
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -120,15 +120,15 @@ 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 }}"

- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{env.RUST_TOOLCHAIN_VERSION}}
toolchain: stable
targets: ${{ matrix.TARGET }}

- name: Rust Cache
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/profile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 2055434

Please sign in to comment.