This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
190 lines (178 loc) · 5.99 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
185
186
187
188
189
190
language: cpp
os: linux
dist: bionic
branches:
only:
- main
- /\d+\.\d+.*/
except: gh-pages
env:
global:
- GH_REPO_NAME: ComPWA
- GH_REPO_REF: github.com/ComPWA/ComPWA-legacy.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
packages:
- libboost-all-dev
- tree
install:
- cd $BASEPATH
- cmake --version
- wget https://root.cern.ch/download/root_${ROOTBIN}.tar.gz
- tar xpvfz root_*.tar.gz > /dev/null 2>&1
- source root/bin/thisroot.sh
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCMAKE_INSTALL_PREFIX=$BASEPATH/_install $BASEPATH
- cmake --build . -- -j2
- ctest -j2 --output-on-failure
- cmake --build . --target install
- cd $BASEPATH/_install
- tree
jobs:
include:
- name: gcc5, ROOT v6.16 + coverity scan
os: linux
if: type != pull_request
dist: xenial
compiler: gcc
env:
- 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-leagcy
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 . -- -j2"
branch_pattern: main
script: True
- name: Build documentation (Doxygen + Sphinx)
os: linux
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-gui
- doxygen-latex
- graphviz
- python3
- python3-pip
install:
- python3 -m pip install --upgrade pip
- python3 -m pip install setuptools
- python3 -m pip install -r $BASEPATH/doc/requirements.txt
script:
- cd $BASEPATH/doc
- doxygen
- make html
before_deploy:
- cd $BASEPATH
- touch doc/doxyoutput/html/.nojekyll # for GitHub Pages
- openssl aes-256-cbc -K $encrypted_b276c14399d1_key -iv $encrypted_b276c14399d1_iv -in github_deploy_key.enc -out github_deploy_key -d
deploy:
strategy: git
provider: pages
keep_history: true
deploy_key: github_deploy_key
cleanup: false
edge: true
repo: ComPWA/ComPWA-legacy
target_branch: gh-pages
local_dir: "$BASEPATH/doc/doxyoutput/html"
verbose: true
on:
branch: main
- name: clang, ROOT v6.18
os: osx
osx_image: xcode10.2
env:
- ROOTBIN="v6.18.04.macosx64-10.14-clang100"
addons:
homebrew:
update: false
packages:
- boost
- tree
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCMAKE_INSTALL_PREFIX=$BASEPATH/_install $BASEPATH
- cmake --build . -- -j2
- echo "Skipping ctest on MacOS... The reason is that the precompiled ROOT libraries do not have RPATH set properly."
- cmake --build . --target install
- cd $BASEPATH/_install
- brew install tree
- tree
- name: gcc7, ROOT v6.16
os: linux
compiler: gcc
env:
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
- name: gcc5, ROOT v6.16 + code coverage
os: linux
dist: xenial
compiler: gcc # Xenial: gcc-5.4
env:
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
addons:
apt:
packages:
- libboost-all-dev
- lcov
- tree
script:
- mkdir $BASEPATH/build
- cd $BASEPATH/build
- cmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BASEPATH/_install $BASEPATH
- cmake --build . -- -j2
- ctest -j2 --output-on-failure
- cmake --build . --target install
- cd $BASEPATH/_install
- tree
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"
- name: clang7, ROOT v6.16
os: linux
compiler: clang
env:
- ROOTBIN="v6.16.00.Linux-ubuntu16-x86_64-gcc5.4"
- name: clang7, ROOT v6.16, DEBUG mode
os: linux
compiler: clang
env:
- 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 . -- -j2