language: rust
sudo: true
dist: trusty
matrix:
fast_finish: true
include:
- rust: stable
env: FEATURES="--no-default-features"
cache:
cargo: true
directories:
- $HOME/.m2/repository
- $HOME/.sonar
addons:
apt:
packages:
- binutils-dev
- libcurl4-openssl-dev
- zlib1g-dev
- libdw-dev
- libiberty-dev
- oracle-java8-installer
script:
- cargo build $FEATURES
- cargo test
after_success:
- 'TARGET=$HOME/kcov && mkdir $TARGET && export PATH=$TARGET/bin:$PATH &&
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$TARGET && make && make install && cd ../.. &&
ls target/debug && ls $TARGET/bin && echo $PATH'
- 'for file in target/debug/*; do
if [[ -x $file && -f $file ]]; then
mkdir -p "target/cov/$(basename $file)";
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
fi;
done'
- 'kcov --coveralls-id=$TRAVIS_JOB_ID --merge target/cov target/cov/*'
env:
global:
- RUST_BACKTRACE=1