From ea1f32626180242ad31a6ca12e74d05ac5166a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 1 Apr 2018 14:36:55 +0200 Subject: [PATCH] Fix potential for false negative CI results on coverage collection --- .travis.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index fbf1c09d..b72865ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -232,27 +232,24 @@ before_script: # Regenerate single header file, so it is tested in the examples... - python scripts/generateSingleHeader.py - - | # Use Debug builds for running Valgrind and building examples - cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DUSE_CPP14=${CPP14} -DCATCH_USE_VALGRIND=${VALGRIND} -DCATCH_BUILD_EXAMPLES=${EXAMPLES} -DCATCH_ENABLE_COVERAGE=${COVERAGE} + - cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DUSE_CPP14=${CPP14} -DCATCH_USE_VALGRIND=${VALGRIND} -DCATCH_BUILD_EXAMPLES=${EXAMPLES} -DCATCH_ENABLE_COVERAGE=${COVERAGE} # Don't bother with release build for coverage build - cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DUSE_CPP14=${CPP14} + - cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DUSE_CPP14=${CPP14} script: - - | - cd Build-Debug - make -j 2 - CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2 + - cd Build-Debug + - make -j 2 + - CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2 # Coverage collection does not work for OS X atm - echo "${TRAVIS_OS_NAME}"; - echo "${COVERAGE}"; + - | if [[ "${TRAVIS_OS_NAME}" == "linux" ]] && [[ "${COVERAGE}" == "1" ]]; then make gcov make lcov bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports" fi - # Go to release build - cd ../Build-Release - make -j 2 - CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2 + - # Go to release build + - cd ../Build-Release + - make -j 2 + - CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2