Skip to content

Commit

Permalink
Baseline coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisinternet committed Mar 9, 2017
1 parent cc8ffa2 commit bddf89c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
language: rust
cache: cargo
sudo: false
os:
- linux

rust:
- stable
- beta
- nightly

before_install:
- sudo apt-get update

addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev

after_success:
- cargo test --no-default-features
- ./travis-after-success.sh
15 changes: 15 additions & 0 deletions travis-after-success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ] && [ "$TRAVIS
export PATH=/home/travis/.cargo/bin:$PATH && \
cargo benchcmp benches-control benches-variable --threshold 7;
fi
if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && \
tar xzf master.tar.gz &&\
cd kcov-master && \
mkdir build && \
cd build && \
cmake .. && \
make && \
sudo make install && \
cd ../.. && \
rm -rf kcov-master && \
for file in target/debug/inflector-*; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && \
bash <(curl -s https://codecov.io/bash) && \
echo "Uploaded code coverage"
fi

0 comments on commit bddf89c

Please sign in to comment.