33 pull_request :
44 branches : [main]
55 push :
6- branches : [main, staging, trying]
6+ branches : [staging, trying]
77
88env :
99 CARGO_TERM_COLOR : always
1010
1111jobs :
12+ # Run MIRI tests on nightly
13+ # NOTE first because it takes the longest to complete
14+ testmiri :
15+ name : testmiri
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v2
20+
21+ - name : Cache cargo dependencies
22+ uses : actions/cache@v2
23+ with :
24+ path : |
25+ - ~/.cargo/bin/
26+ - ~/.cargo/registry/index/
27+ - ~/.cargo/registry/cache/
28+ - ~/.cargo/git/db/
29+ key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30+ restore-keys : |
31+ ${{ runner.OS }}-cargo-
32+
33+ - name : Cache build output dependencies
34+ uses : actions/cache@v2
35+ with :
36+ path : target
37+ key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
38+ restore-keys : |
39+ ${{ runner.OS }}-build-
40+
41+ - name : Install Rust
42+ uses : actions-rs/toolchain@v1
43+ with :
44+ toolchain : nightly
45+ target : x86_64-unknown-linux-gnu
46+ components : miri
47+ override : true
48+
49+ - name : Run miri
50+ run : MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
51+
1252 # Run cargo fmt --check
1353 style :
1454 name : style
@@ -301,44 +341,6 @@ jobs:
301341 run : cargo run
302342
303343
304- # Run MIRI tests on nightly
305- testmiri :
306- name : testmiri
307- runs-on : ubuntu-latest
308- steps :
309- - name : Checkout
310- uses : actions/checkout@v2
311-
312- - name : Cache cargo dependencies
313- uses : actions/cache@v2
314- with :
315- path : |
316- - ~/.cargo/bin/
317- - ~/.cargo/registry/index/
318- - ~/.cargo/registry/cache/
319- - ~/.cargo/git/db/
320- key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
321- restore-keys : |
322- ${{ runner.OS }}-cargo-
323-
324- - name : Cache build output dependencies
325- uses : actions/cache@v2
326- with :
327- path : target
328- key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
329- restore-keys : |
330- ${{ runner.OS }}-build-
331-
332- - name : Install Rust
333- uses : actions-rs/toolchain@v1
334- with :
335- toolchain : nightly
336- target : x86_64-unknown-linux-gnu
337- components : miri
338- override : true
339-
340- - name : Run miri
341- run : MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
342344
343345 # Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
344346 #
@@ -354,6 +356,7 @@ jobs:
354356 - testcpass
355357 - testtsan
356358 - testcfail
359+ - testmiri
357360 runs-on : ubuntu-latest
358361 steps :
359362 - name : Mark the job as a success
0 commit comments