From 4daa291b1bb1d3057fab881f43dfc050d3af7a34 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 2 Dec 2018 23:14:05 -0500 Subject: [PATCH] Don't always build code coverage --- .travis.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47b5ffc..e8c3665 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,21 +41,23 @@ script: after_script: set +e after_success: | # Build test coverage statistics - wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && \ - tar xzf master.tar.gz && \ - cd kcov-master && \ - mkdir build && \ - cd build && \ - cmake .. && \ - make && \ - make install DESTDIR=../../kcov-build && \ - rm -rf kcov-master && \ - for file in target/debug/*-*[^\.d]; do \ - mkdir -p "target/cov/$(basename $file)"; \ - ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; \ - done && \ - bash <(curl -s https://codecov.io/bash) && \ - echo "Uploaded code coverage" + if [ -z "$CODECOV" ]; 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 && \ + make install DESTDIR=../../kcov-build && \ + rm -rf kcov-master && \ + for file in target/debug/*-*[^\.d]; do \ + mkdir -p "target/cov/$(basename $file)"; \ + ./kcov-build/usr/local/bin/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 branches: only: