Skip to content

Commit a50739f

Browse files
author
Thom Chiovoloni
committed
Run miri in CI, and bump MSRV
1 parent ea5f7e1 commit a50739f

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: rust
22
rust:
3-
- 1.20.0
3+
- 1.36.0
44
- nightly
55
- beta
66
- stable
@@ -11,4 +11,5 @@ script: |
1111
([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
1212
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
1313
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
14-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench)
14+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) &&
15+
([ $TRAVIS_RUST_VERSION != nightly ] || bash ./script/run_miri.sh)

scripts/run_miri.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/bash
2+
3+
set -ex
4+
5+
# Install and run the latest version of nightly where miri built successfully.
6+
# Taken from: https://github.com/rust-lang/miri#running-miri-on-ci
7+
8+
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
9+
echo "Installing latest nightly with Miri: $MIRI_NIGHTLY"
10+
rustup default "$MIRI_NIGHTLY"
11+
12+
rustup component add miri
13+
cargo miri setup
14+
15+
cargo miri test --verbose -- -- -Zunstable-options --exclude-should-panic
16+
cargo miri test --verbose --features union -- -- -Zunstable-options --exclude-should-panic
17+
cargo miri test --verbose --all-features -- -- -Zunstable-options --exclude-should-panic

0 commit comments

Comments
 (0)