• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1language: rust
2services: docker
3cache:
4  - cargo
5
6matrix:
7  include:
8    - rust: 1.34.0
9    - rust: stable
10    - rust: beta
11    - rust: nightly
12    - os: osx
13    # Tier 1
14    - env: CROSS_TEST=i686-unknown-linux-gnu
15    # Tier 2
16    - env: CROSS_TEST=aarch64-unknown-linux-gnu
17    - env: CROSS_CHECK=wasm32-unknown-unknown
18
19script:
20  - |
21    set -e
22    if [[ "$TRAVIS_RUST_VERSION" == nightly ]]
23    then
24        # Make sure the benchmarks compile
25        cargo build --benches --all
26
27        export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
28        export RUST_BACKTRACE=1
29
30        # Run address sanitizer
31        RUSTFLAGS="-Z sanitizer=address" \
32        cargo test --lib --target x86_64-unknown-linux-gnu
33    fi
34  - |
35    set -e
36    if [[ "$CROSS_CHECK" ]]
37    then
38        rustup target add $CROSS_CHECK
39        cargo check --target $CROSS_CHECK
40        cargo check --tests --target $CROSS_CHECK
41        cargo check --target $CROSS_CHECK --no-default-features
42    elif [[ "$CROSS_TEST" ]]
43    then
44        cargo install --force cross
45        cross test --target=$CROSS_TEST
46        cross check --target $CROSS_TEST --no-default-features
47    else
48        cargo test --no-fail-fast
49        cargo test --no-fail-fast --release
50        cargo check --no-default-features
51    fi
52