-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
59 lines (55 loc) · 1.59 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
59
language: cpp
jobs:
include:
# GCC 9
- os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-9
- g++-9
- cmake
env:
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
script:
# Setup lcov and dependencies
- sudo git clone https://github.com/linux-test-project/lcov.git
- cd lcov && sudo make install
- cd ..
- echo yes | cpan
- sudo perl -MCPAN -e 'install PerlIO::gzip'
- sudo cpan JSON
# Build
- cmake -DZBINARYREADER_CODE_COVERAGE=ON CMakeLists.txt
- cmake --build . --target
# Test
- ctest -VV
# Coverage
- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --capture --output-file coverage.info -gcov-tool /usr/bin/gcov-9
- lcov --remove coverage.info '/usr/*' --output-file coverage.info
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
# CLANG 9
- os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- clang-9
- cmake
- libc++-9-dev
- libc++abi-9-dev
env:
- MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
script:
- cmake -DZBINARYREADER_CODE_COVERAGE=ON -DCMAKE_CXX_FLAGS="-stdlib=libc++" CMakeLists.txt
- cmake --build . --target
- ctest
before_install:
- eval "${MATRIX_EVAL}"