language: rust
cache:
directories:
- $HOME/.cache
- $HOME/.cargo
- $HOME/.ccache
addons:
apt:
packages:
- binutils-dev
- libcurl4-openssl-dev
- libdw-dev
- libelf-dev
rust:
- stable
- nightly
matrix:
allow_failures:
- rust: nightly
before_script:
- which sccache || cargo install sccache
- export RUSTC_WRAPPER=`which sccache`
- which cargo-make || cargo install cargo-make
- curl -s https://raw.githubusercontent.com/orenbenkiki/scmf/master/install_kcov.sh | /bin/sh
script:
- export RUSTC_WRAPPER=`which sccache`
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then cargo make ci; else cargo make --skip-tasks 'format|rustfmt' ci; fi
- sccache --stop-server
after_success:
- test "$TRAVIS_RUST_VERSION" = "stable" && bash <(curl -s https://codecov.io/bash) && echo "Uploaded code coverage"