.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 P. Singer's avatar
Leo P. 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# ci documentation
#

documentation:
  image: ligo/lalsuite-dev:stretch
  stage: level0
  script:
    - ./00boot
    - ./configure --enable-doxygen --prefix=${LAL_DIR}
    - make -j4 install-html
    - pushd ${LAL_DIR}/share/doc
    - cp lalsuite/index.html index.html
    - sed -i 's/..\/lal/lal/g' index.html
    - popd
  artifacts:
    expire_in: 18h
    paths:
      - ${LAL_DIR}/share/doc
  only:
    - pushes
    - web

60
61
62
#
# build rpms
#
63

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

level0:rpm:lal:
  <<: *levelN-rpm-package
  stage: level0

level1:rpm:lalframe:
  <<: *levelN-rpm-package
  stage: level1
  dependencies:
    - level0:rpm:lal

level1:rpm:lalmetaio:
  <<: *levelN-rpm-package
  stage: level1
  dependencies:
    - level0:rpm:lal

level1:rpm:lalsimulation:
  <<: *levelN-rpm-package
  stage: level1
  dependencies:
    - level0:rpm:lal

level2:rpm:lalburst:
  <<: *levelN-rpm-package
  stage: level2
  dependencies:
    - level0:rpm:lal
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation

level2:rpm:lalinspiral:
  <<: *levelN-rpm-package
  stage: level2
  dependencies:
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation

level2:rpm:lalpulsar:
  <<: *levelN-rpm-package
  stage: level2
  dependencies:
    - level0:rpm:lal

level3:rpm:lalinference:
  <<: *levelN-rpm-package
  stage: level3
  dependencies:
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar

level4:rpm:lalapps:
  <<: *levelN-rpm-package
  stage: level4
  dependencies:
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
    - level3:rpm:lalinference

156
157
158
159
#
# docker container from RPMs
#

160
# build a nightly container from the RPMs
161
docker:nightly:el7:
162
163
164
165
166
167
168
169
  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
170
171
    - docker build --pull -t $CI_REGISTRY_IMAGE/nightly:el7 --file .Dockerfile-el7.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/nightly:el7
172
173
174
175
176
177
178
179
180
181
182
183
  dependencies:
    - 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
184

185
# build a tagged container from the rpms
186
docker:tags:el7:
187
188
189
190
191
192
193
194
  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
195
196
    - 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
197
198
199
200
201
202
203
204
205
206
207
  dependencies:
    - 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:
208
    - /^lalsuite-v.*$/
209

210
211
212
213
#
# build debs
#

214
215
216
217
218
219
220
221
.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
222
    - ./configure --enable-swig ${EXTRA_CONFIG_FLAGS}
223
224
225
226
227
228
229
230
231
232
233
234
235
    - 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}-*
236
    - dch -v ${VERSION}-1 -b 'Rebuilt automatically on git.ligo.org CI'
237
238
239
    # build packages
    - debuild -us -uc -r
  artifacts:
Adam Mercer's avatar
Adam Mercer committed
240
    expire_in: 18h
