Skip to content

Commit

Permalink
Support for codecov in .travis file (#82)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Jun 3, 2020
1 parent 7ee9605 commit 542ac0a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .travis.yml
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

0 comments on commit 542ac0a

Please sign in to comment.