language: rust
cache: cargo
os:
- linux
- osx
rust:
- nightly
- beta
- stable
script:
- |
if [[ $TRAVIS_EVENT_TYPE != "cron" && $TRAVIS_RUST_VERSION == *stable* ]]
then
rustup component add rustfmt
cargo fmt --version
cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false)
fi
- cargo test
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo update -Z minimal-versions; fi
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo build; fi
branches:
only:
master
matrix:
allow_failures:
- rust: nightly