14
14
CARGO_TERM_COLOR : always
15
15
CLICOLOR : 1
16
16
17
+ concurrency :
18
+ group : " ${{ github.workflow }}-${{ github.ref }}"
19
+ cancel-in-progress : true
20
+
17
21
jobs :
18
22
ci :
19
23
permissions :
20
24
contents : none
21
25
name : CI
22
- needs : [test, msrv, docs, rustfmt, clippy]
26
+ needs : [test, msrv, lockfile, docs, rustfmt, clippy]
23
27
runs-on : ubuntu-latest
28
+ if : " always()"
24
29
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')"
27
33
test :
28
34
name : Test
29
35
strategy :
30
36
matrix :
31
- os : ["ubuntu-latest", "windows-latest", "macos-latest "]
37
+ os : ["ubuntu-latest", "windows-latest", "macos-14 "]
32
38
rust : ["stable"]
33
39
continue-on-error : ${{ matrix.rust != 'stable' }}
34
40
runs-on : ${{ matrix.os }}
@@ -40,31 +46,25 @@ jobs:
40
46
with :
41
47
toolchain : ${{ matrix.rust }}
42
48
- uses : Swatinem/rust-cache@v2
49
+ - uses : taiki-e/install-action@cargo-hack
43
50
- 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
51
54
msrv :
52
- name : " Check MSRV: 1.73 " # MSRV
55
+ name : " Check MSRV"
53
56
runs-on : ubuntu-latest
54
57
steps :
55
58
- name : Checkout repository
56
59
uses : actions/checkout@v4
57
60
- name : Install Rust
58
61
uses : dtolnay/rust-toolchain@stable
59
62
with :
60
- toolchain : " 1.73 " # MSRV
63
+ toolchain : stable
61
64
- uses : Swatinem/rust-cache@v2
65
+ - uses : taiki-e/install-action@cargo-hack
62
66
- 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
68
68
lockfile :
69
69
runs-on : ubuntu-latest
70
70
steps :
76
76
toolchain : stable
77
77
- uses : Swatinem/rust-cache@v2
78
78
- name : " Is lockfile updated?"
79
- run : cargo fetch --locked
79
+ run : cargo update --workspace --locked
80
80
docs :
81
81
name : Docs
82
82
runs-on : ubuntu-latest
86
86
- name : Install Rust
87
87
uses : dtolnay/rust-toolchain@stable
88
88
with :
89
- toolchain : stable
89
+ toolchain : " 1.76 " # STABLE
90
90
- uses : Swatinem/rust-cache@v2
91
91
- name : Check documentation
92
92
env :
@@ -101,9 +101,7 @@ jobs:
101
101
- name : Install Rust
102
102
uses : dtolnay/rust-toolchain@stable
103
103
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
107
105
components : rustfmt
108
106
- uses : Swatinem/rust-cache@v2
109
107
- name : Check formatting
@@ -119,13 +117,13 @@ jobs:
119
117
- name : Install Rust
120
118
uses : dtolnay/rust-toolchain@stable
121
119
with :
122
- toolchain : " 1.73 " # MSRV
120
+ toolchain : " 1.76 " # STABLE
123
121
components : clippy
124
122
- uses : Swatinem/rust-cache@v2
125
123
- 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
127
125
- 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
129
127
- name : Check
130
128
run : >
131
129
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
0 commit comments