.gitlab-ci.yml 17 KB
Newer Older
Adam Mercer's avatar
Adam Mercer committed
1
2
3
4
5
6
image: docker:latest

variables:
  DOCKER_DRIVER: overlay
#  GIT_DEPTH: 1
  BRANCH: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
7
8
  COMMIT: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
  NIGHTLY: $CI_REGISTRY_IMAGE:nightly
Adam Mercer's avatar
Adam Mercer committed
9
10
11
12
13
14
15
16
17
  TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
  LAL_DIR: $CI_PROJECT_DIR/opt/lalsuite

stages:
  - level0
  - level1
  - level2
  - level3
  - level4
18
  - docker
19
  - nightly
Adam Mercer's avatar
Adam Mercer committed
20
  - wheels
Leo Pound Singer's avatar
Leo Pound Singer committed
21
  - deploy
Adam Mercer's avatar
Adam Mercer committed
22
23
24
25

before_script:
  - ulimit -S -c 0
  - export VERBOSE="true"
Adam Mercer's avatar
Adam Mercer committed
26
  - export PATH=/usr/lib/ccache:/opt/local/libexec/ccache:$PATH
Adam Mercer's avatar
Adam Mercer committed
27
28
29
  - export CCACHE_DIR=${PWD}/ccache
  - export PKG_CONFIG_PATH=${LAL_DIR}/lib/pkgconfig
  - mkdir -p opt/lalsuite
30
  - if [ ${CI_PIPELINE_SOURCE} = "schedule" ] || [ ${CI_PIPELINE_SOURCE} = "web" ]; then EXTRA_CONFIG_FLAGS="--enable-nightly"; fi
Adam Mercer's avatar
Adam Mercer committed
31
32
33
34
35
36

cache:
  key: $CI_JOB_NAME
  paths:
    - ccache

Adam Mercer's avatar
Adam Mercer committed
37
38
39
40
41
42
43
#
# ci documentation
#

documentation:
  image: ligo/lalsuite-dev:stretch
  stage: level0
Adam Mercer's avatar
Adam Mercer committed
44
45
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
46
    - ./configure --enable-doxygen --prefix=${LAL_DIR}
Adam Mercer's avatar
Adam Mercer committed
47
    - make -j4 install-html
Adam Mercer's avatar
Adam Mercer committed
48
49
50
51
    - pushd ${LAL_DIR}/share/doc
    - cp lalsuite/index.html index.html
    - sed -i 's/..\/lal/lal/g' index.html
    - popd
Adam Mercer's avatar
Adam Mercer committed
52
  artifacts:
Adam Mercer's avatar
Adam Mercer committed
53
    expire_in: 18h
Adam Mercer's avatar
Adam Mercer committed
54
    paths:
Adam Mercer's avatar
Adam Mercer committed
55
      - ${LAL_DIR}/share/doc
Adam Mercer's avatar
Adam Mercer committed
56
57
  only:
    - pushes
Adam Mercer's avatar
Adam Mercer committed
58
    - web
Adam Mercer's avatar
Adam Mercer committed
59

Adam Mercer's avatar
Adam Mercer committed
60
61
62
#
# build rpms
#
Adam Mercer's avatar
Adam Mercer committed
63

