@@ -2,16 +2,15 @@ name: Rust - Continuous integration
2
2
3
3
on :
4
4
push :
5
- branches : [ "main" ]
5
+ branches : ["main"]
6
6
pull_request :
7
- branches : [ "main" ]
7
+ branches : ["main"]
8
8
9
9
concurrency :
10
10
# Allow one run at a time for PRs, but multiple for other invocations
11
11
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12
12
cancel-in-progress : true
13
13
14
-
15
14
env :
16
15
RUSTFLAGS : -Dwarnings
17
16
CARGO_TERM_COLOR : always
@@ -21,21 +20,21 @@ jobs:
21
20
name : Lint
22
21
runs-on : ubuntu-latest
23
22
steps :
24
- - uses : actions/checkout@v4
25
- - uses : dtolnay/rust-toolchain@stable
26
- with :
27
- components : clippy, rustfmt
28
- - uses : Swatinem/rust-cache@v2
29
- with :
30
- key : lint
31
- - name : Install cargo-workspaces
32
- run : cargo install cargo-workspaces
33
- - name : Check rustfmt
34
- run : cargo fmt --all -- --check
35
- - name : Check clippy
36
- run : cargo ws exec cargo clippy --all-features --all-targets
37
- - name : Check clippy (No features)
38
- run : cargo ws exec cargo clippy --no-default-features --all-targets
23
+ - uses : actions/checkout@v4
24
+ - uses : dtolnay/rust-toolchain@stable
25
+ with :
26
+ components : clippy, rustfmt
27
+ - uses : Swatinem/rust-cache@v2
28
+ with :
29
+ key : lint
30
+ - name : Install cargo-workspaces
31
+ run : cargo install cargo-workspaces
32
+ - name : Check rustfmt
33
+ run : cargo fmt --all -- --check
34
+ - name : Check clippy
35
+ run : cargo ws exec cargo clippy --all-features --all-targets
36
+ - name : Check clippy (No features)
37
+ run : cargo ws exec cargo clippy --no-default-features --all-targets
39
38
40
39
msrv :
41
40
name : MSRV
@@ -76,15 +75,30 @@ jobs:
76
75
with :
77
76
key : build-test
78
77
79
- - name : Cargo build
80
- run : cargo build --quiet
81
- - name : Test
82
- run : cargo test
83
-
84
78
- name : Cargo build --all-features
85
79
run : cargo build --quiet --all-features
86
80
- name : Test --all-features
87
81
run : cargo test --all-features
82
+
83
+ feature-test :
84
+ name : Test feature matrix
85
+ runs-on : ubuntu-latest
86
+ steps :
87
+ - uses : actions/checkout@v4
88
+ - uses : dtolnay/rust-toolchain@master
89
+ with :
90
+ toolchain : stable
91
+ - uses : Swatinem/rust-cache@v2
92
+ with :
93
+ key : features-test
94
+ - name : Install cargo-all-features
95
+ uses :
baptiste0928/[email protected]
96
+ with :
97
+ crate : cargo-all-features
98
+
99
+ - name : Test all features
100
+ run : cargo test-all-features
101
+
88
102
ffi :
89
103
name : Test FFI (${{ matrix.rust.name }}, ${{ matrix.os }})
90
104
strategy :
@@ -122,4 +136,3 @@ jobs:
122
136
key : docs
123
137
- name : Generate documentation
124
138
run : cargo doc -v --document-private-items --all-features
125
-
0 commit comments