Skip to content

Commit d1873b6

Browse files
committed
Auto merge of #790 - RalfJung:readme, r=oli-obk
README: add snippet for running Miri on CI
2 parents 2bd22c0 + 7a6438a commit d1873b6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,24 @@ fn does_not_work_on_miri() {
9494
}
9595
```
9696

97+
### Running Miri on CI
98+
99+
To run Miri on CI, make sure that you handle the case where the latest nightly
100+
does not ship the Miri component because it currently does not build. For
101+
example, you can use the following snippet to always test with the latest
102+
nightly that *does* come with Miri:
103+
104+
```sh
105+
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
106+
echo "Installing latest nightly with Miri: $MIRI_NIGHTLY"
107+
rustup default "$MIRI_NIGHTLY"
108+
109+
rustup component add miri
110+
cargo miri setup
111+
112+
cargo miri test -- -- -Zunstable-options --exclude-should-panic
113+
```
114+
97115
### Common Problems
98116

99117
When using the above instructions, you may encounter a number of confusing compiler

0 commit comments

Comments
 (0)