Adam Mercer's avatar
Adam Mercer committed
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.levelN:rpm: &levelN-rpm-package
  image: ligo/lalsuite-dev:el7
  variables:
    RPM_BUILD_CPUS: 4
  script:
    - if [ -d rpmbuild ]; then yum -y install rpmbuild/RPMS/x86_64/*.rpm; fi
    - cd ${CI_JOB_NAME#level?:rpm:}
    - ./00boot
    - ./configure --enable-swig ${EXTRA_CONFIG_FLAGS}
    - make dist
    - rpmbuild -tb --define "_topdir $CI_PROJECT_DIR/rpmbuild" ${CI_JOB_NAME#level?:rpm:}-*.tar.xz
  artifacts:
    expire_in: 18h
    paths:
      - rpmbuild/RPMS/x86_64/${CI_JOB_NAME#level?:rpm:}-*.rpm
      - rpmbuild/RPMS/x86_64/python2-${CI_JOB_NAME#level?:rpm:}-*.rpm
  only:
    - pushes
    - schedules
    - tags
    - web
85

Adam Mercer's avatar
Adam Mercer committed
86
87
88
level0:rpm:lal:
  <<: *levelN-rpm-package
  stage: level0
Adam Mercer's avatar
Adam Mercer committed
89

Adam Mercer's avatar
Adam Mercer committed
90
91
level1:rpm:lalframe:
  <<: *levelN-rpm-package
Adam Mercer's avatar
Adam Mercer committed
92
  stage: level1
93
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
94
    - level0:rpm:lal
Adam Mercer's avatar
Adam Mercer committed
95

Adam Mercer's avatar
Adam Mercer committed
96
97
level1:rpm:lalmetaio:
  <<: *levelN-rpm-package
Adam Mercer's avatar
Adam Mercer committed
98
  stage: level1
99
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
100
    - level0:rpm:lal
Adam Mercer's avatar
Adam Mercer committed
101

Adam Mercer's avatar
Adam Mercer committed
102
103
level1:rpm:lalsimulation:
  <<: *levelN-rpm-package
Adam Mercer's avatar
Adam Mercer committed
104
  stage: level1
105
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
106
    - level0:rpm:lal
Adam Mercer's avatar
Adam Mercer committed
107

Adam Mercer's avatar
Adam Mercer committed
108
109
level2:rpm:lalburst:
  <<: *levelN-rpm-package
Adam Mercer's avatar
Adam Mercer committed
110
  stage: level2
111
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
112
113
114
    - level0:rpm:lal
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
Adam Mercer's avatar
Adam Mercer committed
115

Adam Mercer's avatar
Adam Mercer committed
116
117
level2:rpm:lalinspiral:
  <<: *levelN-rpm-package
Adam Mercer's avatar
Adam Mercer committed
118
  stage: level2
119
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
120
121
122
123
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
Adam Mercer's avatar
Adam Mercer committed
124

Adam Mercer's avatar
Adam Mercer committed
125
126
level2:rpm:lalpulsar:
  <<: *levelN-rpm-package
Adam Mercer's avatar
Adam Mercer committed
127
  stage: level2
128
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
129
    - level0:rpm:lal
Adam Mercer's avatar
Adam Mercer committed
130

Adam Mercer's avatar
Adam Mercer committed
131
132
133
level3:rpm:lalinference:
  <<: *levelN-rpm-package
  stage: level3
134
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
135
136
137
138
139
140
141
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
Adam Mercer's avatar
Adam Mercer committed
142

Adam Mercer's avatar
Adam Mercer committed
143
144
145
level4:rpm:lalapps:
  <<: *levelN-rpm-package
  stage: level4
146
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
147
148
149
150
151
152
153
154
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
    - level3:rpm:lalinference
Adam Mercer's avatar
Adam Mercer committed
155

Adam Mercer's avatar
Adam Mercer committed
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#
# docker container from RPMs
#

# build a nightly container from the RPMs
docker:nightly:el7:
  stage: docker
  before_script: []
  script:
    # add RPMs to directory to pass to docker
    - mkdir rpms && mv rpmbuild/RPMS/x86_64/*.rpm rpms
    - rm -rf rpmbuild*
    # build container and push to registry
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker build --pull -t $CI_REGISTRY_IMAGE/nightly:el7 --file .Dockerfile-el7.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/nightly:el7
172
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
173
174
175
176
177
178
179
180
181
182
183
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
    - level3:rpm:lalinference
    - level4:rpm:lalapps
  only:
    - schedules
Adam Mercer's avatar
Adam Mercer committed
184

Adam Mercer's avatar
Adam Mercer committed
185
186
187
188
189
190
191
192
193
194
195
196
# build a tagged container from the rpms
docker:tags:el7:
  stage: docker
  before_script: []
  script:
    # add RPMs to directory to pass to docker
    - mkdir rpms && mv rpmbuild/RPMS/x86_64/*.rpm rpms
    - rm -rf rpmbuild*
    # build container and push to registry
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker build --pull -t $CI_REGISTRY_IMAGE/$CI_COMMIT_TAG:el7 --file .Dockerfile-el7.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/$CI_COMMIT_TAG:el7
Adam Mercer's avatar
Adam Mercer committed
197
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
198
199
200
201
202
203
204
205
206
207
208
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
    - level3:rpm:lalinference
    - level4:rpm:lalapps
  only:
    - /^lalsuite-v.*$/
Adam Mercer's avatar
Adam Mercer committed
209

Adam Mercer's avatar
Adam Mercer committed
210
211
212
#
# build debs
#
Adam Mercer's avatar
Adam Mercer committed
213

Adam Mercer's avatar
Adam Mercer committed
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
.levelN:deb: &levelN-deb-package
  image: ligo/lalsuite-dev:stretch
  script:
    # install debs from artifacts
    - dpkg -i *.deb || true
    # make dist tarball
    - cd ${CI_JOB_NAME#level?:deb:}
    - ./00boot
    - ./configure --enable-swig ${EXTRA_CONFIG_FLAGS}
    - make dist
    # create orig tarball
    - PACKAGE=$(echo ${CI_JOB_NAME} | sed 's/.*://')
    - TARBALL="${PACKAGE}-*.tar.*"
    - SUFFIX=$(echo $TARBALL | sed 's/.*\.\(tar\..*\)/\1/')
    - VERSION=$(echo $TARBALL | sed 's/[^-]*-\(.*\)\.tar\..*/\1/' | tr '-' '~')
    - cd ${CI_PROJECT_DIR}
    - cp ${CI_JOB_NAME#level?:deb:}/${TARBALL} ${PACKAGE}_${VERSION}.orig.${SUFFIX}
    # update changelog
    - export DEBFULLNAME="GitLab"
    - export DEBEMAIL="gitlab@git.ligo.org"
    - tar xf ${CI_JOB_NAME#level?:deb:}/${TARBALL}
    - cd ${PACKAGE}-*
    - dch -v ${VERSION}-1 -b 'Rebuilt automatically on git.ligo.org CI'
    # build packages
    - debuild -us -uc -r
  artifacts:
    expire_in: 18h
    paths:
      - ${CI_JOB_NAME#level?:deb:}*.changes
      - ${CI_JOB_NAME#level?:deb:}*.deb
      - python*-${CI_JOB_NAME#level?:deb:}*.deb
      - ${CI_JOB_NAME#level?:deb:}*.dsc
      - ${CI_JOB_NAME#level?:deb:}*.orig.*
  only:
    - pushes
    - schedules
    - tags
    - web
Adam Mercer's avatar
Adam Mercer committed
252

Adam Mercer's avatar
Adam Mercer committed
253
254
255
level0:deb:lal:
  <<: *levelN-deb-package
  stage: level0
Adam Mercer's avatar
Adam Mercer committed
256

Adam Mercer's avatar
Adam Mercer committed
257
258
level1:deb:lalframe:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
259
260
  stage: level1
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
261
    - level0:deb:lal
Adam Mercer's avatar
Adam Mercer committed
262

Adam Mercer's avatar
Adam Mercer committed
263
264
level1:deb:lalmetaio:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
265
266
  stage: level1
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
267
    - level0:deb:lal
Adam Mercer's avatar
Adam Mercer committed
268

Adam Mercer's avatar
Adam Mercer committed
269
270
level1:deb:lalsimulation:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
271
272
  stage: level1
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
273
    - level0:deb:lal
Adam Mercer's avatar
Adam Mercer committed
274

Adam Mercer's avatar
Adam Mercer committed
275
276
level2:deb:lalburst:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
277
278
  stage: level2
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
279
280
281
    - level0:deb:lal
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
Adam Mercer's avatar
Adam Mercer committed
282

Adam Mercer's avatar
Adam Mercer committed
283
284
level2:deb:lalinspiral:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
285
286
  stage: level2
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
287
288
289
290
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
Adam Mercer's avatar
Adam Mercer committed
291

Adam Mercer's avatar
Adam Mercer committed
292
293
level2:deb:lalpulsar:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
294
295
  stage: level2
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
296
    - level0:deb:lal
Adam Mercer's avatar
Adam Mercer committed
297

Adam Mercer's avatar
Adam Mercer committed
298
299
level3:deb:lalinference:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
300
301
  stage: level3
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
302
303
304
305
306
307
308
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar
Adam Mercer's avatar
Adam Mercer committed
309

Adam Mercer's avatar
Adam Mercer committed
310
311
level4:deb:lalapps:
  <<: *levelN-deb-package
Adam Mercer's avatar
Adam Mercer committed
312
  stage: level4
313
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
314
315
316
317
318
319
320
321
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar
    - level3:deb:lalinference
Adam Mercer's avatar
Adam Mercer committed
322

Adam Mercer's avatar
Adam Mercer committed
323
324
325
326
327
328
329
330
#
# docker container from the debs
#

# build a nightly container from the debian packages
docker:nightly:stretch:
  stage: docker
  before_script: []
Adam Mercer's avatar
Adam Mercer committed
331
  script:
Adam Mercer's avatar
Adam Mercer committed
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
    # add deb packages to directory to pass to docker
    - mkdir debs && mv *.deb debs
    - rm *.changes *.dsc *.orig.*
    # build container and push to registry
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker build --pull -t $CI_REGISTRY_IMAGE/nightly:stretch --file .Dockerfile-stretch.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/nightly:stretch
  dependencies:
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar
    - level3:deb:lalinference
    - level4:deb:lalapps
Adam Mercer's avatar
Adam Mercer committed
349
350
351
  only:
    - schedules

Adam Mercer's avatar
Adam Mercer committed
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
# build a tagged container from the debian packages
docker:tags:stretch:
  stage: docker
  before_script: []
  script:
    # add deb packages to directory to pass to docker
    - mkdir debs && mv *.deb debs
    - rm *.changes *.dsc *.orig.*
    # build container and push to registry
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker build --pull -t $CI_REGISTRY_IMAGE/$CI_COMMIT_TAG:stretch --file .Dockerfile-stretch.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/$CI_COMMIT_TAG:stretch
  dependencies:
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar
    - level3:deb:lalinference
    - level4:deb:lalapps
  only:
    - /^lalsuite-v.*$/

#
# nightly builds
#

# compilers

nightly:clang:6:
  image: skymoo/ligo-lalsuite-clang:6
Adam Mercer's avatar
Adam Mercer committed
385
386
387
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
388
    - CC=clang-6.0 CXX=clang++-6.0 ./configure --enable-swig --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
389
390
391
392
393
394
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
395
396
nightly:clang:7:
  image: skymoo/ligo-lalsuite-clang:7
Adam Mercer's avatar
Adam Mercer committed
397
398
399
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
400
    - CC=clang-7 CXX=clang++-7 ./configure --enable-swig --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
401
402
403
404
405
406
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
407
408
nightly:clang:8:
  image: skymoo/ligo-lalsuite-clang:8
Adam Mercer's avatar
Adam Mercer committed
409
410
411
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
412
    - CC=clang-8 CXX=clang++-8 ./configure --enable-swig --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
413
    - make -j4 distcheck
414
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
415
416
417
418
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
419
420
nightly:gcc:7:
  image: skymoo/ligo-lalsuite-gcc:7
Adam Mercer's avatar
Adam Mercer committed
421
422
423
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
424
    - ./configure --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
425
    - make -j4 distcheck
426
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
427
428
429
430
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
431
432
433
# FIXME: allow failure due to #125
nightly:gcc:8:
  image: skymoo/ligo-lalsuite-gcc:8
Adam Mercer's avatar
Adam Mercer committed
434
435
436
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
437
    - :./configure --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
438
439
440
441
442
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web
Adam Mercer's avatar
Adam Mercer committed
443
  allow_failure: true
Adam Mercer's avatar
Adam Mercer committed
444

Adam Mercer's avatar
Adam Mercer committed
445
446
447
448
# debian

nightly:debian:jessie:
  image: ligo/lalsuite-dev:jessie
449
450
451
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
452
    - ./configure --enable-swig --enable-doxygen
453
454
455
456
457
458
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
459
460
461
462
# FIXME: Disable building of Octave SWIG bindings until SWIG-4.0.0 is
# available
# FIXME: allow failure due to #124
nightly:debian:buster:
Adam Mercer's avatar
Adam Mercer committed
463
464
  image: skymoo/ligo-lalsuite-dev:buster
  stage: nightly
465
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
466
467
  script:
    - ./00boot
468
    - ./configure --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
469
470
471
472
    - make -j4 distcheck
  only:
    - schedules
    - web
Adam Mercer's avatar
Adam Mercer committed
473
  allow_failure: true
Adam Mercer's avatar
Adam Mercer committed
474

Adam Mercer's avatar
Adam Mercer committed
475
# el7
Adam Mercer's avatar
Adam Mercer committed
476

Adam Mercer's avatar
Adam Mercer committed
477
478
nightly:rhel:el7-cr:
  image: ligo/lalsuite-dev:el7-cr
Adam Mercer's avatar
Adam Mercer committed
479
480
481
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
482
    - ./configure --enable-swig --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
483
    - make -j4 distcheck
Adam Mercer's avatar
Adam Mercer committed
484
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
485
486
487
488
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
489
490
nightly:rhel:sl7:
  image: ligo/lalsuite-dev:sl7
Adam Mercer's avatar
Adam Mercer committed
491
492
493
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
494
    - ./configure --enable-swig --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
495
    - make -j4 distcheck
496
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
497
498
499
500
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
501
502
# macOS

Adam Mercer's avatar
Adam Mercer committed
503
nightly:macos:highsierra:
Adam Mercer's avatar
Adam Mercer committed
504
  tags:
Adam Mercer's avatar
Adam Mercer committed
505
    - macos_highsierra
Adam Mercer's avatar
Adam Mercer committed
506
507
508
  stage: nightly
  script:
    - ./00boot
509
510
511
    # FIXME: disable building of Octave SWIG bindings until SWIG-4.0.0
    # is available
    - PYTHON=/opt/local/bin/python2.7 ./configure --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
512
513
514
515
516
517
518
    - make -j4
    - make -j4 check
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
519
520
521
522
523
524
nightly:macos:elcapitan:
  tags:
    - macos_elcapitan
  stage: nightly
  script:
    - ./00boot
525
526
527
    # FIXME: disable building of Octave SWIG bindings until SWIG-4.0.0
    # is available
    - PYTHON=/opt/local/bin/python2.7 ./configure --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
528
529
530
531
532
533
534
    - make -j4
    - make -j4 check
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
# ubuntu

# FIXME: allow failure due to #123
nightly:ubuntu:trusty:
  image: skymoo/ligo-lalsuite-dev:trusty
  stage: nightly
  script:
    - ./00boot
    - ./configure --disable-swig --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web
  allow_failure: true

# FIXME: allow failure due to #123
nightly:ubuntu:xenial:
  image: skymoo/ligo-lalsuite-dev:xenial
  stage: nightly
  script:
    - ./00boot
    - ./configure --disable-swig --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web
  allow_failure: true

nightly:ubuntu:bionic:
  image: skymoo/ligo-lalsuite-dev:bionic
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

# FIXME: allow failure due to #124
nightly:ubuntu:cosmic:
  image: skymoo/ligo-lalsuite-dev:cosmic
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web
  allow_failure: true

#
# python wheels
#

595
596
597
598
599
600
# Build receipe for standalone wheels on Linux
.nightly:wheel:manylinux1: &nightly-wheel-manylinux1
  # This container is derived from the official manylinux image provided by
  # python.org (see PEP 513), and includes all of the LALSuite
  # build-dependencies.
  image: containers.ligo.org/lscsoft/lalsuite-manylinux:master
Adam Mercer's avatar
Adam Mercer committed
601
  stage: wheels
602
603
  script:
    - PYPREFIX=/opt/python/$(echo ${CI_JOB_NAME} | sed 's/.*:\(.*\)-manylinux1/\1/')
604
    # Build wheel
605
    - ./00boot
606
    - ./configure PYTHON=${PYPREFIX}/bin/python --enable-mpi ${EXTRA_CONFIG_FLAGS}
607
    - make -j4 wheel
608
    # Bundle and fix up dependent shared libraries
609
    - auditwheel repair wheel/*.whl
610
611
612
    # Test
    - ${PYPREFIX}/bin/virtualenv test
    - source test/bin/activate
Leo Pound Singer's avatar
Leo Pound Singer committed
613
    - pip install wheelhouse/*
614
615
616
    - python -c 'import lal, lalframe, lalmetaio'
  dependencies: []
  only:
617
    - /^lalsuite-v.*$/
618
619
    - schedules
  artifacts:
Adam Mercer's avatar
Adam Mercer committed
620
    expire_in: 18h
621
622
623
624
625
626
    paths:
      - wheelhouse

# Build receipe for standalone wheels on macOS
.nightly:wheel:macos: &nightly-wheel-macos
  tags:
Adam Mercer's avatar
Adam Mercer committed
627
    - macos_elcapitan
Adam Mercer's avatar
Adam Mercer committed
628
  stage: wheels
629
630
631
632
633
  script:
    - PYVERS=$(echo ${CI_JOB_NAME} | sed 's/.*:cp\(.\)\(.\).*/\1.\2/')
    # Enter virtualenv so that we have a controlled version of Numpy
    - virtualenv-${PYVERS} env
    - source env/bin/activate
Leo Pound Singer's avatar
Leo Pound Singer committed
634
    - pip install git+https://github.com/lpsinger/delocate@fix-duplicate-libs glob2 'numpy==1.14.5;python_version>="3.7"' 'numpy==1.7.0;python_version<"3.7"'
635
    # Build wheel
636
    - ./00boot
Leo Pound Singer's avatar
Leo Pound Singer committed
637
    - ./configure PYTHON=$(which python${PYVERS}) --enable-mpi --enable-swig-python ${EXTRA_CONFIG_FLAGS} LDFLAGS=-Wl,-headerpad_max_install_names
638
    - make -j4 wheel
639
    # Bundle and fix up dependent shared libraries
640
    - delocate-wheel -v -w wheelhouse wheel/*.whl
641
642
643
    # Test
    - virtualenv-${PYVERS} test
    - source test/bin/activate
Leo Pound Singer's avatar
Leo Pound Singer committed
644
    - pip install wheelhouse/*
645
646
647
    - python -c 'import lal, lalframe, lalmetaio'
  dependencies: []
  only:
648
    - /^lalsuite-v.*$/
649
650
    - schedules
  artifacts:
Adam Mercer's avatar
Adam Mercer committed
651
    expire_in: 18h
652
653
654
    paths:
      - wheelhouse

655
# Build wheels for all supported platforms
656
657
658
659
660
661
662
663
664
665
nightly:wheel:cp27-cp27m-manylinux1:
  <<: *nightly-wheel-manylinux1
nightly:wheel:cp27-cp27mu-manylinux1:
  <<: *nightly-wheel-manylinux1
nightly:wheel:cp34-cp34m-manylinux1:
  <<: *nightly-wheel-manylinux1
nightly:wheel:cp35-cp35m-manylinux1:
  <<: *nightly-wheel-manylinux1
nightly:wheel:cp36-cp36m-manylinux1:
  <<: *nightly-wheel-manylinux1
Leo Pound Singer's avatar
Leo Pound Singer committed
666
667
nightly:wheel:cp37-cp37m-manylinux1:
  <<: *nightly-wheel-manylinux1
Adam Mercer's avatar
Adam Mercer committed
668
nightly:wheel:cp27-cp27m-macosx:
669
  <<: *nightly-wheel-macos
Adam Mercer's avatar
Adam Mercer committed
670
nightly:wheel:cp35-cp35m-macosx:
671
  <<: *nightly-wheel-macos
Adam Mercer's avatar
Adam Mercer committed
672
nightly:wheel:cp36-cp36m-macosx:
673
  <<: *nightly-wheel-macos
Leo Pound Singer's avatar
Leo Pound Singer committed
674
675
nightly:wheel:cp37-cp37m-macosx:
  <<: *nightly-wheel-macos
676

Adam Mercer's avatar
Adam Mercer committed
677
678
679
deploy:wheel:
  stage: deploy
  image: containers.ligo.org/lscsoft/lalsuite-manylinux:master
Adam Mercer's avatar
Adam Mercer committed
680
  variables:
Adam Mercer's avatar
Adam Mercer committed
681
    GIT_STRATEGY: none
682
  script:
Adam Mercer's avatar
Adam Mercer committed
683
684
685
686
687
    # exit if we're not running in the main namespace
    - if [[ ${CI_PROJECT_PATH} != "lscsoft/lalsuite" ]]; then echo "Not deploying."; exit 0; fi
    # TWINE_USERNAME and TWINE_PASSWORD are provided by CI secret variables
    - /opt/python/cp36-cp36m/bin/pip install twine
    - /opt/python/cp36-cp36m/bin/twine upload wheelhouse/*
688
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
689
690
691
692
693
694
695
696
697
698
    - nightly:wheel:cp27-cp27m-manylinux1
    - nightly:wheel:cp27-cp27mu-manylinux1
    - nightly:wheel:cp34-cp34m-manylinux1
    - nightly:wheel:cp35-cp35m-manylinux1
    - nightly:wheel:cp36-cp36m-manylinux1
    - nightly:wheel:cp37-cp37m-manylinux1
    - nightly:wheel:cp27-cp27m-macosx
    - nightly:wheel:cp35-cp35m-macosx
    - nightly:wheel:cp36-cp36m-macosx
    - nightly:wheel:cp37-cp37m-macosx
699
  only:
700
    - /^lalsuite-v.*$/
701
702
    - schedules

Adam Mercer's avatar
Adam Mercer committed
703
704
705
#
# documentation
#
706

Adam Mercer's avatar
Adam Mercer committed
707
708
709
710
711
712
713
714
pages:
  image: ligo/lalsuite-dev:stretch
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-doxygen --prefix=${LAL_DIR}
    - make -j4 install-html
    - cp -r ${LAL_DIR}/share/doc public/
Adam Mercer's avatar
Adam Mercer committed
715
716
717
718
    - pushd public
    - cp lalsuite/index.html index.html
    - sed -i 's/..\/lal/lal/g' index.html
    - popd
719
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
720
721
722
723
  artifacts:
    paths:
      - public
  only:
724
    - master@lscsoft/lalsuite
Adam Mercer's avatar
Adam Mercer committed
725
726
  except:
    - pushes
727
    - web