-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.travis.yml
More file actions
70 lines (66 loc) · 2.31 KB
/
.travis.yml
File metadata and controls
70 lines (66 loc) · 2.31 KB
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
60
61
62
63
64
65
66
67
68
69
70
dist: focal
language: c++
sudo: true
matrix:
include:
- os: linux
compiler: clang
env:
- CONAN_ARGS="-s arch=x86_64 -s build_type=Release -s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=11 --build"
- CXX=clang++-11
- CC=clang-11
- CMAKE_CXX_FLAGS="-Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage"
- CMAKE_EXE_LINKER_FLAGS="--coverage"
addons:
apt:
update: true
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-tools-11
- clang-11
- cmake
- lcov
- libboost1.71-all-dev
- os: linux
compiler: gcc
env:
- CONAN_ARGS="-s arch=x86_64 -s build_type=Release -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=10 --build"
- CXX=g++-10
- CC=gcc-10
- CMAKE_CXX_FLAGS="-Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage"
- CMAKE_EXE_LINKER_FLAGS="-coverage -lgcov"
addons:
apt:
update: true
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-10
- cmake
- lcov
- libboost1.71-all-dev
install:
- "[ $CXX = g++ ] && export CXX=g++-10 || true"
- "[ $CXX = clang++ ] && export CXX=clang++-11 || true"
before_script:
- sudo pip install conan
script:
- |
mkdir build
cd build
conan install ../.conan/conanfile_noboost.txt ${CONAN_ARGS}
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS}" -DUSE_CONAN_JSONCPP=ON -DUSE_CONAN_GTEST=ON ..
make -j
make test ARGS="-j -V"
after_success:
- |
if [ "$CXX" = "g++-10" ]; then
cd ${TRAVIS_BUILD_DIR}
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
lcov --list coverage.info #debug info
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
fi