diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-14 19:03:35 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-14 19:03:35 +0100 |
commit | b10ac1d14b237eddebb24fb9721658603ed7de02 (patch) | |
tree | 64b181eaebbf8af0b019d5a34bf75105ad57c4bf /ci/script.sh | |
parent | d362db1c0d314838a546dacd3ddc0eca287ca4de (diff) | |
download | ads1x1x-async-b10ac1d14b237eddebb24fb9721658603ed7de02.tar.gz ads1x1x-async-b10ac1d14b237eddebb24fb9721658603ed7de02.tar.xz ads1x1x-async-b10ac1d14b237eddebb24fb9721658603ed7de02.zip |
Try lcov and codecov.io
Diffstat (limited to 'ci/script.sh')
-rw-r--r-- | ci/script.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ci/script.sh b/ci/script.sh index 9ad8677..6aada36 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -1,6 +1,11 @@ set -exo pipefail main() { + if [ ! -z $COVERAGE ] && [ $TRAVIS_RUST_VERSION = nightly ]; then + export CARGO_INCREMENTAL=0; + export RUSTFLAGS="-Zprofile -Ccodegen-units=1"; + fi + if [[ ! $TARGET =~ .*linux.* ]]; then sed -i "s/linux-embedded-hal/#linux-embedded-hal/g" Cargo.toml sed -i "s/embedded-hal-mock/#embedded-hal-mock/g" Cargo.toml @@ -18,7 +23,15 @@ main() { if [ -z $DISABLE_TESTS ] && [ $TRAVIS_RUST_VERSION = nightly ] && [[ $TARGET =~ .*linux.* ]]; then cargo test --target $TARGET $FEATURES + if [ ! -z $COVERAGE ]; then + zip -0 ccov.zip `find . \( -name "ads1x1x*.gc*" -o -name "llvmgcov.gc*" \) -print`; + grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore-dir "/*" > lcov.info; + bash <(curl -s https://codecov.io/bash) -f lcov.info; + fi + fi fi + + } main |