| 1 | #!/usr/bin/bashscip-shell filesystem . . `/usr/bin/bash`. |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | # Clean out our target dir, which may have artifacts compiled by a version of |
| 6 | # rust different from the one we're about to download. |
| 7 | cargoscip-shell system . . cargo. clean |
| 8 | |
| 9 | # Install and run the latest version of nightly where miri built successfully. |
| 10 | # Taken from: https://github.com/rust-lang/miri#running-miri-on-ci |
| 11 | |
| 12 | MIRI_NIGHTLY=nightly-$(curlscip-shell system . . curl. -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) |
| 13 | echoscip-shell system . . echo. "Installing latest nightly with Miri: $MIRI_NIGHTLY" |
| 14 | rustup override unset |
| 15 | rustup default "$MIRI_NIGHTLY" |
| 16 | |
| 17 | rustup component add miri |
| 18 | cargoscip-shell system . . cargo. miri setup |
| 19 | |
| 20 | cargoscip-shell system . . cargo. miri test --verbose |
| 21 | cargoscip-shell system . . cargo. miri test --verbose --features union |
| 22 | cargoscip-shell system . . cargo. miri test --verbose --all-features |
| 23 | |
| 24 | rustup override set nightly |