language: rust
cache: cargo
rust:
- stable
- beta
os:
- linux
- osx
- windows
addons:
apt:
packages:
- libssl-dev
jobs:
fast_finish: true
allow_failures:
- rust: nightly
include:
- rust: nightly
os: linux
before_script: |
rustup component add clippy
rustup component add rustfmt
if [ "${TRAVIS_RUST_VERSION}" == stable ] && [ "${TRAVIS_OS_NAME}" == linux ]; then
cargo install cargo-tarpaulin
fi
script: |
RUSTFLAGS="-D warnings" cargo build --all-targets --verbose
cargo test --verbose
cargo test --examples --verbose
cargo clippy -- -D warnings
cargo clippy --examples -- -D warnings
cargo fmt --all -- --check
after_success: |
if [ "${TRAVIS_RUST_VERSION}" == stable ] && [ "${TRAVIS_OS_NAME}" == linux ]; then
cargo tarpaulin --ciserver travis-ci --coveralls ${TRAVIS_JOB_ID}
fi