forked from bsamseth/cpp-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (44 loc) · 1.28 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
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"
- os: osx
osx_image: xcode10.1
addons:
homebrew:
packages:
- lcov
update: true
env:
- MATRIX_EVAL="CXX_COMPILER=clang++"
before_install:
- eval "${MATRIX_EVAL}"
- PARENTDIR=$(pwd)
- mkdir $PARENTDIR/build
install:
- cd $PARENTDIR/build
- cmake $PARENTDIR -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_CXX_COMPILER=$CXX_COMPILER
- make
script:
- make coverage
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"