dist: xenial
language: rust
cache:
- directories:
- $HOME/.cargo
- target/debug/deps
- target/$TARGET/debug/deps
before_cache:
- chmod -R a+r $HOME/.cargo
matrix:
fast_finish: true
include:
- env: CARGO_AUDIT=1
- os: windows
- os: linux
rust: nightly
- os: linux
rust: 1.26.1
script:
- mv Cargo.lock.min Cargo.lock
- cargo build
- os: linux
- os: osx
rust: nightly
- os: osx
rust: 1.26.1
script:
- mv Cargo.lock.min Cargo.lock
- cargo build
- os: osx
- os: windows
rust: nightly
- os: windows
rust: 1.26.1
script:
- mv Cargo.lock.min Cargo.lock
- cargo build
- env: CARGO_CLIPPY=1
allow_failures:
- env: CARGO_CLIPPY=1
before_install:
- set -e
- |
if [ $TRAVIS_OS_NAME = windows ]; then
choco install windows-sdk-10.0
fi
if [[ ! -z "$CARGO_AUDIT" ]]; then
which cargo-audit || cargo install --debug cargo-audit
elif [[ ! -z "$CARGO_CLIPPY" ]]; then
rustup component add clippy
fi
script:
- |
if [[ ! -z "$CARGO_AUDIT" ]]; then
cargo check
cargo audit
elif [[ ! -z "$CARGO_CLIPPY" ]]; then
cargo clippy
else
cargo test
cargo test --release
fi
after_script: set +e
branches:
only:
- /^v\d+\.\d+\.\d+.*$/
- /^try-/
- main
- next