-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
39 lines (37 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
dist: trusty
sudo: require
language: cpp
os: linux
compiler:
- gcc
addons:
apt:
packages: lcov
script:
- mkdir build
- cd build
# Build and install the GTest
- git clone --branch release-1.10.0 https://github.com/google/googletest.git
- cd googletest
- mkdir build
- cd build
- cmake .. -DBUILD_SHARED_LIBS=ON -DINSTALL_GTEST=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr
- make
- sudo make install
- sudo ldconfig
- cd ../../
- cmake .. -DENABLE_TESTING=True
- make
- make test
after_success:
# Create lcov report
# Capture coverage info
- lcov --directory . --capture --output-file coverage.info
# Filter out system and extra files.
# To also not include test code in coverage add them with full path to the patterns: '*/tests/*'
- lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' --output-file coverage.info
# Output coverage data for debugging (optional)
- lcov --list coverage.info
# Uploading to CodeCov
# '-f' specifies file(s) to use and disables manual coverage gathering and file search which has already been done above
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"