Try to add codecov
This commit is contained in:
parent
5038624bbf
commit
fe18c56f81
2 changed files with 38 additions and 1 deletions
20
.travis.yml
20
.travis.yml
|
@ -7,4 +7,22 @@ matrix:
|
|||
allow_failures:
|
||||
- rust: nightly
|
||||
fast_finish: true
|
||||
cache: cargo
|
||||
cache:
|
||||
cargo: true
|
||||
directories:
|
||||
- kcov-master
|
||||
dist: trusty
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libcurl4-openssl-dev
|
||||
- libelf-dev
|
||||
- libdw-dev
|
||||
- cmake
|
||||
- gcc
|
||||
- binutils-dev
|
||||
- zlib1g-dev
|
||||
- libiberty-dev
|
||||
|
||||
script: cargo test && ./coverage.sh
|
19
coverage.sh
Executable file
19
coverage.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
||||
tar xzf master.tar.gz &&
|
||||
mkdir -p kcov-master/build &&
|
||||
cd kcov-master/build &&
|
||||
cmake .. &&
|
||||
make &&
|
||||
sudo make install &&
|
||||
cd ../.. &&
|
||||
for file in target/debug/*-*[^\.d]; do
|
||||
if [[ -x "$file" ]]
|
||||
then
|
||||
filename=$(basename $file)
|
||||
mkdir -p "target/cov/$filename"
|
||||
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$filename" "$file"
|
||||
fi
|
||||
done &&
|
||||
bash <(curl -s https://codecov.io/bash) &&
|
||||
echo "Uploaded code coverage"
|
Loading…
Add table
Reference in a new issue