]> git.lizzy.rs Git - rust.git/commitdiff
add snippet for running Miri on CI
authorRalf Jung <post@ralfj.de>
Tue, 25 Jun 2019 08:05:34 +0000 (10:05 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 25 Jun 2019 08:05:34 +0000 (10:05 +0200)
README.md

index 82fe738e03100553cd48ffe0fdc3f5dd0d8b8fe2..91dcfd7cf83b3eccbfa7732f8d2e2f362922c1a1 100644 (file)
--- 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