1414 CARGO_TERM_COLOR : always
1515 CLICOLOR : 1
1616
17+ concurrency :
18+ group : " ${{ github.workflow }}-${{ github.ref }}"
19+ cancel-in-progress : true
20+
1721jobs :
1822 ci :
1923 permissions :
2024 contents : none
2125 name : CI
22- needs : [test, msrv, docs, rustfmt, clippy]
26+ needs : [test, msrv, lockfile, docs, rustfmt, clippy]
2327 runs-on : ubuntu-latest
28+ if : " always()"
2429 steps :
25- - name : Done
26- run : exit 0
30+ - name : Failed
31+ run : exit 1
32+ if : " contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
2733 test :
2834 name : Test
2935 strategy :
3036 matrix :
31- os : ["ubuntu-latest", "windows-latest", "macos-latest "]
37+ os : ["ubuntu-latest", "windows-latest", "macos-14 "]
3238 rust : ["stable"]
3339 continue-on-error : ${{ matrix.rust != 'stable' }}
3440 runs-on : ${{ matrix.os }}
@@ -40,31 +46,25 @@ jobs:
4046 with :
4147 toolchain : ${{ matrix.rust }}
4248 - uses : Swatinem/rust-cache@v2
49+ - uses : taiki-e/install-action@cargo-hack
4350 - name : Build
44- run : cargo test --no-run --workspace --all-features
45- - name : Default features
46- run : cargo test --workspace
47- - name : All features
48- run : cargo test --workspace --all-features
49- - name : No-default features
50- run : cargo test --workspace --no-default-features
51+ run : cargo test --workspace --no-run
52+ - name : Test
53+ run : cargo hack test --feature-powerset --workspace
5154 msrv :
52- name : " Check MSRV: 1.73 " # MSRV
55+ name : " Check MSRV"
5356 runs-on : ubuntu-latest
5457 steps :
5558 - name : Checkout repository
5659 uses : actions/checkout@v4
5760 - name : Install Rust
5861 uses : dtolnay/rust-toolchain@stable
5962 with :
60- toolchain : " 1.73 " # MSRV
63+ toolchain : stable
6164 - uses : Swatinem/rust-cache@v2
65+ - uses : taiki-e/install-action@cargo-hack
6266 - name : Default features
63- run : cargo check --workspace --all-targets
64- - name : All features
65- run : cargo check --workspace --all-targets --all-features
66- - name : No-default features
67- run : cargo check --workspace --all-targets --no-default-features
67+ run : cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
6868 lockfile :
6969 runs-on : ubuntu-latest
7070 steps :
7676 toolchain : stable
7777 - uses : Swatinem/rust-cache@v2
7878 - name : " Is lockfile updated?"
79- run : cargo fetch --locked
79+ run : cargo update --workspace --locked
8080 docs :
8181 name : Docs
8282 runs-on : ubuntu-latest
8686 - name : Install Rust
8787 uses : dtolnay/rust-toolchain@stable
8888 with :
89- toolchain : stable
89+ toolchain : " 1.76 " # STABLE
9090 - uses : Swatinem/rust-cache@v2
9191 - name : Check documentation
9292 env :
@@ -101,9 +101,7 @@ jobs:
101101 - name : Install Rust
102102 uses : dtolnay/rust-toolchain@stable
103103 with :
104- # Not MSRV because its harder to jump between versions and people are
105- # more likely to have stable
106- toolchain : stable
104+ toolchain : " 1.76" # STABLE
107105 components : rustfmt
108106 - uses : Swatinem/rust-cache@v2
109107 - name : Check formatting
@@ -119,13 +117,13 @@ jobs:
119117 - name : Install Rust
120118 uses : dtolnay/rust-toolchain@stable
121119 with :
122- toolchain : " 1.73 " # MSRV
120+ toolchain : " 1.76 " # STABLE
123121 components : clippy
124122 - uses : Swatinem/rust-cache@v2
125123 - name : Install SARIF tools
126- run : cargo install clippy-sarif --version 0.3.4 -- locked # Held back due to msrv
124+ run : cargo install clippy-sarif --locked
127125 - name : Install SARIF tools
128- run : cargo install sarif-fmt --version 0.3.4 -- locked # Held back due to msrv
126+ run : cargo install sarif-fmt --locked
129127 - name : Check
130128 run : >
131129 cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
0 commit comments