language: rust
sudo: false
env:
global:
- RUST_BACKTRACE=1
cache: cargo
# Run builds in Linux, MacOS X and Windows
os:
- linux
- osx
- windows
# Run builds for all the supported trains
rust:
- 1.31.0
- stable
- beta
- nightly
# Run the multiple tests.
script:
- |
if [[ "$TRAVIS_RUST_VERSION" == "stable" && "$TRAVIS_OS_NAME" == "linux" ]]; then
rustup component add rustfmt &&
cargo fmt --verbose -- --check
fi
- |
if [[ "$TRAVIS_RUST_VERSION" == "stable" && "$TRAVIS_OS_NAME" == "linux" ]]; then
rustup component add clippy &&
cargo clippy --verbose
fi
- cargo test --verbose