language: rust
sudo: false
rust:
- 1.15.0 - stable
- beta
- nightly
os:
- linux
- osx
install:
- if [ ${TRAVIS_RUST_VERSION} != "1.15.0" ] && rustup component add clippy-preview; then export HAS_CLIPPY=true; else export HAS_CLIPPY=false; fi
- rustc -V
- cargo -V
- if ${HAS_CLIPPY}; then cargo clippy -V; fi
script:
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then export FEATURES="--features=test-nightly"; else export FEATURES= ; fi
- cargo build --verbose ${FEATURES}
- cargo test --verbose ${FEATURES}
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then export FEATURES="--features=test-nightly,use_core"; else export FEATURES="--features=use_core" ; fi
- cargo clean
- cargo build --verbose ${FEATURES}
- cargo test --verbose ${FEATURES}
- if ${HAS_CLIPPY}; then cargo clippy --verbose ${FEATURES}; fi
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then cargo update -Z minimal-versions; fi
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then cargo build --verbose; fi
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then cargo test --verbose; fi
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then cargo build --features=use_core; fi
- if [ ${TRAVIS_RUST_VERSION} = "nightly" ]; then cargo test --verbose --features=use_core; fi