language: rust
os:
- linux
- osx
rust:
- 1.17.0
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
cache: cargo
before_script:
- if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
rustup component add rustfmt;
fi
script:
- if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
cargo fmt -- --check;
fi
- cargo build --verbose
- cargo test --verbose
- if [ "$TRAVIS_RUST_VERSION" != "1.17.0" ]; then
cargo build --verbose --features serde_support &&
cargo test --verbose --features serde_support &&
cargo build --verbose --features serde_support_test &&
cargo test --verbose --features serde_support_test;
fi