49
49
- name : Run miri
50
50
run : MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
51
51
52
+ # Run cargo test
53
+ test :
54
+ name : test
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Checkout
58
+ uses : actions/checkout@v4
59
+
60
+ - name : Cache cargo dependencies
61
+ uses : actions/cache@v3
62
+ with :
63
+ path : |
64
+ - ~/.cargo/bin/
65
+ - ~/.cargo/registry/index/
66
+ - ~/.cargo/registry/cache/
67
+ - ~/.cargo/git/db/
68
+ key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
69
+ restore-keys : |
70
+ ${{ runner.OS }}-cargo-
71
+
72
+ - name : Cache build output dependencies
73
+ uses : actions/cache@v3
74
+ with :
75
+ path : target
76
+ key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
77
+ restore-keys : |
78
+ ${{ runner.OS }}-build-
79
+
80
+ - name : Install Rust
81
+ uses : dtolnay/rust-toolchain@master
82
+ with :
83
+ toolchain : stable
84
+
85
+ - name : Run cargo test
86
+ run : cargo test
87
+
52
88
# Run cargo fmt --check
53
89
style :
54
90
name : style
@@ -169,11 +205,6 @@ jobs:
169
205
target :
170
206
- x86_64-unknown-linux-gnu
171
207
- i686-unknown-linux-musl
172
- toolchain :
173
- - stable
174
- - nightly
175
- features :
176
- - serde
177
208
buildtype :
178
209
- " "
179
210
- " --release"
@@ -203,14 +234,14 @@ jobs:
203
234
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
204
235
${{ runner.OS }}-build-
205
236
206
- - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
237
+ - name : Install Rust with target (${{ matrix.target }})
207
238
uses : dtolnay/rust-toolchain@master
208
239
with :
209
- toolchain : ${{ matrix.toolchain }}
240
+ toolchain : stable
210
241
targets : ${{ matrix.target }}
211
242
212
243
- name : cargo test
213
- run : cargo test --test cpass --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }}
244
+ run : cargo test --test cpass --target=${{ matrix.target }} --features=serde ${{ matrix.buildtype }}
214
245
215
246
# Run test suite for UI
216
247
testtsan :
@@ -220,8 +251,6 @@ jobs:
220
251
matrix :
221
252
target :
222
253
- x86_64-unknown-linux-gnu
223
- toolchain :
224
- - nightly
225
254
buildtype :
226
255
- " "
227
256
- " --release"
@@ -249,10 +278,10 @@ jobs:
249
278
restore-keys : |
250
279
${{ runner.OS }}-build-
251
280
252
- - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
281
+ - name : Install Rust nightly with target (${{ matrix.target }})
253
282
uses : dtolnay/rust-toolchain@master
254
283
with :
255
- toolchain : ${{ matrix.toolchain }}
284
+ toolchain : nightly
256
285
target : ${{ matrix.target }}
257
286
components : rust-src
258
287
@@ -302,23 +331,3 @@ jobs:
302
331
303
332
- name : Run cargo
304
333
run : cargo run
305
-
306
- # Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
307
- #
308
- # ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
309
-
310
- ci-success :
311
- name : ci
312
- if : github.event_name == 'push' && success()
313
- needs :
314
- - style
315
- - check
316
- - doc
317
- - testcpass
318
- - testtsan
319
- - testcfail
320
- - testmiri
321
- runs-on : ubuntu-latest
322
- steps :
323
- - name : Mark the job as a success
324
- run : exit 0
0 commit comments