Merge pull request #246 from Dirbaio/ci-miri

Run tests with MIRI in CI
This commit is contained in:
Emil Fresk 2021-09-29 09:03:38 +02:00 committed by GitHub
commit 8a77f3237f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,6 +250,46 @@ jobs:
- name: Run cargo
run: cargo run
# Run MIRI tests on nightly
testmiri:
name: testmiri
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache cargo dependencies
uses: actions/cache@v2
with:
path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-cargo-
- name: Cache build output dependencies
uses: actions/cache@v2
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
components: miri
override: true
- name: Run miri
run: MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
# Only runs when pushing to master branch
deploy:
name: deploy