diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d85fc357c7b..39fd88e2ed1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -250,6 +250,9 @@ jobs: - name: Run unsafe analyzer run: ./scripts/unsafe-analyzer + - name: Run MIRI test + run: ./scripts/tests/miri.sh + - uses: actions/upload-artifact@v3 with: name: tools diff --git a/scripts/init-unsafe-analysis.sh b/scripts/init-unsafe-analysis.sh index 3921db65e6ca..1588e3ec01aa 100755 --- a/scripts/init-unsafe-analysis.sh +++ b/scripts/init-unsafe-analysis.sh @@ -8,6 +8,8 @@ TOOL=$ROOT/third-party/cargo-geiger $HERE/deps/rust.sh +rustup component add --toolchain nightly-2024-04-21-x86_64-unknown-linux-gnu miri + git submodule update --init $TOOL cargo +stable install cargo-geiger --force --locked \ --path $TOOL/cargo-geiger \ diff --git a/scripts/tests/miri.sh b/scripts/tests/miri.sh new file mode 100755 index 000000000000..66896376cf2b --- /dev/null +++ b/scripts/tests/miri.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +ROOT=$(git rev-parse --show-toplevel) + +mkdir -p $ROOT/out + +cd $ROOT/rmm + +MIRIFLAGS="-Zmiri-disable-stacked-borrows" cargo miri test --target aarch64-unknown-linux-gnu + +if [ $? -ne 0 ]; then + exit 1 +fi