5
5
workflow_dispatch :
6
6
7
7
env :
8
+ CARGO_TERM_COLOR : always
8
9
CI : 1
9
10
10
11
jobs :
11
12
clippy :
12
- name : Clippy validation${{ matrix.all-features && ' with all features' || '' }}
13
- strategy :
14
- fail-fast : false
15
- matrix :
16
- all-features : [ false ]
17
- runs-on : ubuntu-latest
13
+ name : Clippy validation
14
+ runs-on : ubuntu-24.04
18
15
steps :
19
16
- name : Checkout code
20
17
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -27,20 +24,21 @@ jobs:
27
24
cache : false
28
25
29
26
- name : Rust Cache
30
- uses : Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
27
+ uses : Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
31
28
with :
32
- prefix-key : v1-rust
33
- key : all-features-${{ matrix.all-features }}
29
+ prefix-key : v2-rust
34
30
cache-on-failure : true
35
31
36
32
- name : Run clippy
37
33
uses : clechasseur/rs-clippy-check@23f6dcf86d7e4e0d98b000bba0bb81ac587c44aa # v4.0.2
38
34
with :
39
- args : --workspace --all-targets ${{ matrix.all-features && '--all-features' || '' }} -- -D warnings
35
+ args : --workspace --all-targets --feature-powerset -- -D warnings
36
+ tool : cargo-hack
37
+ cache-key : v1-clippy
40
38
41
39
fmt :
42
40
name : Rustfmt check
43
- runs-on : ubuntu-latest
41
+ runs-on : ubuntu-24.04
44
42
steps :
45
43
- name : Checkout code
46
44
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -58,17 +56,14 @@ jobs:
58
56
args : --all
59
57
60
58
build :
61
- name : Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}${{ matrix.all-features && ' with all features' || '' }}
59
+ name : Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}
62
60
strategy :
63
61
fail-fast : false
64
62
matrix :
65
63
toolchain : [ 1.75.0, stable ]
66
- os : [ ubuntu ]
64
+ os : [ ubuntu-24.04, macos-14, windows-2022 ]
67
65
ignore-lock : [ false ]
68
- all-features : [ false ]
69
- include :
70
- - experimental : false
71
- runs-on : ${{ matrix.os }}-latest
66
+ runs-on : ${{ matrix.os }}
72
67
continue-on-error : ${{ matrix.experimental }}
73
68
steps :
74
69
- name : Checkout code
@@ -85,22 +80,21 @@ jobs:
85
80
cache : false
86
81
87
82
- name : Rust Cache
88
- if : ${{ !matrix.experimental }}
89
- uses : Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
83
+ uses : Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
90
84
with :
91
- prefix-key : v2 -rust
92
- key : ignore-lock-${{ matrix.ignore-lock }}-all-features-${{ matrix.all-features }}
85
+ prefix-key : v3 -rust
86
+ key : ignore-lock-${{ matrix.ignore-lock }}
93
87
cache-on-failure : true
94
88
95
- - name : Install just
96
- uses : taiki-e/install-action@3c8fc6eaa5fcff049bb133c1f540c6c2287a191f # v2.49.10
89
+ - name : Install required tools
90
+ uses : taiki-e/install-action@f1390fd0d8205ae79e5e57b1d1e300dceeb4163e # v2.49.44
97
91
with :
98
- tool : just
92
+ tool : just,cargo-hack
99
93
env :
100
94
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101
95
102
- - name : Run checks
103
- run : just all_features=${{ matrix.all-features }} check
96
+ - name : Run checks on feature powerset
97
+ run : just check-powerset
104
98
105
99
- name : Run tests
106
- run : just all_features=${{ matrix.all-features }} test
100
+ run : just test
0 commit comments