241
242
243
    paths:
      - ${CI_JOB_NAME#level?:deb:}*.changes
      - ${CI_JOB_NAME#level?:deb:}*.deb
Adam Mercer's avatar
Adam Mercer committed
244
      - python*-${CI_JOB_NAME#level?:deb:}*.deb
245
246
247
      - ${CI_JOB_NAME#level?:deb:}*.dsc
      - ${CI_JOB_NAME#level?:deb:}*.orig.*
  only:
Adam Mercer's avatar
Adam Mercer committed
248
    - pushes
249
    - schedules
250
    - tags
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
    - web

level0:deb:lal:
  <<: *levelN-deb-package
  stage: level0

level1:deb:lalframe:
  <<: *levelN-deb-package
  stage: level1
  dependencies:
    - level0:deb:lal

level1:deb:lalmetaio:
  <<: *levelN-deb-package
  stage: level1
  dependencies:
    - level0:deb:lal

level1:deb:lalsimulation:
  <<: *levelN-deb-package
  stage: level1
  dependencies:
    - level0:deb:lal

level2:deb:lalburst:
  <<: *levelN-deb-package
  stage: level2
  dependencies:
    - level0:deb:lal
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation

level2:deb:lalinspiral:
  <<: *levelN-deb-package
  stage: level2
  dependencies:
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation

level2:deb:lalpulsar:
  <<: *levelN-deb-package
  stage: level2
  dependencies:
    - level0:deb:lal

level3:deb:lalinference:
  <<: *levelN-deb-package
  stage: level3
  dependencies:
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar

level4:deb:lalapps:
  <<: *levelN-deb-package
  stage: level4
  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

323
324
325
326
#
# docker container from the debs
#

327
# build a nightly container from the debian packages
328
docker:nightly:stretch:
329
  stage: docker
330
331
332
333
334
335
336
  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
337
338
    - docker build --pull -t $CI_REGISTRY_IMAGE/nightly:stretch --file .Dockerfile-stretch.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/nightly:stretch
339
340
341
342
343
344
345
346
347
348
349
350
  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:
    - schedules
351
352

# build a tagged container from the debian packages
353
docker:tags:stretch:
354
355
356
357
358
359
360
361
  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
362
    - docker build --pull -t $CI_REGISTRY_IMAGE/$CI_COMMIT_TAG:stretch --file .Dockerfile-stretch.gitlab-ci .
363
    - docker push $CI_REGISTRY_IMAGE/$CI_COMMIT_TAG:stretch
364
365
366
367
368
369
370
371
372
373
374
  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:
375
    - /^lalsuite-v.*$/
376

377
378
379
380
#
# nightly builds
#

Adam Mercer's avatar
Adam Mercer committed
381
382
# compilers

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

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

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

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

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

Adam Mercer's avatar
Adam Mercer committed
443
444
# debian

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

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

Adam Mercer's avatar
Adam Mercer committed
473
474
# el7

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

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

Adam Mercer's avatar
Adam Mercer committed
499
500
501
502
503
# macOS

nightly:macos:highsierra:
  tags:
    - macos_highsierra
504
505
506
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
507
508
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
    - make -j4
    - make -j4 check
512
  dependencies: []
513
514
515
516
  only:
    - schedules
    - web

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

Adam Mercer's avatar
Adam Mercer committed
533
534
# ubuntu

535
# FIXME: allow failure due to #123
Adam Mercer's avatar
Adam Mercer committed
536
nightly:ubuntu:trusty:
Adam Mercer's avatar
Adam Mercer committed
537
  image: skymoo/ligo-lalsuite-dev:trusty
538
539
540
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
541
    - ./configure --disable-swig --enable-doxygen
542
    - make -j4 distcheck
Adam Mercer's avatar
Adam Mercer committed
543
  dependencies: []
544
545
546
  only:
    - schedules
    - web
Adam Mercer's avatar
Adam Mercer committed
547
  allow_failure: true
548

549
# FIXME: allow failure due to #123
Adam Mercer's avatar
Adam Mercer committed
550
nightly:ubuntu:xenial:
Adam Mercer's avatar
Adam Mercer committed
551
  image: skymoo/ligo-lalsuite-dev:xenial
552
553
554
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
555
    - ./configure --disable-swig --enable-doxygen
556
557
558
559
560
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web
Adam Mercer's avatar
Adam Mercer committed
561
  allow_failure: true
562

Adam Mercer's avatar
Adam Mercer committed
563
nightly:ubuntu:bionic:
Adam Mercer's avatar
Adam Mercer committed
564
  image: skymoo/ligo-lalsuite-dev:bionic
565
566
567
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
568
569
    - ./configure --enable-doxygen
    - make -j4 distcheck
570
571
572
573
574
  dependencies: []
  only:
    - schedules
    - web

575
# FIXME: allow failure due to #124
Adam Mercer's avatar
Adam Mercer committed
576
nightly:ubuntu:cosmic:
Adam Mercer's avatar
Adam Mercer committed
577
  image: skymoo/ligo-lalsuite-dev:cosmic
578
579
580
  stage: nightly
  script:
    - ./00boot
Adam Mercer's avatar
Adam Mercer committed
581
582
    - ./configure --enable-doxygen
    - make -j4 distcheck
583
584
585
586
  dependencies: []
  only:
    - schedules
    - web
Adam Mercer's avatar
Adam Mercer committed
587
  allow_failure: true
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616

#
# python wheels
#

# 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
  stage: wheels
  script:
    - PYPREFIX=/opt/python/$(echo ${CI_JOB_NAME} | sed 's/.*:\(.*\)-manylinux1/\1/')
    # Build wheel
    - ./00boot
    - ./configure PYTHON=${PYPREFIX}/bin/python --enable-mpi ${EXTRA_CONFIG_FLAGS}
    - make -j4 wheel
    # Bundle and fix up dependent shared libraries
    - auditwheel repair wheel/*.whl
    # Test
    - ${PYPREFIX}/bin/virtualenv test
    - source test/bin/activate
    - pip install wheelhouse/*
    - python -c 'import lal, lalframe, lalmetaio'
  dependencies: []
  only:
    - /^lalsuite-v.*$/
    - schedules
Adam Mercer's avatar
Adam Mercer committed
617
  artifacts:
618
    expire_in: 18h
Adam Mercer's avatar
Adam Mercer committed
619
    paths:
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
      - wheelhouse

# Build receipe for standalone wheels on macOS
.nightly:wheel:macos: &nightly-wheel-macos
  tags:
    - macos_elcapitan
  stage: wheels
  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
    - 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"'
    # Build wheel
    - ./00boot
    - ./configure PYTHON=$(which python${PYVERS}) --enable-mpi --enable-swig-python ${EXTRA_CONFIG_FLAGS} LDFLAGS=-Wl,-headerpad_max_install_names
    - make -j4 wheel
    # Bundle and fix up dependent shared libraries
    - delocate-wheel -v -w wheelhouse wheel/*.whl
    # Test
    - virtualenv-${PYVERS} test
    - source test/bin/activate
    - pip install wheelhouse/*
    - python -c 'import lal, lalframe, lalmetaio'
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
645
  only:
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
    - /^lalsuite-v.*$/
    - schedules
  artifacts:
    expire_in: 18h
    paths:
      - wheelhouse

# Build wheels for all supported platforms
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
nightly:wheel:cp37-cp37m-manylinux1:
  <<: *nightly-wheel-manylinux1
666
667
668
669
670
671
672
673
#nightly:wheel:cp27-cp27m-macosx:
#  <<: *nightly-wheel-macos
#nightly:wheel:cp35-cp35m-macosx:
#  <<: *nightly-wheel-macos
#nightly:wheel:cp36-cp36m-macosx:
#  <<: *nightly-wheel-macos
#nightly:wheel:cp37-cp37m-macosx:
#  <<: *nightly-wheel-macos
Leo P. Singer's avatar
Leo P. Singer committed
674
675
676
677
678
679
680

deploy:wheel:
  stage: deploy
  image: containers.ligo.org/lscsoft/lalsuite-manylinux:master
  variables:
    GIT_STRATEGY: none
  script:
681
682
    # exit if we're not running in the main namespace
    - if [[ ${CI_PROJECT_PATH} != "lscsoft/lalsuite" ]]; then echo "Not deploying."; exit 0; fi
Leo P. Singer's avatar
Leo P. Singer committed
683
684
685
686
687
688
689
690
691
    # 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/*
  dependencies:
    - 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
Leo P. Singer's avatar
Leo P. Singer committed
692
    - nightly:wheel:cp37-cp37m-manylinux1
693
694
695
696
#    - nightly:wheel:cp27-cp27m-macosx
#    - nightly:wheel:cp35-cp35m-macosx
#    - nightly:wheel:cp36-cp36m-macosx
#    - nightly:wheel:cp37-cp37m-macosx
Leo P. Singer's avatar
Leo P. Singer committed
697
  only:
698
699
    - /^lalsuite-v.*$/
    - schedules
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725

#
# documentation
#

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/
    - pushd public
    - cp lalsuite/index.html index.html
    - sed -i 's/..\/lal/lal/g' index.html
    - popd
  dependencies: []
  artifacts:
    paths:
      - public
  only:
    - master@lscsoft/lalsuite
  except:
    - pushes
    - web