From afcf81a37ed70157f7758d5c29ced42504812237 Mon Sep 17 00:00:00 2001 From: Sho Nakatani Date: Wed, 13 Jul 2022 09:32:52 +0900 Subject: [PATCH 1/2] ci: add `miri` job to run MIRI to tests --- .github/workflows/ci.yml | 11 +++++++++++ Makefile.toml | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c79358..8671c89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,11 @@ jobs: os: ubuntu-latest rust: 1.57.0 + - make: + task: miri + os: ubuntu-latest + rust: nightly + # Example does not cover various envs. Should be done in test. - make: task: example-run @@ -112,6 +117,12 @@ jobs: chmod +x $HOME/.local/bin/cargo-deadlinks cargo deadlinks --version + - name: Install Miri + if: ${{ matrix.make.install-miri }} + run: | + rustup toolchain install nightly --component miri + cargo +nightly miri setup + - name: Install mlc if: ${{ matrix.make.install-mlc }} env: diff --git a/Makefile.toml b/Makefile.toml index 94a4ed9..3dbd1c1 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -28,6 +28,12 @@ script = [''' RUSTFLAGS='-D warnings' cargo test --workspace --all-targets --all-features '''] +[tasks.miri] +script = [''' +#!/usr/bin/env bash -eux +RUSTFLAGS='-D warnings' MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test --workspace --all-targets --all-features +'''] + [tasks.example-build] dependencies = ["build"] script = [''' From 9f5c5f796a6d570a2567971c9d555d941ecf5ca9 Mon Sep 17 00:00:00 2001 From: Sho Nakatani Date: Wed, 13 Jul 2022 09:37:13 +0900 Subject: [PATCH 2/2] ci(fix): install-miri --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8671c89..d1b57ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,7 @@ jobs: - make: task: miri + install-miri: true os: ubuntu-latest rust: nightly