Permalink
Browse files

Upload coverage results to the codecov service

  • Loading branch information...
1 parent a60e962 commit 390852ccc7b31cb3d7ee10fd6171fde3054dbd26 @steveire committed Apr 4, 2016
Showing with 12 additions and 2 deletions.
  1. +12 −2 .travis.yml
View
@@ -27,6 +27,8 @@ matrix:
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" QT_VERSION_MM=54 QT_VERSION_FULL=542
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" QT_VERSION_MM=53 QT_VERSION_FULL=532 CMAKE_VERSION_MM=3.1 CMAKE_VERSION_FULL=3.1.3
+ - os: linux
+ env: CONFIGS="Coverage" GENERATORS="Makefiles" COMPILERS="GNU"
before_install:
- if [ -z "$CMAKE_VERSION_MM" ]; then export CMAKE_VERSION_MM=3.4; fi
@@ -37,7 +39,7 @@ before_install:
sudo apt-add-repository --yes ppa:beineri/opt-qt${QT_VERSION_FULL}-trusty
&& sudo apt-get update -qq
&& sudo apt-get install -qq qt${QT_VERSION_MM}base qt${QT_VERSION_MM}script qt${QT_VERSION_MM}tools
- && sudo apt-get install -qq ninja-build clang
+ && sudo apt-get install -qq ninja-build clang lcov
&& export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM}
&& wget --no-check-certificate http://www.cmake.org/files/v${CMAKE_VERSION_MM}/cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh
&& sudo sh cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
@@ -109,7 +111,15 @@ script:
do
pushd build-$config-$generator-$compiler;
cmake --build . --config $build_config;
- ctest --output-on-failure && popd && continue;
+ if [ "$config" = "Coverage" ];
+ then
+ cmake --build . --target coverage 2>&1 | sed '/numeric in numeric gt/d';
+ pip install --user codecov;
+ codecov -X gcov fix --file=test_all.info;
+ popd && continue;
+ else
+ ctest --output-on-failure && popd && continue;
+ fi;
popd;
failure=1;
break;

0 comments on commit 390852c

Please sign in to comment.