Commit 1ccca28f authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

travis: enable code coverage for all linux test

parent 512e8ab6
......@@ -26,7 +26,7 @@ jobs:
include:
- os: linux
dist: xenial
env: CXX_COMPILER=g++-7 CXXSTD=c++17 WITH_COVERAGE=0
env: CXX_COMPILER=g++-7 CXXSTD=c++17
addons:
apt:
sources:
......@@ -36,7 +36,7 @@ jobs:
- g++-7
- os: linux
dist: xenial
env: CXX_COMPILER=g++-8 CXXSTD=c++17 WITH_COVERAGE=0
env: CXX_COMPILER=g++-8 CXXSTD=c++17
addons:
apt:
sources:
......@@ -46,7 +46,7 @@ jobs:
- g++-8
- os: linux
dist: xenial
env: CXX_COMPILER=g++-8 CXXSTD=c++17 WITH_COVERAGE=1
env: CXX_COMPILER=g++-8 CXXSTD=c++17
addons:
apt:
sources:
......@@ -55,7 +55,7 @@ jobs:
- *common_packages
- g++-8
- os: linux
env: CXX_COMPILER=clang++-6.0 CXXSTD=c++17 WITH_COVERAGE=0
env: CXX_COMPILER=clang++-6.0 CXXSTD=c++17
addons:
apt:
sources:
......@@ -66,7 +66,7 @@ jobs:
- clang-6.0
- g++-7
- os: linux
env: CXX_COMPILER=clang++-7 CXXSTD=c++17 WITH_COVERAGE=0
env: CXX_COMPILER=clang++-7 CXXSTD=c++17
addons:
apt:
sources:
......@@ -77,7 +77,7 @@ jobs:
- clang-7
- g++-7
- os: linux
env: CXX_COMPILER=clang++-8 CXXSTD=c++17 WITH_COVERAGE=0
env: CXX_COMPILER=clang++-8 CXXSTD=c++17
addons:
apt:
sources:
......@@ -89,7 +89,7 @@ jobs:
- g++-7
- os: osx
osx_image: xcode11.2
env: CXX_COMPILER=clang++ CXXSTD=c++17 WITH_COVERAGE=0
env: CXX_COMPILER=clang++ CXXSTD=c++17
before_install:
- pip install --user cpp-coveralls
......@@ -99,22 +99,16 @@ install:
- cd baryonyx
- mkdir build
- cd build
- if [ "$WITH_COVERAGE" = "0" ]; then CXXFLAGS="-std=$CXXSTD" cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo .. ; fi
- if [ "$WITH_COVERAGE" = "1" ]; then CXXFLAGS="-std=$CXXSTD -g -O0 --coverage -fprofile-arcs -ftest-coverage" cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None .. ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CXXFLAGS="-std=$CXXSTD" cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug .. ; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then CXXFLAGS="-std=$CXXSTD -g -O0 --coverage -fprofile-arcs -ftest-coverage" cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None .. ; fi
script:
- make
- sudo make install
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then gdb ./lib/testio -ex run -ex bt -ex kill -ex quit ; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then gdb ./lib/testlib -ex run -ex bt -ex kill -ex quit ; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then gdb ./lib/testsolver -ex run -ex bt -ex kill -ex quit ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ctest -V -R testio ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ctest -V -R testlib ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ctest -V -R testsolver ; fi
- if [ "$WITH_COVERAGE" = "1" ]; then ctest -E testoptimizer ; fi
- ctest -E testoptimizer
after_success:
- coveralls --gcov-options '\-lp'
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then coveralls -r .. --gcov-options '\-lp' ; fi
notifications:
email:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment