forked from ComPWA/ComPWA-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
184 lines (172 loc) · 5.92 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
language: cpp
os: linux
# Blacklist
branches:
only:
- master
except: gh-pages
env:
global:
- GH_REPO_NAME: ComPWA
- GH_REPO_REF: github.com/ComPWA/ComPWA.git
- OMP_NUM_THREADS: 1
- LANG: en_US.UTF-8
- BASEPATH: $TRAVIS_BUILD_DIR
- ROOTSYS: $BASEPATH/root
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "I1LwO65P4q89f31HYnFlrlJ9yHyJ/QIAOXR5CtPfMo5FnestBtlQg6fX3p1vLNi5XdYXP4QpP51FFGJ5suz1aigC45JRaMzO98WQmMvIqYufrhkYej6lNevL0z/tHeI0aURH7N1SfSZaLwkepErssOsdjJAqP538ldA3Zz9g2gM="
- CODECOV_TOKEN: "2cf5be81-a194-49a5-a8ab-49123b181e2c"
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test # gcc up to 8.0
- llvm-toolchain-xenial-8
packages:
- gcc-7
- g++-7
- libboost-all-dev # Version 1.58 for xenial
install:
- cd $BASEPATH
- cmake --version
# ROOT
- wget https://root.cern.ch/download/root_${ROOTBIN}.tar.gz
- tar xpvfz root_*.tar.gz > /dev/null 2>&1
- source root/bin/thisroot.sh
jobs:
include:
- os: linux # coverity scan
if: type != pull_request
dist: xenial
compiler: gcc # Xenial: gcc-5.4
env:
- TASK="gcc5, ROOT v6.16 + coverity scan"
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
before_install:
# For some reason we have because travisCI
# does not execute the APT plugin for this instance.
- sudo apt-get update && sudo apt-get install -y libboost-all-dev
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-;
addons:
coverity_scan:
project:
name: "ComPWA/ComPWA"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "mkdir $BASEPATH/build-coverity; cd $BASEPATH/build-coverity; cmake -DCMAKE_BUILD_TYPE=Debug $BASEPATH;"
build_command: "cmake --build . -- -j 2"
branch_pattern: master
script: True
- os: linux # test Doxygen
dist: xenial
env:
- TASK="Build documentation"
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-gui
- doxygen-latex
- graphviz
install: true
script:
- cd $BASEPATH
- doxygen $BASEPATH/doc/Doxyfile
before_deploy:
- cd $BASEPATH
- touch doc/html/.nojekyll
- openssl aes-256-cbc -K $encrypted_b276c14399d1_key -iv $encrypted_b276c14399d1_iv -in github_deploy_key.enc -out github_deploy_key -d
deploy:
provider: pages
keep_history: true
deploy_key: github_deploy_key
cleanup: false
edge: true
repo: ComPWA/ComPWA
target_branch: gh-pages
local_dir: "$BASEPATH/doc/html"
verbose: true
on:
branch: master
- os: osx # test XCode build
osx_image: xcode10.2
env:
- TASK="clang, ROOT v6.18"
- ROOTBIN="v6.18.04.macosx64-10.14-clang100"
addons:
homebrew:
update: false
packages:
- boost
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCMAKE_INSTALL_PREFIX=$BASEPATH/../install $BASEPATH
- cmake --build . -- -j 2
# Do not run tests for osx since it will fail. The reason is that
# the precompiled ROOT libraries do not have RPATH set properly.
- make install
- os: linux # test gcc7 build
dist: xenial
compiler: gcc
env:
- TASK="gcc7, ROOT v6.16"
- CC=gcc-7
- CXX=g++-7
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
- os: linux # test gcc5 build + code coverage
dist: xenial
compiler: gcc # Xenial: gcc-5.4
env:
- TASK="gcc5, ROOT v6.16 + code coverage"
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
addons:
apt:
packages:
- libboost-all-dev # Version 1.58 for xenial
- lcov
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BASEPATH/../install $BASEPATH
- cmake --build . -- -j 2
- ctest -j 2 --output-on-failure
- make install
after_success:
- if [ -f "$BASEPATH/build-coverity/cov-int/scm_log.txt" ]; then
cat $BASEPATH/build-coverity/cov-int/scm_log.txt
fi # Print coverity log if exists
- cd $BASEPATH
# Create lcov report
- lcov --capture --directory . --output-file $BASEPATH/coverage.info
# ignore certain files
- lcov --remove $BASEPATH/coverage.info '/usr/*' '*/test/*' '*/ThirdParty/*' '*/root/include/*' --output-file $BASEPATH/coverage-filtered.info # filter system-files
- lcov --list $BASEPATH/coverage-filtered.info # debug info
# Uploading report to CodeCov
- bash <(curl -s https://codecov.io/bash) -f $BASEPATH/coverage-filtered.info || echo "Codecov did not collect coverage reports"
- os: linux # test clang7 build
dist: xenial
compiler: clang
env:
- TASK="clang7, ROOT v6.16"
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
- os: linux # test build in CMake Debug mode (clang)
dist: xenial
compiler: clang
env:
- TASK="clang7, ROOT v6.16, DEBUG"
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCMAKE_BUILD_TYPE=Debug $BASEPATH
- cmake --build . -- -j 2
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCMAKE_INSTALL_PREFIX=$BASEPATH/../install $BASEPATH
- cmake --build . -- -j 2
- ctest -j 2 --output-on-failure
- make install