-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
38 lines (35 loc) · 985 Bytes
/
.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
sudo: false
language: cpp
compiler:
- clang
- gcc
before_install:
- pip install --user 'requests[security]'
- pip install --user cpp-coveralls
install:
- if [ "$CXX" = "g++" ]; then export COVERAGE=$COV; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- clang
env:
- BUILD_TYPE=Debug CXX_FLAGS=-std=c++03 COV=On
- BUILD_TYPE=Debug CXX_FLAGS=-std=c++11 COV=On
- BUILD_TYPE=Release CXX_FLAGS=-std=c++03
- BUILD_TYPE=Release CXX_FLAGS=-std=c++11
script:
- cmake . -DCOVERAGE=${COVERAGE} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CXX_FLAGS} && make && CTEST_OUTPUT_ON_FAILURE=1 make test
after_success: |
if [ "$CXX" = "g++-4.8" ]; then
export GCOV="gcov-4.8"
elif [ "$CXX" = "g++" ]; then
export GCOV="gcov"
fi
if [ -n "$GCOV" ] && [ -n "$COVERAGE" ]; then
coveralls --gcov ${GCOV} --gcov-options '\-lp'
fi