language: rust
sudo: false
dist: trusty
matrix:
fast_finish: true
include:
- rust: nightly
- rust: beta
- rust: stable
- rust: 1.10.0
cache:
apt: true
directories:
- target/debug/deps
- target/debug/build
script:
- cargo build
- cargo test
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- libiberty-dev
after_success:
- '[ $TRAVIS_RUST_VERSION = stable ] &&
LOCAL="~/.local" && export PATH=$LOCAL/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=$LOCAL .. && make && make install && cd ../.. &&
ls target/debug &&
RUSTFLAGS="-C link-dead-code" cargo test --no-run &&
for file in target/debug/parsip-*; do
if [[ "${file: -2}" != ".d" ]]; 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/*'