language: rust
cache: cargo
dist: trusty
os:
- linux
- osx
rust:
- stable
- beta
- nightly
matrix:
include:
- rust: stable
os: linux
sudo: true
env: SKIPTEST=true RUSTFLAGS="-C link-dead-code"
before_install:
- sudo apt-get update
addons:
apt:
packages:
- libssl-dev
before_script:
- |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
( ( cargo install clippy --force && export CLIPPY=true ) || export CLIPPY=false );
fi
- export PATH=$PATH:~/.cargo/bin
script:
- |
if [[ -z $SKIPTEST ]]; then
cargo build
cargo test
make test
fi
- |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" && $CLIPPY ]]; then
cargo clippy
fi
after_success:
- |
if [[ "$TRAVIS_RUST_VERSION" == "stable" && "$TRAVIS_OS_NAME" = linux ]]; then
bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
# Uncomment the following line for coveralls.io
# cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
# Uncomment the following two lines create and upload a report for codecov.io
travis_wait 30 cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
fi