-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
executable file
·45 lines (37 loc) · 1.2 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
language: cpp
compiler: gcc
dist: trusty
notifications:
email: false
before_install:
# C++17
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
# C++17
- sudo apt-get install -qq g++-7 build-essential cmake wget
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-7 90
# install newer LCOV (apt version outdated and fails for new gcov).
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz
- sudo make -C lcov-1.11/ install
- which lcov
# Install coverals gem for uploading coverage to coveralls.
- gem install coveralls-lcov
before_script:
- lcov --version
- gcov --version
- g++ --version
- PARENTDIR=$(pwd)
- mkdir $PARENTDIR/build && cd $PARENTDIR/build
script:
- cd $PARENTDIR/build
- cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_VISUALIZER=OFF $PARENTDIR
- make
- make gtest
- make coverage
after_success:
- cd $PARENTDIR/build
- lcov --list coverage_out.info.cleaned # Show test report in travis log.
- coveralls-lcov coverage_out.info.cleaned # uploads to coveralls