sudo: required
language: rust
matrix:
fast_finish: true
include:
- rust: nightly
- rust: beta
- rust: stable
script:
- cargo test
cache:
directories:
- /home/travis/.cargo
addons:
apt:
packages:
- libssl-dev
install: |
rustup toolchain install nightly
if [[ "$TRAVIS_RUST_VERSION" == stable ]] && [[ $(cargo +nightly tarpaulin --version) != *0.6.2 ]]; then
`RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo +nightly install --force --version 0.6.2 cargo-tarpaulin`
fi
after_success:
- '[ $TRAVIS_EVENT_TYPE != "cron" ] &&
[ $TRAVIS_RUST_VERSION = stable ] &&
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
cargo +nightly tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID || true'
- '[ $TRAVIS_RUST_VERSION = stable ] &&
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ]
&& cargo doc --no-deps &&
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d / -f 2`/index.html>" > target/doc/index.html &&
pip install --user ghp-import &&
/home/travis/.local/bin/ghp-import -n target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages &&
echo "documented"'