language: rust
sudo: false
cache:
- cargo
matrix:
include:
- rust: 1.20.0
- rust: 1.27.0
- rust: stable
- rust: beta
- rust: nightly
- os: osx
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=aarch64-unknown-linux-gnu
- env: TARGET=wasm32-unknown-unknown
script:
- |
set -e
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]
then
# Make sure the benchmarks compile
cargo build --benches --all
export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
export RUST_BACKTRACE=1
# Run address sanitizer
RUSTFLAGS="-Z sanitizer=address" \
cargo test --lib --target x86_64-unknown-linux-gnu
fi
- |
set -e
if [[ "$TARGET" ]]
then
rustup target add $TARGET
cargo check --target $TARGET
cargo check --tests --target $TARGET
else
cargo test --no-fail-fast
cargo test --no-fail-fast --release
fi