-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (41 loc) · 1.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
language: cpp
sudo: false
os:
- linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
matrix:
include:
- os: linux
compiler: gcc
env: CONFIG=Debug COVERAGE=0
- os: linux
compiler: gcc
env: CONFIG=Release COVERAGE=0
- os: linux
compiler: clang
env: CONFIG=Debug COVERAGE=0
- os: linux
compiler: clang
env: CONFIG=Release COVERAGE=0
- os: linux
compiler: gcc
sudo: required
env: CONFIG=Debug COVERAGE=1
before_install:
- if [ $COVERAGE -eq 1 ]; then sudo pip install codecov gcovr; fi
# Select gcc-8 toolchain
install:
- if [ "$CXX" = "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90; fi
- if [ "$CXX" = "g++" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90; fi
- if [ "$CXX" = "g++" ]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-8 90; fi
script:
- set -e
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=$CONFIG -DENABLE_COVERAGE=$COVERAGE .. && make -j
- ctest --output-on-failure
- if [ $COVERAGE -eq 1 ]; then make apolo-coverage && codecov -X gcov search -f apolo-coverage.xml; fi