Skip to content

Commit 7ffbd24

Browse files
authored
Update CI configuration in rust.yml
Signed-off-by: Xinyu Yang <xinyu.yang@apich.org>
1 parent 7810a42 commit 7ffbd24

1 file changed

Lines changed: 56 additions & 12 deletions

File tree

.github/workflows/rust.yml

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@
4646
},
4747
"name": "Install Rust ${{ matrix.rust }}"
4848
},
49-
{
50-
"uses": "actions-rs/cargo@v1",
51-
"with": {
52-
"command": "check",
53-
"args": "--all-features"
54-
},
55-
"name": "Run `cargo check`"
56-
},
5749
{
5850
"uses": "actions-rs/cargo@v1",
5951
"with": {
@@ -72,6 +64,62 @@
7264
}
7365
]
7466
},
67+
"checks": {
68+
"name": "Check",
69+
"strategy": {
70+
"matrix": {
71+
"runner": [
72+
"ubuntu-latest",
73+
"windows-latest",
74+
"macos-latest"
75+
],
76+
"rust": [
77+
"stable",
78+
"1.91.0"
79+
],
80+
"features": [
81+
"no-std",
82+
"alloc,no-std",
83+
"alloc,derive,no-std",
84+
"std",
85+
"std,derive",
86+
"serde",
87+
"alloc,serde",
88+
"std,serde",
89+
"serde,derive",
90+
"alloc,serde,derive",
91+
"std,serde,derive",
92+
"std,serde,derive,zero-copy,static-size,async-fiber",
93+
]
94+
}
95+
},
96+
"runs-on": "${{ matrix.runner }}",
97+
"steps": [
98+
{
99+
"uses": "actions/checkout@v4",
100+
"name": "Checkout"
101+
},
102+
{
103+
"uses": "actions-rs/toolchain@v1",
104+
"with": {
105+
"profile": "minimal",
106+
"toolchain": "${{ matrix.rust }}",
107+
"override": true
108+
},
109+
"name": "Install Rust ${{ matrix.rust }}"
110+
},
111+
{
112+
"run": "if [ -z \"${{ matrix.features }}\" ]\n
113+
then\n
114+
cargo check --no-default-features\n
115+
else\n
116+
cargo check --no-default-features --features ${{ matrix.features }}\n
117+
fi",
118+
"name": "Run `cargo check` on all features",
119+
"shell": "bash",
120+
}
121+
]
122+
},
75123
"test": {
76124
"name": "Test",
77125
"strategy": {
@@ -86,7 +134,6 @@
86134
"1.91.0"
87135
],
88136
"features": [
89-
"no-std",
90137
"alloc,no-std",
91138
"alloc,derive,no-std",
92139
"std",
@@ -125,9 +172,6 @@ else\n
125172
fi",
126173
"name": "Run `cargo test` on all features",
127174
"shell": "bash",
128-
"env": {
129-
"RUSTFLAGS": "-D warnings"
130-
}
131175
}
132176
]
133177
},

0 commit comments

Comments
 (0)