From 7a6438ada68b30f194985da5586b640138d768dc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 25 Jun 2019 10:05:34 +0200 Subject: [PATCH] add snippet for running Miri on CI --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 82fe738e031..91dcfd7cf83 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,24 @@ fn does_not_work_on_miri() { } ``` +### Running Miri on CI + +To run Miri on CI, make sure that you handle the case where the latest nightly +does not ship the Miri component because it currently does not build. For +example, you can use the following snippet to always test with the latest +nightly that *does* come with Miri: + +```sh +MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) +echo "Installing latest nightly with Miri: $MIRI_NIGHTLY" +rustup default "$MIRI_NIGHTLY" + +rustup component add miri +cargo miri setup + +cargo miri test -- -- -Zunstable-options --exclude-should-panic +``` + ### Common Problems When using the above instructions, you may encounter a number of confusing compiler -- 2.44.0