Support running miri in ci (#534)

* Support running miri in ci

* fail fast...

* wait miri is still not stable?

* clean up

* fmt

* Move to Dockerfile
This commit is contained in:
Ryo Onodera 2024-04-02 19:25:51 +09:00 committed by GitHub
parent 005c1375f8
commit 798cb561e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View File

@ -143,6 +143,7 @@ all_test_steps() {
command_step checks1 "ci/docker-run-default-image.sh ci/test-checks.sh" 20 check
command_step checks2 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh check-bins" 15 check
command_step checks3 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh check-all-targets" 15 check
command_step miri "ci/docker-run-default-image.sh ci/test-miri.sh" 5 check
wait_step
# Full test suite

View File

@ -73,6 +73,7 @@ RUN \
rustup install $RUST_NIGHTLY_VERSION && \
rustup component add clippy --toolchain=$RUST_NIGHTLY_VERSION && \
rustup component add rustfmt --toolchain=$RUST_NIGHTLY_VERSION && \
rustup component add miri --toolchain=$RUST_NIGHTLY_VERSION && \
rustup target add wasm32-unknown-unknown && \
cargo install cargo-audit && \
cargo install cargo-hack && \

8
ci/test-miri.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -eo pipefail
source ci/rust-version.sh nightly
# miri is very slow; so only run very few of selective tests!
cargo "+${rust_nightly}" miri test -p solana-program -- hash:: account_info::