From 932760f3b727c5f3f44ee7e2b9acea6867e1bd33 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 24 Sep 2021 23:47:24 +0200 Subject: [PATCH] Run tests with MIRI in CI --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4e2aeb6..da5096d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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