Skip to content

Commit 8a77f32

Browse files
authored
Merge pull request #246 from Dirbaio/ci-miri
Run tests with MIRI in CI
2 parents 80cbe66 + 932760f commit 8a77f32

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,46 @@ jobs:
250250
- name: Run cargo
251251
run: cargo run
252252

253+
254+
# Run MIRI tests on nightly
255+
testmiri:
256+
name: testmiri
257+
runs-on: ubuntu-20.04
258+
steps:
259+
- name: Checkout
260+
uses: actions/checkout@v2
261+
262+
- name: Cache cargo dependencies
263+
uses: actions/cache@v2
264+
with:
265+
path: |
266+
- ~/.cargo/bin/
267+
- ~/.cargo/registry/index/
268+
- ~/.cargo/registry/cache/
269+
- ~/.cargo/git/db/
270+
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
271+
restore-keys: |
272+
${{ runner.OS }}-cargo-
273+
274+
- name: Cache build output dependencies
275+
uses: actions/cache@v2
276+
with:
277+
path: target
278+
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
279+
restore-keys: |
280+
${{ runner.OS }}-build-
281+
282+
- name: Install Rust
283+
uses: actions-rs/toolchain@v1
284+
with:
285+
toolchain: nightly
286+
target: x86_64-unknown-linux-gnu
287+
components: miri
288+
override: true
289+
290+
- name: Run miri
291+
run: MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
292+
253293
# Only runs when pushing to master branch
254294
deploy:
255295
name: deploy

0 commit comments

Comments
 (0)