-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
482 lines (440 loc) · 13.8 KB
/
.gitlab-ci.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
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
#
# See the LICENSE.txt file in the Gmsh root directory for license information.
# Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
variables:
EXTRA_OPTION: ""
.ssh_config: &ssh_config
before_script:
- echo "$SSH_TOKEN" > ~/.ssh/id_rsa
- echo "Host *" > ~/.ssh/config
- echo "StrictHostKeyChecking no" >> ~/.ssh/config
- chmod 700 ~/.ssh/id_rsa ~/.ssh/config
# ----------------------------------------------
# Continuous integration builds for all branches
# ----------------------------------------------
linux_ci:
image: onelab/ubuntu20.04
script:
- mkdir build
- cd build
- export CXXFLAGS=-Werror
- cmake ..
- make -j 8
- make doc
- ctest -j 8 --output-on-failure
- valgrind --leak-check=full --error-exitcode=1 ./gmsh ../tutorials/t5.geo -3
tags:
- linux64
- docker
except:
- tags
linux_compatibility_ci:
image: onelab/ubuntu20.04
script:
- mkdir build
- cd build
- cmake -DDEFAULT=0 ..
- make -j 8
- cmake -DENABLE_PARSER=1 ..
- make -j 8
- cmake -DENABLE_POST=1 ..
- make -j 8
- cmake -DENABLE_MESH=1 -DENABLE_BUILD_DYNAMIC=1 -DENABLE_PRIVATE_API=1 -DENABLE_EIGEN=0 -DENABLE_WRAP_PYTHON=1 -DENABLE_PETSC=1 ..
- make -j 8
tags:
- linux64
- docker
except:
- tags
windows_ci:
script:
- md build
- cd build
- c:\cygwin64\bin\bash -c "/usr/bin/cmake -DCMAKE_PREFIX_PATH='/usr/local/opencascade;/usr/local;/usr/x86_64-w64-mingw32/sys-root/mingw' -DCMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++.exe -DCMAKE_Fortran_COMPILER=/usr/bin/x86_64-w64-mingw32-gfortran.exe -DCMAKE_RC_COMPILER=/usr/bin/x86_64-w64-mingw32-windres.exe -DBLAS_LAPACK_LIBRARIES='/usr/local/lib/libopenblas.a;-lgfortran;-lquadmath' -DENABLE_OS_SPECIFIC_INSTALL=1 .."
- c:\cygwin64\bin\bash -c "/usr/bin/make -j 8"
- c:\cygwin64\bin\bash -c "/usr/bin/ctest -j 8 --output-on-failure"
tags:
- windows64
- shared
except:
- tags
windows_msvc_ci:
script:
- md build
- cd build
- cmake -DENABLE_OPENMP=0 ..
- msbuild package.vcxproj
tags:
- windows64
- shared
except:
- tags
# ------------------------------------------
# Official Linux builds (master branch only)
# ------------------------------------------
.linux_official: &linux_official
only:
- master@gmsh/gmsh
<<: *ssh_config
script:
- mkdir build
- cd build
- cmake -DGMSH_HOST=gmsh.info -DENABLE_PETSC=1 -DPETSC_ARCH=real_mumps_seq -DPETSC_DIR=/petsc-3.14.4 ${EXTRA_OPTION} ..
- make package -j 8
- PKG=`ls gmsh-*.tar*`
- scp ${PKG} geuzaine@gmsh.info:.wwwgmsh/bin/Linux/${PKG/\.tar\.gz/\.tgz}
- ctest -j 8 --output-on-failure
tags:
- linux64
- docker
linux_official_snapshot:
image: onelab/debian.stretch.64bit
variables:
EXTRA_OPTION: "-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++"
<<: *linux_official
except:
- tags
linux_official_release:
image: onelab/debian.stretch.64bit
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1 -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++"
<<: *linux_official
only:
- /^gmsh_.*$/
linux-sdk_official_snapshot:
image: onelab/debian.stretch.64bit
variables:
EXTRA_OPTION: "-DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *linux_official
except:
- tags
artifacts:
paths:
- build/_CPack_Packages/
- build/version.txt
expire_in: 1day
linux-sdk_official_release:
image: onelab/debian.stretch.64bit
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *linux_official
only:
- /^gmsh_.*$/
artifacts:
paths:
- build/_CPack_Packages/
- build/version.txt
expire_in: 1day
linux-nox-sdk_official_snapshot:
image: onelab/debian.stretch.64bit
variables:
EXTRA_OPTION: "-DGMSH_EXTRA_VERSION=-nox -DENABLE_FLTK=0 -DENABLE_OCC_CAF=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *linux_official
except:
- tags
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
# --------------------------------------------
# Official Windows builds (master branch only)
# --------------------------------------------
.windows_official: &windows_official
only:
- master@gmsh/gmsh
script:
- md build
- cd build
- c:\cygwin64\bin\bash -c "/usr/bin/cmake -DGMSH_HOST=gmsh.info -DCMAKE_PREFIX_PATH='/usr/local;/usr/x86_64-w64-mingw32/sys-root/mingw' -DCMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++.exe -DCMAKE_Fortran_COMPILER=/usr/bin/x86_64-w64-mingw32-gfortran.exe -DCMAKE_RC_COMPILER=/usr/bin/x86_64-w64-mingw32-windres.exe -DENABLE_OS_SPECIFIC_INSTALL=1 -DENABLE_PETSC=1 -DPETSC_ARCH=real_mumps_seq -DPETSC_DIR=/home/geuzaine/src/petsc ${EXTRA_OPTION} .."
- c:\cygwin64\bin\bash -c "/usr/bin/make package -j 4"
- c:\cygwin64\bin\bash -c "/usr/bin/scp -o StrictHostKeyChecking=no -i /home/geuzaine/.ssh/id_rsa gmsh-*.zip geuzaine@gmsh.info:.wwwgmsh/bin/Windows/"
- c:\cygwin64\bin\bash -c "/usr/bin/ctest -j 4 --output-on-failure"
windows_official_snapshot:
<<: *windows_official
tags:
- windows64
- official
except:
- tags
windows_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1"
<<: *windows_official
tags:
- windows64
- official
only:
- /^gmsh_.*$/
windows-sdk_official_snapshot:
variables:
EXTRA_OPTION: "-DENABLE_OS_SPECIFIC_INSTALL=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *windows_official
tags:
- windows64
- official
except:
- tags
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
windows-sdk_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1 -DENABLE_OS_SPECIFIC_INSTALL=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *windows_official
tags:
- windows64
- official
only:
- /^gmsh_.*$/
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
# ------------------------------------------
# Official macOS builds (master branch only)
# ------------------------------------------
.macos_official: &macos_official
only:
- master@gmsh/gmsh
script:
- mkdir build
- cd build
- cmake -DGMSH_HOST=gmsh.info -DENABLE_CAIRO=0 -DENABLE_OS_SPECIFIC_INSTALL=1 -DENABLE_PETSC=1 -DPETSC_ARCH=real_mumps_seq -DPETSC_DIR=/Users/geuzaine/src/petsc ${EXTRA_OPTION} ..
- make package -j 4
- PKG=`ls gmsh-*.[dt][ma][gr]*`
- python3 ../utils/misc/notarize.py --package ${PKG} --username cgeuzaine@ulg.ac.be --primary-bundle-id org.geuz.Gmsh --password "@keychain:Gmsh Notarization"
- scp ${PKG} geuzaine@gmsh.info:.wwwgmsh/bin/macOS/${PKG/\.tar\.gz/\.tgz}
- ctest -j 4 --output-on-failure
macosx_official_snapshot:
<<: *macos_official
tags:
- macos64
- official
except:
- tags
macosx_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1"
<<: *macos_official
tags:
- macos64
- official
only:
- /^gmsh_.*$/
macosx-sdk_official_snapshot:
variables:
EXTRA_OPTION: "-DENABLE_OS_SPECIFIC_INSTALL=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *macos_official
tags:
- macos64
- official
except:
- tags
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
macosx-sdk_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1 -DENABLE_OS_SPECIFIC_INSTALL=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *macos_official
tags:
- macos64
- official
only:
- /^gmsh_.*$/
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
macosarm_official_snapshot:
<<: *macos_official
tags:
- macos64arm
- official
except:
- tags
macosarm_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1"
<<: *macos_official
tags:
- macos64arm
- official
only:
- /^gmsh_.*$/
macosarm-sdk_official_snapshot:
variables:
EXTRA_OPTION: "-DENABLE_OS_SPECIFIC_INSTALL=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *macos_official
tags:
- macos64arm
- official
except:
- tags
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
macosarm-sdk_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1 -DENABLE_OS_SPECIFIC_INSTALL=0 -DENABLE_BUILD_DYNAMIC=1 -DINSTALL_SDK_README=1"
<<: *macos_official
tags:
- macos64arm
- official
only:
- /^gmsh_.*$/
artifacts:
paths:
- build/_CPack_Packages/
expire_in: 1day
# ----------------------------------------------
# Official source snapshots (master branch only)
# ----------------------------------------------
.source_official: &source_official
image: onelab/ubuntu20.04
only:
- master@gmsh/gmsh
<<: *ssh_config
script:
- mkdir build_src
- cd build_src
- cmake ${EXTRA_OPTION} ..
- make package_source
- PKG=`ls gmsh-*.tar*`
- scp ${PKG} geuzaine@gmsh.info:.wwwgmsh/src/${PKG/\.tar\.gz/\.tgz}
tags:
- linux64
- docker
source_official_snapshot:
<<: *source_official
except:
- tags
source_official_release:
variables:
EXTRA_OPTION: "-DGMSH_RELEASE=1"
<<: *source_official
only:
- /^gmsh_.*$/
# ----------------------------------------------
# Official documentation (master branch only)
# ----------------------------------------------
doc_official_snapshot:
stage: .post
image: onelab/ubuntu20.04
only:
- master@gmsh/gmsh
<<: *ssh_config
script:
- mkdir build_doc
- cd build_doc
- cmake ..
- make doc
- scp gmsh-*-doc.tgz geuzaine@gmsh.info:.wwwgmsh/doc.tgz
- ssh geuzaine@gmsh.info "cd .wwwgmsh/dev && tar zxvf ../doc.tgz"
tags:
- linux64
- docker
except:
- tags
doc_official_release:
stage: .post
image: onelab/ubuntu20.04
only:
- master@gmsh/gmsh
<<: *ssh_config
script:
- mkdir build_doc
- cd build_doc
- cmake -DGMSH_RELEASE=1 ..
- make doc
- scp gmsh-*-doc.tgz geuzaine@gmsh.info:.wwwgmsh/doc.tgz
- ssh geuzaine@gmsh.info "cd .wwwgmsh && tar zxvf doc.tgz"
- scp ../doc/gmsh.html geuzaine@gmsh.info:.wwwgmsh/
tags:
- linux64
- docker
only:
- /^gmsh_.*$/
# ----------------------------------------------
# Cookbook
# ----------------------------------------------
doc_cookbook:
stage: .post
image: onelab/ubuntu20.04
only:
- gmsh/gmsh
<<: *ssh_config
script:
- mdbook build doc/cookbook
- scp -r doc/cookbook/book geuzaine@gmsh.info:.wwwgmsh/doc/cookbook
tags:
- linux64
- docker
# ----------------------------------------------
# PyPi package
# ----------------------------------------------
pypi_official_snapshot:
stage: .post
image: onelab/ubuntu20.04
only:
- master@gmsh/gmsh
<<: *ssh_config
dependencies:
- linux-sdk_official_snapshot
- linux-nox-sdk_official_snapshot
- windows-sdk_official_snapshot
- macosx-sdk_official_snapshot
- macosarm-sdk_official_snapshot
script:
- cd build
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Linux/TGZ/gmsh-git-Linux64-sdk/ manylinux1_x86_64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Linux/TGZ/gmsh-nox-git-Linux64-sdk/ manylinux1_x86_64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/CYGWIN/ZIP/gmsh-git-Windows64-sdk/ win_amd64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Darwin/TGZ/gmsh-git-MacOSX-sdk/ macosx_10_15_x86_64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Darwin/TGZ/gmsh-git-MacOSARM-sdk/ macosx_12_0_arm64
- scp gmsh-*.dev1+nox*.whl geuzaine@gmsh.info:.wwwgmsh/python-packages-dev-nox/gmsh/
- scp gmsh-*.dev1-*.whl geuzaine@gmsh.info:.wwwgmsh/python-packages-dev/gmsh/
tags:
- linux64
- docker
except:
- tags
pypi_official_release:
stage: .post
image: onelab/ubuntu20.04
only:
- master@gmsh/gmsh
<<: *ssh_config
dependencies:
- linux-sdk_official_release
- windows-sdk_official_release
- macosx-sdk_official_release
- macosarm-sdk_official_release
script:
- echo "[distutils]" > ~/.pypirc
- echo "index-servers = pypi" >> ~/.pypirc
- echo "[pypi]" >> ~/.pypirc
- echo "username = __token__" >> ~/.pypirc
- echo "password = $PYPI_TOKEN" >> ~/.pypirc
- cd build
- VERSION=`cat version.txt`
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Linux/TGZ/gmsh-${VERSION}-Linux64-sdk/ manylinux1_x86_64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/CYGWIN/ZIP/gmsh-${VERSION}-Windows64-sdk/ win_amd64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Darwin/TGZ/gmsh-${VERSION}-MacOSX-sdk/ macosx_10_15_x86_64
- python3 ../utils/pypi/sdktowheel.py _CPack_Packages/Darwin/TGZ/gmsh-${VERSION}-MacOSARM-sdk/ macosx_12_0_arm64
- scp gmsh*.whl geuzaine@gmsh.info:.wwwgmsh/python-packages/gmsh/
- twine upload gmsh*.whl
- ssh geuzaine@gmsh.info "cd .wwwgmsh/bin/Linux && rm -f gmsh-stable-Linux64* && ln -s gmsh-${VERSION}-Linux64.tgz gmsh-stable-Linux64.tgz && ln -s gmsh-${VERSION}-Linux64-sdk.tgz gmsh-stable-Linux64-sdk.tgz"
- ssh geuzaine@gmsh.info "cd .wwwgmsh/bin/Windows && rm -f gmsh-stable-Windows64* && ln -s gmsh-${VERSION}-Windows64.zip gmsh-stable-Windows64.zip && ln -s gmsh-${VERSION}-Windows64-sdk.zip gmsh-stable-Windows64-sdk.zip"
- ssh geuzaine@gmsh.info "cd .wwwgmsh/bin/macOS && rm -f gmsh-stable-MacOSX* && ln -s gmsh-${VERSION}-MacOSX.dmg gmsh-stable-MacOSX.dmg && ln -s gmsh-${VERSION}-MacOSX-sdk.tgz gmsh-stable-MacOSX-sdk.tgz"
- ssh geuzaine@gmsh.info "cd .wwwgmsh/bin/macOS && rm -f gmsh-stable-MacOSARM* && ln -s gmsh-${VERSION}-MacOSARM.dmg gmsh-stable-MacOSARM.dmg && ln -s gmsh-${VERSION}-MacOSARM-sdk.tgz gmsh-stable-MacOSARM-sdk.tgz"
- ssh geuzaine@gmsh.info "cd .wwwgmsh/src && rm -f gmsh-stable-source.tgz && ln -s gmsh-${VERSION}-source.tgz gmsh-stable-source.tgz"
tags:
- linux64
- docker
only:
- /^gmsh_.*$/