From 798cb561e15d34ecf9891263572472365215d0c6 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Tue, 2 Apr 2024 19:25:51 +0900 Subject: [PATCH] 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 --- ci/buildkite-pipeline.sh | 1 + ci/docker/Dockerfile | 1 + ci/test-miri.sh | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100755 ci/test-miri.sh diff --git a/ci/buildkite-pipeline.sh b/ci/buildkite-pipeline.sh index 4ae00c9feab586..e0b51ef9e4acdb 100755 --- a/ci/buildkite-pipeline.sh +++ b/ci/buildkite-pipeline.sh @@ -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 diff --git a/ci/docker/Dockerfile b/ci/docker/Dockerfile index cee80877c6db5d..4e792f1368a1ad 100644 --- a/ci/docker/Dockerfile +++ b/ci/docker/Dockerfile @@ -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 && \ diff --git a/ci/test-miri.sh b/ci/test-miri.sh new file mode 100755 index 00000000000000..407d48c34106a2 --- /dev/null +++ b/ci/test-miri.sh @@ -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::