-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (50 loc) · 1.78 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
48
49
50
51
52
53
54
55
56
57
58
language: cpp
dist: xenial
notifications:
email: false
# Define builds on mulitple OS/compiler combinations.
# Feel free to add/remove entries from this list.
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
#- lcov
- g++-7
env:
- MATRIX_EVAL="CXX_COMPILER=g++-7; sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-7 90"
- MATRIX_EVAL_COVERALLS="pip install --user cpp-coveralls;"
- os: osx
osx_image: xcode10.1
#addons:
# homebrew:
# packages:
# - lcov
# update: true
env:
- MATRIX_EVAL="CXX_COMPILER=clang++"
- MATRIX_EVAL_COVERALLS="brew install pyenv; eval \"$(pyenv init -)\"; pyenv install 2.7.6; pyenv global 2.7.6; pyenv rehash; pip install coveralls; pip install cpp-coveralls; pyenv rehash;"
before_install:
- eval "${MATRIX_EVAL}"
- eval "${MATRIX_EVAL_COVERALLS}"
- PARENTDIR=$(pwd)
- mkdir $PARENTDIR/build
install:
- cd $PARENTDIR/build
- cmake $PARENTDIR -DCMAKE_BUILD_TYPE=Coverage -DBUILD_DEBUG_LEVEL=2 -DCMAKE_CXX_COMPILER=$CXX_COMPILER
- make
script:
- make coverage
after_success:
- cd $PARENTDIR
- coveralls -e 'build/CMakeFiles' -e 'build/Testing' -e 'build/lib' -e 'build/bin' --gcov-options '\-lp'
#after_success:
# - cd $PARENTDIR/build
# - lcov --list coverage_out.info.cleaned # Show test report in travis log.
# # Install coverals gem for uploading coverage to coveralls.
# - gem install coveralls-lcov
# - coveralls-lcov coverage_out.info.cleaned # uploads to coveralls
# - bash <(curl -s https://codecov.io/bash) -f coverage_out.info.cleaned || echo "Codecov did not collect coverage reports"