forked from jinja2cpp/Jinja2Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (92 loc) · 2.94 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
language: cpp
dist: trusty
sudo: required
matrix:
include:
- os: linux
compiler: gcc
env: COMPILER=g++-5
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['cmake', 'g++-5']
- os: linux
compiler: gcc
env:
COMPILER=g++-6
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['cmake', 'g++-6']
- os: linux
compiler: gcc
env:
COMPILER=g++-6
COLLECT_COVERAGE=1
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['cmake', 'g++-6', 'lcov']
- os: linux
compiler: gcc
env: COMPILER=g++-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['cmake', 'g++-7']
- os: linux
compiler: gcc
env:
COMPILER=g++-7
CMAKE_CXX_FLAGS=-std=c++17
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['cmake', 'g++-7']
- os: linux
compiler: gcc
env:
COMPILER=g++-7
SYSTEM_BOOST_PACKAGE=YES
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['cmake', 'g++-7']
- os: linux
compiler: clang
env: COMPILER=clang++-5.0
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['cmake', 'clang-5.0', 'g++-6']
- os: linux
compiler: clang
env: COMPILER=clang++-6.0
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-6.0']
packages: ['cmake', 'clang-6.0', 'g++-6']
before_install:
- date -u
- uname -a
- if [[ "${SYSTEM_BOOST_PACKAGE}" != "" ]]; then sudo add-apt-repository -y ppa:samuel-bachmann/boost && sudo apt-get update -qq; fi
install:
- if [[ "${SYSTEM_BOOST_PACKAGE}" != "" ]]; then sudo apt-get install libboost1.60-all-dev; fi
script:
- export BUILD_TARGET="all"
- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
- if [[ "${BUILD_CONFIG}" == "" ]]; then export BUILD_CONFIG="Release"; fi
- if [[ "${COLLECT_COVERAGE}" != "" ]]; then export BUILD_CONFIG="Debug" && export CMAKE_OPTS="-DCOVERAGE_ENABLED=TRUE"; fi
- $CXX --version
- mkdir -p build && cd build
- cmake $CMAKE_OPTS -DCMAKE_BUILD_TYPE=$BUILD_CONFIG -DCMAKE_CXX_FLAGS=$CMAKE_CXX_FLAGS .. && cmake --build . --config $BUILD_CONFIG --target all -- -j4
- ctest -C $BUILD_CONFIG -V
after_success:
# Creating report
- echo "Uploading code coverate report"
- 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
# Uploading report to CodeCov
- bash <(curl -s https://codecov.io/bash) -t "225d6d7a-2b71-4dbe-bf87-fbf75eb7c119" || echo "Codecov did not collect coverage reports"
- fi