Skip to content

Commit

Permalink
Include coverage in Travis build only for GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
lamyj committed May 26, 2015
1 parent a0f6ddb commit cb1b45e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ before_script:
- mkdir build
- cd build
- export BIN_DIR=$PWD
- cmake -D CMAKE_CXX_FLAGS:STRING="-std=c++0x --coverage" -D CMAKE_BUILD_TYPE:STRING=Debug ../
- CMAKE_CXX_FLAGS="-std=c++0x"
- if [ "${CC}" = "gcc" ]; then CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} --coverage"; fi
- cmake -D CMAKE_CXX_FLAGS:STRING="${CMAKE_CXX_FLAGS}" -D CMAKE_BUILD_TYPE:STRING=Debug ../
script:
- make -j $(nproc)
- ../tests/run.sh
after_success:
- coveralls --exclude examples --exclude tests --exclude-pattern '.*CMake[^/]+\.c(?:pp)?' --exclude-pattern "/usr/.*" --root=${SRC_DIR} --build-root ${BIN_DIR} | grep -vP "^File '.*'$" | grep -vP ":creating '.*'$" | grep -vP "^Lines executed:.*" | sed '/^$/d'
- if [ "${CC}" = "gcc" ]; then coveralls --exclude examples --exclude tests --exclude-pattern '.*CMake[^/]+\.c(?:pp)?' --exclude-pattern "/usr/.*" --root=${SRC_DIR} --build-root ${BIN_DIR} | grep -vP "^File '.*'$" | grep -vP ":creating '.*'$" | grep -vP "^Lines executed:.*" | sed '/^$/d'; fi

0 comments on commit cb1b45e

Please sign in to comment.