@@ -16,62 +16,66 @@ jobs:
1616 test :
1717 name : Test
1818 runs-on : ubuntu-latest
19- strategy :
20- matrix :
21- rust :
22- - stable
23- - 1.89.0 # Rust minimum version
2419 steps :
2520 - uses : actions/checkout@v4
26-
21+
2722 - name : Install Rust
2823 uses : dtolnay/rust-toolchain@master
2924 with :
30- toolchain : ${{ matrix.rust }}
31-
25+ toolchain : 1.95.0
26+ components : rustfmt, clippy
27+
3228 - name : Cache cargo registry
3329 uses : actions/cache@v4
3430 with :
3531 path : ~/.cargo/registry
3632 key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
37-
33+
3834 - name : Cache cargo index
3935 uses : actions/cache@v4
4036 with :
4137 path : ~/.cargo/git
4238 key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
43-
39+
4440 - name : Cache cargo build
4541 uses : actions/cache@v4
4642 with :
4743 path : target
4844 key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
49-
45+
5046 - name : Check formatting
5147 run : cargo fmt --all -- --check
52- if : matrix.rust == 'stable'
53-
48+
5449 - name : Run clippy
5550 run : cargo clippy --all-targets --all-features -- -D warnings
56- if : matrix.rust == 'stable'
5751
58- - name : Build
52+ - name : Build (default features)
5953 run : cargo build
6054
55+ - name : Build (all features)
56+ run : cargo build --all-features
57+
6158 - name : Check benchmarks
62- run : cargo check --benches
63- if : matrix.rust == 'stable'
59+ run : cargo check --benches --all-features
6460
65- - name : Check examples
61+ - name : Check examples (default features)
6662 run : cargo check --examples
67- if : matrix.rust == 'stable'
68-
69- - name : Run tests
63+
64+ - name : Check examples (all features)
65+ # Examples gated behind `required-features` (e.g. scheduler_*) only get
66+ # a build check when their feature is enabled.
67+ run : cargo check --examples --all-features
68+
69+ - name : Run tests (default features)
7070 run : cargo test --lib
71-
71+
72+ - name : Run tests (all features)
73+ # Required to run `tracing_tests` which is `#[cfg(feature = "tracing")]`,
74+ # plus full scheduler coverage.
75+ run : cargo test --lib --all-features
76+
7277 - name : Run doctests
73- run : cargo test --doc
74- if : matrix.rust == 'stable'
78+ run : cargo test --doc --all-features
7579
7680 security_audit :
7781 name : Security Audit
0 commit comments