Skip to content

Commit 1989671

Browse files
committed
Added Miri tests on travis
1 parent 451c933 commit 1989671

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ matrix:
99
env: DO_FUZZ=true DO_LINT=true
1010
- rust: beta
1111
- rust: nightly
12-
env: DO_BENCH=true
12+
env: DO_BENCH=true DO_MIRI=true
1313
- rust: 1.22.0
1414

1515
script:

contrib/test.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ then
4343
)
4444
fi
4545

46+
# Miri Checks if told to
47+
# Only supported in nightly
48+
if [ "$DO_MIRI" = true ]
49+
then
50+
(
51+
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
52+
echo "Installing latest nightly with Miri: $MIRI_NIGHTLY"
53+
rustup set profile minimal
54+
rustup default "$MIRI_NIGHTLY"
55+
cargo miri test -- -- any_unsafe_transmute_miri_test
56+
57+
# Change back to latest nightly possibly without Miri
58+
rustup default nightly
59+
)
60+
fi
61+
4662
# Bench if told to
4763
if [ "$DO_BENCH" = true ]
4864
then

0 commit comments

Comments
 (0)