.gitlab-ci.yml 21.4 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

37
# FIXME: remove schedules after package builds have been running for a while
38
.levelN:package: &levelN-package
Adam Mercer's avatar
Adam Mercer committed
39
  script:
Adam Mercer's avatar
Adam Mercer committed
40
    - cd ${CI_JOB_NAME#level?:*:}
Adam Mercer's avatar
Adam Mercer committed
41
    - ./00boot
42
    - ./configure --enable-swig --enable-doxygen --enable-mpi --prefix=${LAL_DIR}
Adam Mercer's avatar
Adam Mercer committed
43
    - make dist
Adam Mercer's avatar
Adam Mercer committed
44
    - cd ${CI_PROJECT_DIR}
Adam Mercer's avatar
Adam Mercer committed
45
    - tar xf ${CI_JOB_NAME#level?:*:}/lal*.tar.xz
46
    - cd lal*-*
47
48
49
    - mkdir -p subdir
    - cd subdir
    - ../configure --enable-swig --enable-doxygen --enable-mpi --prefix=${LAL_DIR}
Adam Mercer's avatar
Adam Mercer committed
50
    - make -j4 V=1
51
    - make -j4 V=1 VERBOSE=1 check
Adam Mercer's avatar
Adam Mercer committed
52
53
54
55
56
57
58
59
    - make -j4 install
    - make -j4 install-html
  artifacts:
    expire_in: 3h
    paths:
      - opt/lalsuite
  only:
    - pushes
60
    - schedules
Adam Mercer's avatar
Adam Mercer committed
61

Adam Mercer's avatar
Adam Mercer committed
62
63
.levelN:package:stretch: &levelN-package-stretch
  image: ligo/lalsuite-dev:stretch
64
  <<: *levelN-package
Adam Mercer's avatar
Adam Mercer committed
65
66
67

level0:stretch:lal:
  <<: *levelN-package-stretch
68
69
  stage: level0

Adam Mercer's avatar
Adam Mercer committed
70
71
level1:stretch:lalframe:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
72
  stage: level1
73
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
74
    - level0:stretch:lal
Adam Mercer's avatar
Adam Mercer committed
75

Adam Mercer's avatar
Adam Mercer committed
76
77
level1:stretch:lalmetaio:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
78
  stage: level1
79
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
80
    - level0:stretch:lal
Adam Mercer's avatar
Adam Mercer committed
81

Adam Mercer's avatar
Adam Mercer committed
82
83
level1:stretch:lalsimulation:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
84
  stage: level1
85
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
86
    - level0:stretch:lal
Adam Mercer's avatar
Adam Mercer committed
87

Adam Mercer's avatar
Adam Mercer committed
88
89
level1:stretch:lalxml:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
90
  stage: level1
91
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
92
    - level0:stretch:lal
Adam Mercer's avatar
Adam Mercer committed
93

Adam Mercer's avatar
Adam Mercer committed
94
95
level2:stretch:lalburst:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
96
  stage: level2
97
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
98
99
    - level1:stretch:lalmetaio
    - level1:stretch:lalsimulation
Adam Mercer's avatar
Adam Mercer committed
100

Adam Mercer's avatar
Adam Mercer committed
101
102
level2:stretch:lalinspiral:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
103
  stage: level2
104
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
105
106
107
    - level1:stretch:lalframe
    - level1:stretch:lalmetaio
    - level1:stretch:lalsimulation
Adam Mercer's avatar
Adam Mercer committed
108

Adam Mercer's avatar
Adam Mercer committed
109
110
level2:stretch:lalpulsar:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
111
  stage: level2
112
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
113
    - level0:stretch:lal
Adam Mercer's avatar
Adam Mercer committed
114

Adam Mercer's avatar
Adam Mercer committed
115
116
level2:stretch:lalstochastic:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
117
  stage: level2
118
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
119
    - level1:stretch:lalmetaio
Adam Mercer's avatar
Adam Mercer committed
120

Adam Mercer's avatar
Adam Mercer committed
121
122
level3:stretch:laldetchar:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
123
  stage: level3
124
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
125
    - level2:stretch:lalburst
Adam Mercer's avatar
Adam Mercer committed
126

Adam Mercer's avatar
Adam Mercer committed
127
128
level3:stretch:lalinference:
  <<: *levelN-package-stretch
Adam Mercer's avatar
Adam Mercer committed
129
  stage: level3
130
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
131
132
133
134
135
136
137
138
139
140
141
    - level2:stretch:lalburst
    - level2:stretch:lalinspiral
    - level2:stretch:lalpulsar

level4:stretch:lalapps:
  <<: *levelN-package-stretch
  stage: level4
  dependencies:
    - level2:stretch:lalstochastic
    - level3:stretch:laldetchar
    - level3:stretch:lalinference
Adam Mercer's avatar
Adam Mercer committed
142

Adam Mercer's avatar
Adam Mercer committed
143
144
.levelN:package:el7: &levelN-package-el7
  image: ligo/lalsuite-dev:el7
145
  <<: *levelN-package
Adam Mercer's avatar
Adam Mercer committed
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

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

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

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

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

level1:el7:lalxml:
  <<: *levelN-package-el7
  stage: level1
  dependencies:
    - level0:el7:lal

level2:el7:lalburst:
  <<: *levelN-package-el7
  stage: level2
  dependencies:
    - level1:el7:lalmetaio
    - level1:el7:lalsimulation

level2:el7:lalinspiral:
  <<: *levelN-package-el7
  stage: level2
  dependencies:
    - level1:el7:lalframe
    - level1:el7:lalmetaio
    - level1:el7:lalsimulation

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

level2:el7:lalstochastic:
  <<: *levelN-package-el7
  stage: level2
  dependencies:
    - level1:el7:lalmetaio

level3:el7:laldetchar:
  <<: *levelN-package-el7
  stage: level3
  dependencies:
    - level2:el7:lalburst

level3:el7:lalinference:
  <<: *levelN-package-el7
  stage: level3
  dependencies:
    - level2:el7:lalburst
    - level2:el7:lalinspiral
    - level2:el7:lalpulsar

level4:el7:lalapps:
  <<: *levelN-package-el7
Adam Mercer's avatar
Adam Mercer committed
218
  stage: level4
219
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
220
221
222
    - level2:el7:lalstochastic
    - level3:el7:laldetchar
    - level3:el7:lalinference
Adam Mercer's avatar
Adam Mercer committed
223

224
# FIXME: remove after package builds have been running for a while
225
docker:tags:
226
  stage: docker
227
228
229
  before_script: []
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
230
    - docker build --pull -t $TAG --file .Dockerfile.gitlab-ci .
231
232
    - docker push $TAG
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
233
    - level4:stretch:lalapps
234
235
236
  only:
    - tags

237
# FIXME: remove after package builds have been running for a while
238
docker:nightly:
239
  stage: docker
240
241
242
  before_script: []
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
243
    - docker build --pull -t $NIGHTLY --file .Dockerfile.gitlab-ci .
244
245
    - docker push $NIGHTLY
  dependencies:
Adam Mercer's avatar
Adam Mercer committed
246
    - level4:stretch:lalapps
247
248
249
250
251
  only:
    - master@lscsoft/lalsuite
    - schedules
  except:
    - pushes
252
    - web
253

Adam Mercer's avatar
Adam Mercer committed
254
255
nightly:top-level:jessie:
  image: ligo/lalsuite-dev:jessie
Adam Mercer's avatar
Adam Mercer committed
256
257
258
259
260
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-swig --enable-doxygen
    - make -j4 distcheck
261
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
262
263
264
265
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
266
267
268
269
270
271
272
273
274
275
276
277
nightly:top-level:el7-cr:
  image: ligo/lalsuite-dev:el7-cr
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-swig --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
278
279
280
281
282
283
284
285
286
287
288
289
nightly:top-level:sl7:
  image: ligo/lalsuite-dev:sl7
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-swig --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
290
291
292
293
294
295
296
nightly:top-level:trusty:
  image: skymoo/ligo-lalsuite-dev:trusty
  stage: nightly
  script:
    - ./00boot
    - ./configure --disable-swig --enable-doxygen
    - make -j4 distcheck
297
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
298
299
300
301
302
303
304
305
306
307
308
  only:
    - schedules
    - web

nightly:top-level:xenial:
  image: skymoo/ligo-lalsuite-dev:xenial
  stage: nightly
  script:
    - ./00boot
    - ./configure --disable-swig --enable-doxygen
    - make -j4 distcheck
309
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
310
311
312
313
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
314
315
316
317
318
319
320
321
322
323
324
325
nightly:top-level:bionic:
  image: skymoo/ligo-lalsuite-dev:bionic
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

326
327
328
329
330
331
332
333
334
335
336
337
nightly:top-level:cosmic:
  image: skymoo/ligo-lalsuite-dev:cosmic
  stage: nightly
  script:
    - ./00boot
    - ./configure --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

338
339
340
# FIXME: It seems that Octave on buster currently has a few bugs which
# cause the Octave bindings to fail, disable building the Octave SWIG
# bindings for the time being.
Adam Mercer's avatar
Adam Mercer committed
341
342
343
nightly:top-level:buster:
  image: skymoo/ligo-lalsuite-dev:buster
  stage: nightly
344
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
345
346
  script:
    - ./00boot
347
    - ./configure --enable-doxygen
Adam Mercer's avatar
Adam Mercer committed
348
349
350
351
352
    - make -j4 distcheck
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
353
354
355
356
357
358
359
360
361
362
363
364
nightly:top-level:clang:
  image: skymoo/ligo-lalsuite-clang:jessie
  stage: nightly
  script:
    - ./00boot
    - CC=clang CXX=clang++ ./configure --enable-swig --enable-doxygen
    - make -j4 distcheck
  dependencies: []
  only:
    - schedules
    - web

365
366
nightly:openmp:stretch:
  image: ligo/lalsuite-dev:stretch
Adam Mercer's avatar
Adam Mercer committed
367
  stage: nightly
368
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  script:
    - ./00boot
    - ./configure --enable-swig --enable-doxygen --enable-openmp
    - make -j4 distcheck
  only:
    - schedules
    - web

nightly:python3:stretch:
  image: ligo/lalsuite-dev:stretch
  stage: nightly
  script:
    - ./00boot
    - PYTHON=python3 ./configure --enable-swig --enable-doxygen
    - make -j4 distcheck
384
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
385
386
387
388
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
389
nightly:macos:highsierra:
Adam Mercer's avatar
Adam Mercer committed
390
  tags:
Adam Mercer's avatar
Adam Mercer committed
391
    - macos_highsierra
Adam Mercer's avatar
Adam Mercer committed
392
393
394
  stage: nightly
  script:
    - ./00boot
395
396
397
    # 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
398
399
400
401
402
403
404
    - make -j4
    - make -j4 check
  dependencies: []
  only:
    - schedules
    - web

Adam Mercer's avatar
Adam Mercer committed
405
406
407
408
409
410
nightly:macos:elcapitan:
  tags:
    - macos_elcapitan
  stage: nightly
  script:
    - ./00boot
411
412
413
    # 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
414
415
416
417
418
419
420
    - make -j4
    - make -j4 check
  dependencies: []
  only:
    - schedules
    - web

421
422
423
424
425
426
# 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
427
  stage: wheels
428
429
  script:
    - PYPREFIX=/opt/python/$(echo ${CI_JOB_NAME} | sed 's/.*:\(.*\)-manylinux1/\1/')
430
    # Build wheel
431
    - ./00boot
432
    # FIXME: laldetchar depends on glib >= 2.14, too new for manylinux1
433
    - ./configure PYTHON=${PYPREFIX}/bin/python --disable-laldetchar ${EXTRA_CONFIG_FLAGS}
434
    - make -j4 wheel
435
    # Bundle and fix up dependent shared libraries
436
    - auditwheel repair wheel/*.whl
437
438
439
440
441
442
443
    # Test
    - ${PYPREFIX}/bin/virtualenv test
    - source test/bin/activate
    - pip install -q wheelhouse/*
    - python -c 'import lal, lalframe, lalmetaio'
  dependencies: []
  only:
444
    - /^lalsuite-v.*$/
445
446
    - schedules
  artifacts:
447
    expire_in: 3h
448
449
450
451
452
453
    paths:
      - wheelhouse

# Build receipe for standalone wheels on macOS
.nightly:wheel:macos: &nightly-wheel-macos
  tags:
Adam Mercer's avatar
Adam Mercer committed
454
    - macos_elcapitan
Adam Mercer's avatar
Adam Mercer committed
455
  stage: wheels
456
457
458
459
460
461
462
  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 -q git+https://github.com/lpsinger/delocate@fix-duplicate-libs glob2 numpy==1.7.0
    # Build wheel
463
    - ./00boot
464
    - ./configure PYTHON=$(which python${PYVERS}) --enable-swig-python ${EXTRA_CONFIG_FLAGS} LDFLAGS=-Wl,-headerpad_max_install_names
465
    - make -j4 wheel
466
    # Bundle and fix up dependent shared libraries
467
    - delocate-wheel -v -w wheelhouse wheel/*.whl
468
469
470
471
472
473
474
    # Test
    - virtualenv-${PYVERS} test
    - source test/bin/activate
    - pip install -q wheelhouse/*
    - python -c 'import lal, lalframe, lalmetaio'
  dependencies: []
  only:
475
    - /^lalsuite-v.*$/
476
477
    - schedules
  artifacts:
478
    expire_in: 3h
479
480
481
    paths:
      - wheelhouse

482
# Build wheels for all supported platforms
483
484
485
486
487
488
489
490
491
492
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
Adam Mercer's avatar
Adam Mercer committed
493
nightly:wheel:cp27-cp27m-macosx:
494
  <<: *nightly-wheel-macos
Adam Mercer's avatar
Adam Mercer committed
495
nightly:wheel:cp35-cp35m-macosx:
496
  <<: *nightly-wheel-macos
Adam Mercer's avatar
Adam Mercer committed
497
nightly:wheel:cp36-cp36m-macosx:
498
499
  <<: *nightly-wheel-macos

Adam Mercer's avatar
Adam Mercer committed
500
501
502
503
504
.levelN:rpm: &levelN-rpm-package
  image: ligo/lalsuite-dev:el7
  variables:
    RPM_BUILD_CPUS: 4
  script:
505
    - rpm -ivh rpmbuild/RPMS/x86_64/lal*.rpm rpmbuild/RPMS/x86_64/python2-lal*.rpm || true
Adam Mercer's avatar
Adam Mercer committed
506
507
    - cd ${CI_JOB_NAME#level?:rpm:}
    - ./00boot
508
    - ./configure --enable-swig ${EXTRA_CONFIG_FLAGS}
Adam Mercer's avatar
Adam Mercer committed
509
510
511
512
513
514
    - make dist
    - rpmbuild -tb --define "_topdir $CI_PROJECT_DIR/rpmbuild" ${CI_JOB_NAME#level?:rpm:}-*.tar.xz
  artifacts:
    expire_in: 3h
    paths:
      - rpmbuild/RPMS/x86_64/${CI_JOB_NAME#level?:rpm:}-*.rpm
515
      - rpmbuild/RPMS/x86_64/python2-${CI_JOB_NAME#level?:rpm:}-*.rpm
Adam Mercer's avatar
Adam Mercer committed
516
517
  only:
    - schedules
518
    - tags
Adam Mercer's avatar
Adam Mercer committed
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
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
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
    - 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

level1:rpm:lalxml:
  <<: *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

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

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

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
    - level2:rpm:lalstochastic
    - level3:rpm:lalinference

614
# build a nightly container from the RPMs
615
docker:nightly:el7:
616
617
618
619
620
621
622
623
  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
624
625
    - docker build --pull -t $CI_REGISTRY_IMAGE/nightly:el7 --file .Dockerfile-el7.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/nightly:el7
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
  dependencies:
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level1:rpm:lalxml
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
    - level2:rpm:lalstochastic
    - level3:rpm:laldetchar
    - level3:rpm:lalinference
    - level4:rpm:lalapps
  only:
    - schedules
641
642

# build a tagged container from the RPMs
643
docker:tags:el7:
644
645
646
647
648
649
650
651
  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
652
653
    - 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
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
  dependencies:
    - level0:rpm:lal
    - level1:rpm:lalframe
    - level1:rpm:lalmetaio
    - level1:rpm:lalsimulation
    - level1:rpm:lalxml
    - level2:rpm:lalburst
    - level2:rpm:lalinspiral
    - level2:rpm:lalpulsar
    - level2:rpm:lalstochastic
    - level3:rpm:laldetchar
    - level3:rpm:lalinference
    - level4:rpm:lalapps
  only:
    - tags
669

670
671
672
673
674
675
676
677
.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
678
    - ./configure --enable-swig ${EXTRA_CONFIG_FLAGS}
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
    - 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 'Rebuilt automatically on git.ligo.org CI'
    # build packages
    - debuild -us -uc -r
  artifacts:
    expire_in: 3h
    paths:
      - ${CI_JOB_NAME#level?:deb:}*.changes
      - ${CI_JOB_NAME#level?:deb:}*.deb
Adam Mercer's avatar
Adam Mercer committed
700
      - python*-${CI_JOB_NAME#level?:deb:}*.deb
701
702
703
704
      - ${CI_JOB_NAME#level?:deb:}*.dsc
      - ${CI_JOB_NAME#level?:deb:}*.orig.*
  only:
    - schedules
705
    - tags
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
    - 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

level1:deb:lalxml:
  <<: *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

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

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

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
    - level2:deb:lalstochastic
    - level3:deb:lalinference

801
# build a nightly container from the debian packages
802
docker:nightly:stretch:
803
  stage: docker
804
805
806
807
808
809
810
  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
811
812
    - docker build --pull -t $CI_REGISTRY_IMAGE/nightly:stretch --file .Dockerfile-stretch.gitlab-ci .
    - docker push $CI_REGISTRY_IMAGE/nightly:stretch
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
  dependencies:
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level1:deb:lalxml
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar
    - level2:deb:lalstochastic
    - level3:deb:laldetchar
    - level3:deb:lalinference
    - level4:deb:lalapps
  only:
    - schedules
828
829

# build a tagged container from the debian packages
830
docker:tags:stretch:
831
832
833
834
835
836
837
838
  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
839
840
    - 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
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
  dependencies:
    - level0:deb:lal
    - level1:deb:lalframe
    - level1:deb:lalmetaio
    - level1:deb:lalsimulation
    - level1:deb:lalxml
    - level2:deb:lalburst
    - level2:deb:lalinspiral
    - level2:deb:lalpulsar
    - level2:deb:lalstochastic
    - level3:deb:laldetchar
    - level3:deb:lalinference
    - level4:deb:lalapps
  only:
    - tags
856

Adam Mercer's avatar
Adam Mercer committed
857
858
859
860
861
862
863
864
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
865
866
867
868
    - pushd public
    - cp lalsuite/index.html index.html
    - sed -i 's/..\/lal/lal/g' index.html
    - popd
869
  dependencies: []
Adam Mercer's avatar
Adam Mercer committed
870
871
872
873
  artifacts:
    paths:
      - public
  only:
874
    - master@lscsoft/lalsuite
Adam Mercer's avatar
Adam Mercer committed
875
876
  except:
    - pushes
877
    - web
Leo Pound Singer's avatar
Leo Pound Singer committed
878
879
880
881
882
883
884

deploy:wheel:
  stage: deploy
  image: containers.ligo.org/lscsoft/lalsuite-manylinux:master
  variables:
    GIT_STRATEGY: none
  script:
885
886
    # exit if we're not running in the main namespace
    - if [[ ${CI_PROJECT_PATH} != "lscsoft/lalsuite" ]]; then echo "Not deploying."; exit 0; fi
Leo Pound Singer's avatar
Leo Pound Singer committed
887
888
889
890
891
892
893
894
895
    # 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
Adam Mercer's avatar
Adam Mercer committed
896
897
898
    - nightly:wheel:cp27-cp27m-macosx
    - nightly:wheel:cp35-cp35m-macosx
    - nightly:wheel:cp36-cp36m-macosx
Leo Pound Singer's avatar
Leo Pound Singer committed
899
  only:
900
901
    - /^lalsuite-v.*$/
    - schedules