-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for codecov in .travis file (#82)
Signed-off-by: Jose Luis Rivero <[email protected]>
- Loading branch information
Showing
1 changed file
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,34 @@ | ||
sudo: required | ||
os: linux | ||
dist: trusty | ||
language: cpp | ||
addons: | ||
apt: | ||
update: true | ||
packages: lcov python3 cppcheck | ||
compiler: | ||
- gcc | ||
- clang | ||
env: | ||
- BUILD_TYPE=Debug | ||
- BUILD_TYPE=RelWithDebInfo | ||
- BUILD_TYPE=Debug COVERAGE=true CXXFLAGS="--coverage" | ||
jobs: | ||
exclude: | ||
- compiler: clang | ||
env: BUILD_TYPE=Debug COVERAGE=true CXXFLAGS="--coverage" | ||
script: | ||
- mkdir build | ||
- cd build | ||
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS=-Werror -DBUILD_TESTING=True .. | ||
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" -DBUILD_TESTING=True .. | ||
- make | ||
- make test ARGS="-VV" | ||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get install python3 cppcheck | ||
after_script: | ||
- sudo make install | ||
- pkg-config --modversion console_bridge | ||
- | | ||
if [[ $COVERAGE == true ]]; then | ||
lcov --capture --directory . --output-file coverage.info | ||
lcov --remove coverage.info */test/* --output-file coverage.info | ||
lcov --list coverage.info | ||
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports" | ||
fi |