forked from OpenMS/OpenMS
-
Notifications
You must be signed in to change notification settings - Fork 0
358 lines (318 loc) · 12.8 KB
/
Copy pathopenms-ci.yml
File metadata and controls
358 lines (318 loc) · 12.8 KB
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# This is a basic workflow to help you get started with Actions
name: openms-ci
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ develop, add/openms_ci_thirdparty_tests ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-win:
runs-on: windows-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
with:
path: OpenMS
- name: Reduce PATH
run: echo "PATH=C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin;C:\Program Files\Java\jdk8u265-b01\bin;C:\ProgramData\kind;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\7;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.6' # 5.12.7 is broken https://bugreports.qt.io/browse/QTBUG-81715
host: 'windows' # default: win64_msvc2017_64
target: 'desktop'
install-deps: 'true'
modules: 'qtsvg'
cached: 'false'
# https://github.com/marketplace/actions/visual-studio-shell
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: Cache contrib
id: cache-contrib-win
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/OpenMS/contrib
key: ${{ runner.os }}-contrib
- name: Load contrib build
if: steps.cache-contrib-win.outputs.cache-hit != 'true'
run: |
cd OpenMS/contrib
curl -o contribbld.tar.gz https://abibuilder.informatik.uni-tuebingen.de/archive/openms/contrib/windows/x64/msvc-14.2/contrib_build.tar.gz
tar -xzf contribbld.tar.gz
rm contribbld.tar.gz
- name: Extract branch name
if: github.event_name == 'push'
shell: bash
run: |
ref=`jq --raw-output .ref "$GITHUB_EVENT_PATH"`
ref=${ref#"refs/heads/"}
ref=${ref#"refs/"}
ref=${ref//\//-}
echo "RUN_NAME=$ref" >> $GITHUB_ENV
id: extract_branch
- name: Extract PR number
if: github.event_name == 'pull_request'
shell: bash
run: echo "RUN_NAME=pr$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
id: extract_pr
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.8
with:
cmake-version: '3.20.x'
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/Windows/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Tests windows
shell: bash
run: |
cmake --version
#run openms tests
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
ctest --output-on-failure -V -S ../OpenMS/OpenMS/tools/travis/cibuild.cmake
FAILED_TEST=$(find $GITHUB_WORKSPACE/OpenMS/bld/ -name "Test.xml" -type f -exec grep "<Test Status=\"failed\">" -c {} \; )
if [ "$FAILED_TEST" -gt "0" ] ; then
echo "$FAILED_TEST tests failed"
exit -1
fi
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
CONTRIB_BUILD_DIRECTORY: "${{ github.workspace }}/OpenMS/contrib"
CI_PROVIDER: "GitHub-Actions"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-Windows-testClass-testTOPP"
OPENMS_CONTRIB_LIBS: "${{ github.workspace }}/OpenMS/contrib"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "Off"
USE_STATIC_BOOST: "On"
BUILD_FLAGS: "-p:CL_MPCount=2"
build-macos:
runs-on: macos-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
with:
path: OpenMS
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.7'
host: 'mac'
target: 'desktop'
install-deps: 'true'
modules: 'qtsvg'
cached: 'false'
- name: Install build tools
run: brew install autoconf automake libtool
- name: Cache contrib
id: cache-contrib-os
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/OpenMS/contrib
key: ${{ runner.os }}-contrib
- name: Load contrib build
if: steps.cache-contrib-os.outputs.cache-hit != 'true'
run: |
cd OpenMS/contrib
curl -o contribbld.tar.gz https://abibuilder.informatik.uni-tuebingen.de/archive/openms/contrib/macOS/10.15.5/x64/appleclang-11.0.0/contrib_build.tar.gz
tar -xzf contribbld.tar.gz
rm contribbld.tar.gz
- name: Fix contrib install names
shell: bash
run: |
for lib in $GITHUB_WORKSPACE/OpenMS/contrib/lib/*.dylib
do
install_name_tool -id $lib $lib
done
# create symlinks like brew https://github.com/Homebrew/homebrew-core/blob/master/Formula/qt.rb#L61
pushd $Qt5_Dir/include
for f in $Qt5_Dir/lib/*.framework/Headers
do
lnknm=$(basename "${f%/*}" ".framework")
ln -s $f $lnknm
done
for f in $Qt5_Dir/lib/*.framework/Versions/5/Qt*
do
install_name_tool -id $f $f
done
otool -L /Users/runner/work/OpenMS/Qt/5.12.7/clang_64/lib/QtCore.framework/Versions/5/QtCore
popd
- name: Extract branch name
if: github.event_name == 'push'
shell: bash
run: |
ref=`jq --raw-output .ref "$GITHUB_EVENT_PATH"`
ref=${ref#"refs/heads/"}
ref=${ref#"refs/"}
ref=${ref//\//-}
echo "RUN_NAME=$ref" >> $GITHUB_ENV
id: extract_branch
- name: Extract PR number
if: github.event_name == 'pull_request'
shell: bash
run: echo "RUN_NAME=pr$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
id: extract_pr
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/MacOS/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Build and test osx
run: |
export OS_PREFIX_PATH="${Qt5_Dir}/lib/cmake;${Qt5_Dir}"
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
## TODO allow changing of ctest build site in cmake
## TODO potentially parse some OS infos and add to build name
ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/travis/cibuild.cmake
FAILED_TEST=$(find $GITHUB_WORKSPACE/OpenMS/bld/ -name "Test.xml" -type f -exec grep "<Test Status=\"failed\">" -c {} \; )
if [ "$FAILED_TEST" -gt "0" ] ; then
echo "$FAILED_TEST tests failed"
exit -1
fi
env:
CONTRIB_BUILD_DIRECTORY: "${{ github.workspace }}/OpenMS/contrib"
CI_PROVIDER: "GitHub-Actions"
CMAKE_GENERATOR: "Unix Makefiles"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-macOS-testClass-testTOPP"
OPENMS_CONTRIB_LIBS: "${{ github.workspace }}/OpenMS/contrib"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "On"
USE_STATIC_BOOST: "Off"
BUILD_FLAGS: "-j3"
build-lnx:
runs-on: ubuntu-latest
continue-on-error: true
container: openms/manylinux:latest
steps:
# Cancels older builds if still running
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"
- uses: actions/checkout@v2
name: Checkout sources
with:
path: OpenMS
- name: Extract branch name
if: github.event_name == 'push'
shell: bash
run: |
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install jq
ref=`jq --raw-output .ref "$GITHUB_EVENT_PATH"`
ref=${ref#"refs/heads/"}
ref=${ref#"refs/"}
ref=${ref//\//-}
echo "RUN_NAME=$ref" >> $GITHUB_ENV
id: extract_branch
- name: Extract PR number
if: github.event_name == 'pull_request'
shell: bash
run: |
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install jq
echo "RUN_NAME=pr$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
id: extract_pr
# open step log to get ssh access
# If the CI has failed and the branch is ci-debug then start a tmate
# session. SSH rendezvous point is emited continuously in the job output.
# hack needed to fix apt dependency
# - name: "Debug: Package dependancies for tmate"
# run: |
# yum install -y xz
# ln -s /bin/true /bin/apt-get
#
# - name: "Debug: Start tmate"
# uses: mxschmitt/action-tmate@v3.3
# with:
# limit-access-to-actor: true
# sudo: false
- name: Install Xvfb package
run: |
yum -y install xorg-x11-server-Xvfb
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/Linux/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Build and test lnx
run: |
export OS_PREFIX_PATH="${Qt5_Dir}/lib/cmake;${Qt5_Dir}"
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
## TODO allow changing of ctest build site in cmake
## TODO potentially parse some OS infos and add to build name
## TODO allow changing Contrib path to get rid of the extra cmake file!
dbus-uuidgen > /var/lib/dbus/machine-id
xvfb-run ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/travis/cibuild.cmake
FAILED_TEST=$(find $GITHUB_WORKSPACE/OpenMS/bld/ -name "Test.xml" -type f -exec grep "<Test Status=\"failed\">" -c {} \; )
if [ "$FAILED_TEST" -gt "0" ] ; then
echo "$FAILED_TEST tests failed"
exit -1
fi
env:
CONTRIB_BUILD_DIRECTORY: "/contrib-build"
CI_PROVIDER: "GitHub-Actions"
CMAKE_GENERATOR: "Unix Makefiles"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-Ubuntu-testClass-testTOPP"
OPENMS_CONTRIB_LIBS: "${{ github.workspace }}/OpenMS/contrib"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "On"
USE_STATIC_BOOST: "Off"
BUILD_FLAGS: "-j2"