forked from borodziejciesla/transfer_function
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (42 loc) · 1.5 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
os: linux
dist: focal
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-10
- gcc-10
- lcov
cache: # see https://docs.travis-ci.com/user/caching/
- directories:
- $HOME/.cache
#before_install:
install:
# (fake) install dependencies (usually involves wget, configure, make, ...)
# install into cache folder (build binaries+headers only, no sources and do NOT build there)
- mkdir -p $HOME/.cache
- touch $HOME/.cache/mydependency.so
script:
- mkdir build
- cmake -S . -B build -DCMAKE_BUILD_TYPE=Coverage
- cmake --build build
- cd build
- make coverage
#- ./tests/transfer_function_tests
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 '/home/travis/build/borodziejciesla/transfer_function/build/*' '/home/travis/build/borodziejciesla/transfer_function/tests/*' '/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"
notifications: