9
9
os :
10
10
- linux
11
11
- osx
12
+ dist : xenial
12
13
13
14
before_script :
15
+ # install extra stuff for cross-compilation
16
+ - if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt update && sudo apt install gcc-multilib; fi
14
17
# macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165)
15
18
- if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi
16
19
# Compute the rust version we use. We do not use "language: rust" to have more control here.
17
20
- |
18
- if [ "$TRAVIS_EVENT_TYPE" = cron ]; then
21
+ if [[ "$TRAVIS_EVENT_TYPE" == cron ] ]; then
19
22
RUST_TOOLCHAIN=nightly
20
23
else
21
24
RUST_TOOLCHAIN=$(cat rust-version)
@@ -24,7 +27,7 @@ before_script:
24
27
if [ "$TRAVIS_OS_NAME" == osx ]; then
25
28
export MIRI_SYSROOT_BASE=~/Library/Caches/miri.miri.miri/
26
29
else
27
- export MIRI_SYSROOT_BASE=~/.cache/miri/HOST
30
+ export MIRI_SYSROOT_BASE=~/.cache/miri/
28
31
fi
29
32
# install Rust
30
33
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
@@ -38,10 +41,13 @@ script:
38
41
cargo build --release --all-features --all-targets &&
39
42
cargo install --all-features --force --path .
40
43
- |
41
- # Get ourselves a MIR-full libstd
44
+ # Get ourselves a MIR-full libstd for the host and a foreign architecture
42
45
cargo miri setup &&
43
- cargo miri setup --target i686-unknown-linux-gnu &&
44
- cargo miri setup --target i686-apple-darwin
46
+ if [[ "$TRAVIS_OS_NAME" == osx ]]; then
47
+ cargo miri setup --target i686-apple-darwin
48
+ else
49
+ cargo miri setup --target i686-unknown-linux-gnu
50
+ fi
45
51
- |
46
52
# Test miri with full MIR, on the host and other architectures
47
53
MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features &&
0 commit comments