Added coveralls support

This commit is contained in:
Matt Clarkson 2015-05-12 16:17:38 +01:00
parent 344775db63
commit ef47992125

View File

@ -4,6 +4,8 @@ language: cpp
# travis-ci.org more readable. # travis-ci.org more readable.
matrix: matrix:
include: include:
- compiler: gcc
env: COMPILER=g++-4.6 STD=c++0x BUILD_TYPE=Coverage
- compiler: gcc - compiler: gcc
env: COMPILER=g++-4.6 STD=c++0x BUILD_TYPE=Debug env: COMPILER=g++-4.6 STD=c++0x BUILD_TYPE=Debug
- compiler: gcc - compiler: gcc
@ -21,7 +23,19 @@ before_script:
- source .travis-setup.sh - source .travis-setup.sh
- mkdir build && cd build - mkdir build && cd build
install:
- if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
PATH=~/.local/bin:${PATH};
pip install --user --upgrade pip;
pip install --user cpp-coveralls;
fi
script: script:
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="-std=${STD}" - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="-std=${STD}"
- make - make
- make CTEST_OUTPUT_ON_FAILURE=1 test - make CTEST_OUTPUT_ON_FAILURE=1 test
after_success:
- if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
coveralls --include src --include include --gcov-options '\-lp' --root .. --build-root .;
fi