---
language: rust
dist: trusty
sudo: required
matrix:
include:
- rust: 1.19.0 env: ONLY_BUILD=yes
- rust: 1.24.0 env: ONLY_BUILD=yes
- rust: stable
- rust: beta
- rust: nightly
addons:
apt:
packages:
- libssl-dev
install:
- cargo tarpaulin --version || RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install --force cargo-tarpaulin
- cargo fuzz --version || cargo install --force cargo-fuzz
cache: cargo
env:
- TERM=dumb
script:
- cargo build --verbose
- 'if [[ "$ONLY_BUILD" != yes ]]; then cargo test --verbose; fi'
- 'if [[ "$ONLY_BUILD" != yes ]]; then cargo doc --verbose; fi'
- 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo bench --no-run; fi'
- 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo fuzz list | xargs -L 1 -I FUZZER cargo fuzz run FUZZER -- -max_total_time=1; fi'
after_success: |
if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then
# Calculate test coverage
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
fi