forked from jinja2cpp/Jinja2Cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
67 lines (66 loc) · 2.47 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
---
dist: xenial
language: cpp
sudo: required
matrix:
include:
-
compiler: clang
env: COMPILER='clang++'
os: osx
osx_image: xcode9
-
compiler: clang
env: COMPILER='clang++'
os: osx
osx_image: xcode10
-
compiler: clang
env: COMPILER='clang++'
os: osx
osx_image: xcode11
-
addons:
apt:
packages:
- cmake
- g++-6
- lcov
sources:
- ubuntu-toolchain-r-test
compiler: gcc
env: "COMPILER=g++-6 COLLECT_COVERAGE=1"
os: linux
-
addons:
apt:
packages:
- cmake
- clang-8
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-8
compiler: clang
env: "COMPILER=clang++-8 EXTRA_FLAGS=-DJINJA2CPP_CXX_STANDARD=17 SANITIZE_BUILD=address+undefined"
os: linux
before_install:
- "date -u"
- "uname -a"
script:
- "export BUILD_TARGET=\"all\""
- "export CMAKE_OPTS=\"-DCMAKE_VERBOSE_MAKEFILE=OFF\""
- "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=\"${CMAKE_OPTS} -DJINJA2CPP_WITH_COVERAGE=ON\"; fi"
- "if [[ \"${SANITIZE_BUILD}\" != \"\" ]]; then export BUILD_CONFIG=\"RelWithDebInfo\" && export CMAKE_OPTS=\"${CMAKE_OPTS} -DJINJA2CPP_WITH_SANITIZERS=${SANITIZE_BUILD}\"; fi"
- "$CXX --version"
- "mkdir -p build && cd build"
- "cmake $CMAKE_OPTS -DCMAKE_BUILD_TYPE=$BUILD_CONFIG -DCMAKE_CXX_FLAGS=$CMAKE_CXX_FLAGS -DJINJA2CPP_DEPS_MODE=internal $EXTRA_FLAGS .. && cmake --build . --config $BUILD_CONFIG --target all -- -j4"
- "ctest -C $BUILD_CONFIG -V"
after_success:
- "if [[ \"${COLLECT_COVERAGE}\" != \"\" ]]; then echo \"Uploading code coverate report\" ; fi"
- "if [[ \"${COLLECT_COVERAGE}\" != \"\" ]]; then lcov --directory . --capture --output-file coverage.info ; fi"
- "if [[ \"${COLLECT_COVERAGE}\" != \"\" ]]; then lcov --remove coverage.info '/usr/*' --output-file coverage.info ; fi"
- "if [[ \"${COLLECT_COVERAGE}\" != \"\" ]]; then lcov --list coverage.info ; fi"
- "if [[ \"${COLLECT_COVERAGE}\" != \"\" ]]; then bash <(curl -s https://codecov.io/bash) -t \"225d6d7a-2b71-4dbe-bf87-fbf75eb7c119\" || echo \"Codecov did not collect coverage reports\"; fi"