forked from poncateam/ponca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
115 lines (98 loc) · 2.7 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
108
109
110
111
112
113
114
language: cpp
dist: bionic
git:
submodules: false
depth: 10
cache:
directories:
env:
global:
- OMP_NUM_THREADS=4
- TIMEOUT=1000
- BUILD_TYPE=Release
- CTEST_OUTPUT_ON_FAILURE=1
- COMPILE_COVERAGE=OFF
- COMPILE_DOC=OFF
- COMPILE_EXAMPLES=ON
- COMPILE_TESTS=ON
script:
- |
if [ "$COMPILE_DOC" == "ON" ]; then
make ponca-doc
else
if [ "$COMPILE_COVERAGE" == "ON" ]; then
make buildtests
make test
lcov --capture --directory . --output-file coverage.info
# filter system-files, Eigen and tests
lcov --remove coverage.info '/usr/*' '*/external/eigen/*' --output-file coverage.info
lcov --list coverage.info # debug info
# Uploading report to CodeCov
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
else
make -j 2 buildtests
make test
make -j 4 ponca-examples
fi
fi
- make install
before_install:
- export CHECKOUT_PATH=`pwd`;
- eval "${MATRIX_EVAL}"
- export Ponca_RELEASE_NAME="Ponca-${APPVEYOR_REPO_TAG}-${TRAVIS_OS_NAME}-${CXX}"
- $CXX --version
- cmake --version
matrix:
allow_failures:
- env: ALLOW_FAILURE=true
fast_finish: true
include:
- stage: artefacts
os: linux
name: Documentation Generation
addons:
apt:
packages:
- cmake
- doxygen
- graphviz
env:
- MATRIX_EVAL="COMPILE_DOC=ON && COMPILE_EXAMPLES=OFF && COMPILE_TESTS=OFF"
- stage: artefacts
os: linux
name: Coverage Generation
addons:
apt:
packages:
- cmake
- g++-7
- lcov
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && COMPILE_COVERAGE=ON && COMPILE_EXAMPLES=OFF"
install:
- cd $CHECKOUT_PATH
- mkdir -p build
- cd build
- cmake .. -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=./installed -DPONCA_COVERAGE_TESTING=$COMPILE_COVERAGE -DPONCA_CONFIGURE_EXAMPLES=$COMPILE_EXAMPLES -DPONCA_CONFIGURE_DOC=$COMPILE_DOC -DPONCA_CONFIGURE_TESTS=$COMPILE_TESTS
after_success:
# safelist
branches:
except:
- gh-pages
before_deploy:
- zip --symlinks -r ${CHECKOUT_PATH}/build/${Ponca_RELEASE_NAME}.zip ${CHECKOUT_PATH}/build/installed/
deploy:
- provider: pages
skip_cleanup: true
local_dir: build/installed/share/doc/html/
github_token: $GITHUB_API_KEY
on:
branch: master
condition: $COMPILE_DOC = ON
- provider: releases
api_key: "GITHUB OAUTH TOKEN"
file: build/${Ponca_RELEASE_NAME}.zip
skip_cleanup: true
draft: true
on:
tags: true