forked from lscsoft/lalsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
1798 lines (1666 loc) · 47 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
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
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
614
615
616
617
618
619
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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
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
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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# ----------------------------------------------------------------------
# LALSuite: Gitlab-CI configuration
#
# This file is complicated, but hopefully robust. If you have any
# questions, please email [email protected], or open a question
# ticket at https://git.ligo.org/lscsoft/lalsuite/-/issues/
# ----------------------------------------------------------------------
# -- setup --------------------------------------
stages:
- tarballs
# build packages for each subpackage
- LAL
- LALFrame
- LALMetaIO
- LALSimulation
- LALBurst
- LALInspiral
- LALInference
- LALPulsar
- LALApps
- wheels
# end-to-end tests
- integration tests
- compiler tests
- platform tests
- upgrade tests
# build containers
- docker
# quality checks
- coverage
- lint
# documentation
- documentation
# deploy packages
- deploy
include:
# include job templates from the gitlab-ci-templates repo
# see https://computing.docs.ligo.org/gitlab-ci-templates/
- project: computing/gitlab-ci-templates
file:
# helpers for codequality jobs
- codequality.yml
# helpers for debian builds
- debian.yml
# helpers for RHEL builds
- rhel.yml
# a flake8 job template
- python.yml
# CI rules
- local: '/.gitlab/ci/rules.yml'
# build packages for each subpackage
- local: '/.gitlab/ci/pkg.yml'
# end-to-end tests
- local: '/.gitlab/ci/compilers.yml'
# build containers
- local: '/.gitlab/ci/containers.yml'
# quality checks
- local: '/.gitlab/ci/lint.yml'
# documentation
- local: '/.gitlab/ci/docs.yml'
# deploy packages
# -- global settings ----------------------------
# by default cache everything in the .cache directory
cache:
key: "${CI_JOB_NAME}"
paths:
- .cache
variables:
# run autoreconf in pedantic and loud mode
AUTORECONF: "autoreconf --verbose --warnings=error"
# version of python to use for builds
LALSUITE_PYTHON_VERSION: "3.10"
# gitlab runners have 4 cores per job
CPU_COUNT: 4
# don't need git history
GIT_DEPTH: 1
# global build helpers
VERBOSE: "true"
# where to store files, ideally everything that is 'cache'
# should go under ${CI_PROJECT_DIR}/.cache to match the
# cache key setting above
XDG_CONFIG_HOME: "${CI_PROJECT_DIR}/.config"
XDG_CACHE_HOME: "${CI_PROJECT_DIR}/.cache"
CCACHE_DIR: "${CI_PROJECT_DIR}/.cache/ccache"
CONDA_PKGS_DIRS: "${CI_PROJECT_DIR}/.cache/conda/pkgs"
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pipe"
# where to build conda environments (i.e. not in ~/.conda)
CONDA_ENVS_PATH: "${CI_PROJECT_DIR}/envs"
# what file to use for conda configuration
CONDARC: "${CI_PROJECT_DIR}/.condarc"
# tell mamba to not display the huge ascii-art banner
MAMBA_NO_BANNER: 1
# default parameters for jobs
default:
# retry running jobs on failure
retry: 1
# cancel job when a newer pipeline starts
interruptible: true
# -- templates ----------------------------------
.print-env: &print-env
echo "===== env ====="; env; echo "----- env -----"
.configure-ccache: &configure-ccache
export PATH=/usr/lib/ccache:/opt/local/libexec/ccache:$PATH
.configure-coredump: &configure-coredump
ulimit -S -c 0
# basic steps for a job that compiles stuff
# can be included in the before_script/script sections
# via `*init-build-job`
.build-init: &init-build-job
- *print-env
- *configure-ccache
- *configure-coredump
# simple bash command to retry a stage up to 3 times
# with a 15-second delay (mainly to survive transient
# network issues)
.retry: &define-retry |
retry() {
local n=1
local max=3
local delay=15
while true; do
"$@" && break || {
if [[ $n -lt $max ]]; then
((n++))
echo "Command failed. Attempt $n/$max:"
sleep $delay;
else
echo "The command has failed after $n attempts." 1>&2
exit 1
fi
}
done
}
# basic before_script template for a compiling job
.build-job:
timeout: 3 hours
before_script:
- *init-build-job
# a top-level build runs the standard boot/configure/make
# cycle with some sensible defaults
.make-distcheck:
extends:
- .build-job
variables:
# default configure flags (can be overridden from dependents)
CONFIGURE_FLAGS: "--enable-doxygen --enable-swig --enable-python"
# default C flags (can be overridden from dependents)
CFLAGS: "-O3"
# target to actually run (distcheck is the most thorough)
MAKE_TARGET: "distcheck"
# set default python as python3
# TODO: this can be removed when all packages require python>=3
# on their own
PYTHON: "python3"
needs: []
script:
- ./00boot
# we use xargs here in case CONFIGURE_FLAGS contains
# variables with spaces, etc etc
- xargs ./configure
--enable-strict-defs
${ENABLE_NIGHTLY}
CFLAGS="${CFLAGS}"
LALSUITE_LIBTOOL_NO_SUPPRESS=1
<<< ${CONFIGURE_FLAGS}
- make -j${CPU_COUNT} VERBOSE=1 ${MAKE_TARGET:-distcheck}
artifacts:
# upload some files to debug failures
paths:
- config.log
- Makefile
- lal*/config.log
- lal*/libtool
- lal*/Makefile
- lal*/**/test-suite.log
when: on_failure
# helper template for jobs running on macOS
.macos-job:
# use the clone strategy so permissions are correctly reset on any failed jobs
# see: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/3726
variables:
GIT_STRATEGY: clone
# tag for macOS x86_64 architecture jobs
.macos:
extends:
- .macos-job
tags:
- macos_x86_64
# tag for macOS arm64 architecture jobs
.macos-arm64:
extends:
- .macos-job
tags:
- macos_arm64
# -- build templates ----------------------------
# jobs that build from the tarballs should not need
# the git repository (this speeds things up and prevents
# other issues)
.build-from-tarball:
variables:
GIT_STRATEGY: none
# -- rpm
# template for RPM packaging jobs
.rpmbuild:
extends:
- .rhel:rpm
- .build-from-tarball
variables:
# disable repos we don't use
DISABLE_REPOS: "htcondor osg"
# parallelise the build (rpmbuild uses this variable by default)
RPM_BUILD_NCPUS: ${CPU_COUNT}
# where to build things (not a standard variable name)
RPM_BUILD_TOPDIR: "${CI_PROJECT_DIR}/rpmbuild"
# before_script comes from .rhel:rpm
script:
- *init-build-job
# build a yum repo from the upstream packages
- |
if [ -d rpmbuild ]; then
yum install -y -q createrepo
LOCAL_REPO="${CI_PROJECT_DIR}/local-builds"
cp -r rpmbuild/RPMS ${LOCAL_REPO}
createrepo --quiet --workers "${CPU_COUNT}" "${LOCAL_REPO}"
cat > /etc/yum.repos.d/local-builds.repo <<EOF
[local-builds]
name=Local builds
baseurl=file://${LOCAL_REPO}
enabled=1
gpgcheck=0
EOF
fi
# install srpm dependencies
- yum install -y -q lscsoft-packaging-tools
# build src.rpm
- PACKAGE=${CI_JOB_NAME%%:*}
- cd ${PACKAGE}/
- TARBALL=$(ls -t1 ${PACKAGE}-*.tar.* | head -n1 | xargs readlink -f)
- rpmbuild -ts --define "_topdir ${RPM_BUILD_TOPDIR}" ${TARBALL}
- SRPM=${RPM_BUILD_TOPDIR}/SRPMS/${PACKAGE}-*.src.rpm
# install build dependencies
- yum-builddep -y ${SRPM}
# print installed packages
- yum list installed --quiet
# build binary rpms and print details of what we got
- rpmbuild --rebuild --noclean --define "_topdir ${RPM_BUILD_TOPDIR}" ${SRPM}
# print package info
- set +x
- for rpmf in ${CI_PROJECT_DIR}/rpmbuild/RPMS/*/*${PACKAGE}-*.rpm; do
echo "===== ${rpmf}" &&
rpm -qlp "${rpmf}" &&
echo "Files:" &&
rpm -qip "${rpmf}" &&
echo "Provides:" &&
rpm -qp --provides "${rpmf}" &&
echo "Requires:" &&
rpm -qp --requires "${rpmf}";
done
# install the packages we built
- yum -y -q install ${CI_PROJECT_DIR}/rpmbuild/RPMS/*/*${PACKAGE}-*.rpm
# lint packages (both installed packages and RPM files)
- |
cat << EOF > rpmlintrc
# don't validate Source0
setOption("NetworkEnabled", False)
# don't know how to fix this
addFilter('binary-or-shlib-defines-rpath')
# the regex rpmlint uses to identify 'lib' libraries is crap
addFilter('explicit-lib-dependency (.*)?matplotlib')
addFilter('explicit-lib-dependency (.*)?ciecplib')
EOF
- rpmlint
-f rpmlintrc
"*${PACKAGE}*"
${CI_PROJECT_DIR}/rpmbuild/RPMS/*/*${PACKAGE}-*.rpm
artifacts:
expire_in: 18h
paths:
# build packages
- "rpmbuild/RPMS/*/${CI_JOB_NAME%%:*}-*.rpm"
- "rpmbuild/RPMS/*/lib${CI_JOB_NAME%%:*}-*.rpm"
- "rpmbuild/RPMS/*/python*-${CI_JOB_NAME%%:*}-*.rpm"
# log files
- "rpmbuild/BUILD/**/config.log"
- "rpmbuild/BUILD/**/test-suite.log"
# generated sources
- "rpmbuild/BUILD/**/swiglal_lal*_octave.cpp"
- "rpmbuild/BUILD/**/swiglal_lal*_python.c"
reports:
junit: "rpmbuild/BUILD/**/*junit*.xml"
when: always
rules:
- !reference [.ci-rhel, rules]
- !reference [.ci-merge-build, rules]
- !reference [.ci-nightly-deploy, rules]
- !reference [.ci-lalsuite-tag-build, rules]
- !reference [.ci-docker, rules]
.rpmbuild:el7:
extends:
- .rpmbuild
image: igwn/base:el7-testing
.rpmbuild:el8:
extends:
- .rpmbuild
image: igwn/base:el8-testing
# -- debian
# template for debian packaging jobs
.debuild:
extends:
- .debian:deb
- .build-from-tarball
image: igwn/base:bullseye
variables:
# tell debhelper to parallelise the build
DEB_BUILD_OPTIONS: "parallel=${CPU_COUNT}"
# before_script: comes from .debian:deb
script:
- *init-build-job
- PACKAGE=${CI_JOB_NAME%%:*}
# install extra build requirements
- apt-get install -y -q -q
lintian
# setup local apt repository to house upstream packages
- if test -n "$(find . -maxdepth 1 -name '*.deb' -print -quit)"; then
apt-get -y -q -q install local-apt-repository;
mkdir -pv /srv/local-apt-repository;
mv -v *.deb /srv/local-apt-repository;
/usr/lib/local-apt-repository/rebuild;
apt-get -y -q update;
fi
# create orig tarball
- cd ${PACKAGE}/
- TARBALL=$(ls -t1 ${PACKAGE}-*.tar.* | head -n1 | xargs readlink -f)
- SUFFIX=$(basename $TARBALL | sed 's/.*\.\(tar\..*\)/\1/')
- VERSION=$(basename $TARBALL | sed 's/[^-]*-\(.*\)\.tar\..*/\1/' | tr '-' '~')
- cd ${CI_PROJECT_DIR}/
- cp ${TARBALL} ${PACKAGE}_${VERSION}.orig.${SUFFIX}
# unpack tarball
- export DEBFULLNAME="GitLab"
- export DEBEMAIL="[email protected]"
- tar -xf ${TARBALL}
- cd ${PACKAGE}-*/
# update changelog
- dch -v ${VERSION}-1 -b 'Rebuilt automatically on git.ligo.org CI'
# install build dependencies
- mk-build-deps
--tool "apt-get -y -q -o Debug::pkgProblemResolver=yes --no-install-recommends"
--install
--remove
- rm -rfv *-build-deps_*
# build packages
- debuild
-us -uc -r
--lintian-opts --color=always --allow-root
# print package info
- set +x
- cd ${CI_PROJECT_DIR}
- for debf in *.deb; do
echo "===== ${debf}";
dpkg --info "${debf}";
dpkg --contents "${debf}";
done
artifacts:
expire_in: 18h
paths:
# build packages
- "${CI_JOB_NAME%%:*}*.changes"
- "${CI_JOB_NAME%%:*}*.deb"
- "lib${CI_JOB_NAME%%:*}*.deb"
- "python*-${CI_JOB_NAME%%:*}*.deb"
- "${CI_JOB_NAME%%:*}*.dsc"
# log files
- "${CI_JOB_NAME%%:*}*/**/config.log"
- "${CI_JOB_NAME%%:*}*/**/test-suite.log"
# generated sources
- "${CI_JOB_NAME%%:*}*/**/swiglal_lal*_python.c"
# the orig tarball
- "${CI_JOB_NAME%%:*}*.orig.*"
reports:
junit: "${CI_JOB_NAME%%:*}-*/**/*junit*.xml"
when: always
rules:
- !reference [.ci-debian, rules]
- !reference [.ci-merge-build, rules]
- !reference [.ci-nightly-deploy, rules]
- !reference [.ci-lalsuite-tag-build, rules]
- !reference [.ci-docker, rules]
# -- conda
# initialise conda for 'conda build jobs'
# note: this assumes that the base environment is writable,
# which is not the case by default for the shared
# macos runners at CIT, if you need a writable base env
# on those machines, install miniconda/miniforge yourself
.conda-init: &conda-init
- *define-retry
# init conda
- mkdir -p $(dirname ${CONDA_PKGS_DIRS})
- source ${CONDA_ROOT:=/opt/conda}/etc/profile.d/conda.sh
# configure conda options
- rm -fv ${CONDARC} # start afresh
- conda config --file ${CONDARC} --set always_yes yes
- conda config --file ${CONDARC} --add channels conda-forge
- conda config --file ${CONDARC} --set channel_priority strict
# see https://github.com/conda-forge/conda-forge-ci-setup-feedstock/pull/168
- conda config --show aggressive_update_packages >> ${CONDARC}
- conda config --file ${CONDARC} --remove aggressive_update_packages openssl
# pin conda and mamba to stable major/minor versions
- conda --version | sed -n '/^conda /p' | sed 's|[0-9]*$|*|' >> ${CONDA_ROOT}/conda-meta/pinned
- mamba --version | sed -n '/^mamba /p' | sed 's|[0-9]*$|*|' >> ${CONDA_ROOT}/conda-meta/pinned
- grep -H . ${CONDA_ROOT}/conda-meta/pinned
# install build helpers
- retry mamba install -n base
"conda-build!=3.18.10"
conda-forge-pinning
"conda-smithy>=3.7.5"
conda-verify
"boa>=0.8.0"
# print info
- conda activate base
- conda info --all
- conda config --show-sources
- conda config --show
- conda list --name base
# template for jobs that use conda (in any context)
.conda-job:
image: igwn/base:conda
variables:
# where to write conda packages
CONDA_BLD_PATH: "${CI_PROJECT_DIR}/conda-bld"
# dont clone the git repo
GIT_STRATEGY: none
before_script:
- *init-build-job
- *define-retry
- *conda-init
# template for `conda build` jobs
.conda-build:
extends:
- .conda-job
variables:
# default to mambabuild from boa
CONDA_BUILD_CMD: "mambabuild"
# stub of feedstock configuration file
CONDA_CONFIG: "linux_64_"
script:
- PACKAGE=${CI_JOB_NAME%%:*}
- cd ${PACKAGE}/
# copy local packages from conda-bld dir to a new channel
- if [ -d "${CONDA_BLD_PATH}" ]; then
LOCAL_CHANNEL="${CI_PROJECT_DIR}/local-builds";
rm -rf "${LOCAL_CHANNEL}";
cp -rv "${CONDA_BLD_PATH}" "${LOCAL_CHANNEL}";
conda index "${LOCAL_CHANNEL}" --no-progress;
conda config --file ${CONDARC} --add channels "${LOCAL_CHANNEL}";
conda search "*lal*" --channel "${LOCAL_CHANNEL}" --override-channels;
rm -rf "${CONDA_BLD_PATH}";
fi
# render YAML file to use our tarball
- TARBALL=$(ls -t1 ${PACKAGE}-*.tar.* | head -n1 | xargs readlink -f)
- SHA256=$(openssl dgst -r -sha256 $TARBALL | cut -d\ -f1)
- tar -xf ${TARBALL} --wildcards ${PACKAGE}-*/conda/ --strip-components=1
- sed 's|@TARBALL@|'${TARBALL}'|g' conda/meta.yaml.in > conda/meta.yaml
- sed -i 's|@SHA256@|'${SHA256}'|g' conda/meta.yaml
# create a feedstock from the conda recipe
- git config --global user.name "${GITLAB_USER_NAME}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
- conda smithy init conda/ --feedstock-directory ${PACKAGE}-feedstock
- cd ${PACKAGE}-feedstock
# handle migrations that are bundled with the tarball
- mkdir -p .ci_support/migrations
- find recipe/migrations -type f -name "*.yaml" -exec cp -n -v {} .ci_support/migrations/ \;
# regenerate the feedstock
- retry conda smithy regenerate --no-check-uptodate
- git ls-files
# configure CONDA_CONFIG
- _CONDA_CONFIG_PYTHON_REGEX="(.*python)${LALSUITE_PYTHON_VERSION}(.*)"
- |
# if this is a nightly build and CONDA_CONFIG refers to a single python
# version, expand it to include all Python versions in the feedstock
if [ ! -z "${ENABLE_NIGHTLY}" ] && [[ "${CONDA_CONFIG}" =~ ${_CONDA_CONFIG_PYTHON_REGEX} ]]; then
CONDA_CONFIG=$(basename -s .yaml .ci_support/${BASH_REMATCH[1]}*${BASH_REMATCH[2]}.yaml);
# otherwise if this is NOT a nightly build and CONDA_CONFIG doesn't
# refer to a single python version, specify `--python` to build only
# the reference Python version
elif [ -z "${ENABLE_NIGHTLY}" ] && [[ ! "${CONDA_CONFIG}" =~ ${_CONDA_CONFIG_PYTHON_REGEX} ]]; then
CONDA_BUILD_ARGS="--python \"${LALSUITE_PYTHON_VERSION}.* *_cpython\"";
fi
# ensure $CI_COMMIT_TAG is set for script_env
- export CI_COMMIT_TAG=${CI_COMMIT_TAG:-}
# build packages
# NOTE: we use xargs here because CONDA_BUILD_ARGS contains multiple spaces
# NOTE: retry if conda build fails due to corrupted $CONDA_PKGS_DIRS
- |
# loop over chosen configurations
for _CONDA_CONFIG in ${CONDA_CONFIG}; do
# loop over retry
for n in 1 2; do
echo "===== conda ${CONDA_BUILD_CMD:-build}: attempt $n of 2 ====="
if ( \
set -o pipefail; \
xargs -t conda ${CONDA_BUILD_CMD:-build} \
recipe/ \
--dirty \
--error-overlinking \
--error-overdepending \
--keep-old-work \
--no-anaconda-upload \
--variant-config-files .ci_support/${_CONDA_CONFIG}.yaml \
<<< ${CONDA_BUILD_ARGS} \
2>&1 | awk '{print} /appears to be corrupted/ {exit 1}' \
); then
echo "----- conda ${CONDA_BUILD_CMD:-build}: success -----"
break
else
echo "... output from conda ${CONDA_BUILD_CMD:-build} truncated"
if [ $n -eq 1 ] && [ "X${CONDA_PKGS_DIRS}" != X ]; then
echo "----- conda ${CONDA_BUILD_CMD:-build}: possibly ${CONDA_PKGS_DIRS} is corrupted, deleting and retrying -----"
rm -rf ${CONDA_PKGS_DIRS}
else
echo "----- conda ${CONDA_BUILD_CMD:-build}: something else is corrupted, failing -----"
exit 1
fi
fi
done # retry
done # configs
after_script:
# clean cache of old files
- find ${CONDA_PKGS_DIRS%:*} -atime +30 -delete
- find ${CONDA_PKGS_DIRS%:*} -type d -empty -delete
artifacts:
expire_in: 18h
paths:
# built packages (matching this package only)
- "conda-bld/**/${CI_JOB_NAME%%:*}-*.conda"
- "conda-bld/**/${CI_JOB_NAME%%:*}-*.tar.bz2"
- "conda-bld/**/lib${CI_JOB_NAME%%:*}-*.conda"
- "conda-bld/**/lib${CI_JOB_NAME%%:*}-*.tar.bz2"
- "conda-bld/**/python-${CI_JOB_NAME%%:*}-*.conda"
- "conda-bld/**/python-${CI_JOB_NAME%%:*}-*.tar.bz2"
# log files
- "conda-bld/${CI_JOB_NAME%%:*}-*/work/**/config.log"
- "conda-bld/${CI_JOB_NAME%%:*}-*/work/**/test-suite.log"
# generated sources
- "conda-bld/${CI_JOB_NAME%%:*}-*/work/**/swiglal_lal*_octave.cpp"
- "conda-bld/${CI_JOB_NAME%%:*}-*/work/**/swiglal_lal*_python.c"
# the feedstock
- "${CI_JOB_NAME%%:*}/${CI_JOB_NAME%%:*}-feedstock/"
reports:
# conda-build deletes the _test_tmp directory for each
# package, so we write them into the project directory
junit: "*junit*.xml"
when: always
rules:
- !reference [.ci-conda, rules]
- !reference [.ci-merge-build, rules]
- !reference [.ci-nightly-deploy, rules]
# -- tarballs -----------------------------------
#
# make tarballs for each subpackage
#
# job template for a subpackage tarball build;
# to build a tarball for a subpackage just define
# a job called `tarball:<subpackage>` that
# `extends` this one (see `tarball:lal` below)
.make-dist:
image: igwn/lalsuite-dev:el7
stage: tarballs
needs: []
extends:
- .build-job
script:
- pushd ${CI_JOB_NAME##*:}
- ./00boot
- ./configure ${ENABLE_NIGHTLY} --enable-swig
- make dist
artifacts:
expire_in: 18h
# store the tarballs
paths:
- "*/*.tar.*"
# there are no reports for tarball jobs
reports:
junit: []
# make tarballs for _all_ packages
tarballs:
extends:
- .make-dist
script:
- ./00boot
- ./configure ${ENABLE_NIGHTLY} --enable-swig
- for subdir in lal lalframe lalmetaio lalsimulation lalburst lalinspiral lalinference lalpulsar lalapps; do
pushd ${subdir};
make dist;
popd;
done
# make the tarball for LAL only
# (this job will run much faster than the `tarballs` job
# so we use it to release the 'LAL' stage jobs as
# early as possible)
tarball:lal:
extends:
- .make-dist
# -- lal ----------------------------------------
#
# build packages for LAL
#
.lal:
stage: LAL
needs:
- tarball:lal
lal:rpm-el7:
extends:
- .rpmbuild:el7
- .lal
lal:rpm-el8:
extends:
- .rpmbuild:el8
- .lal
lal:deb:
extends:
- .debuild
- .lal
# build with conda using FFTW
lal:conda:fftw:
extends:
- .conda-build
- .lal
variables:
CONDA_CONFIG: "linux_64_fft_implfftw"
# build with conda using Intel FFT (MKL)
lal:conda:mkl:
extends:
- .conda-build
- .lal
variables:
CONDA_CONFIG: "linux_64_fft_implmkl"
# -- lalframe------------------------------------
#
# build packages for LALFrame
#
.lalframe:
stage: LALFrame
lalframe:rpm-el7:
extends:
- .rpmbuild:el7
- .lalframe
needs:
- tarballs
- lal:rpm-el7
lalframe:rpm-el8:
extends:
- .rpmbuild:el8
- .lalframe
needs:
- tarballs
- lal:rpm-el8
lalframe:deb:
extends:
- .debuild
- .lalframe
needs:
- tarballs
- lal:deb
lalframe:conda:
extends:
- .conda-build
- .lalframe
needs:
- tarballs
- lal:conda:fftw
# -- lalmetaio ----------------------------------
#
# build packages for LALMetaIO
#
.lalmetaio:
stage: LALMetaIO
lalmetaio:rpm-el7:
extends:
- .rpmbuild:el7
- .lalmetaio
needs:
- tarballs
- lal:rpm-el7
lalmetaio:rpm-el8:
extends:
- .rpmbuild:el8
- .lalmetaio
needs:
- tarballs
- lal:rpm-el8
lalmetaio:deb:
extends:
- .debuild
- .lalmetaio
needs:
- tarballs
- lal:deb
lalmetaio:conda:
extends:
- .conda-build
- .lalmetaio
needs:
- tarballs
- lal:conda:fftw
# -- lalsimulation ------------------------------
#
# build packages for LALSimulation
#
.lalsimulation:
stage: LALSimulation
lalsimulation:rpm-el7:
extends:
- .rpmbuild:el7
- .lalsimulation
needs:
- tarballs
- lal:rpm-el7
lalsimulation:rpm-el8:
extends:
- .rpmbuild:el8
- .lalsimulation
needs:
- tarballs
- lal:rpm-el8
lalsimulation:deb:
extends:
- .debuild
- .lalsimulation
needs:
- tarballs
- lal:deb
lalsimulation:conda:
extends:
- .conda-build
- .lalsimulation
needs:
- tarballs
- lal:conda:fftw
variables:
CONDA_CONFIG: "linux_64_*python${LALSUITE_PYTHON_VERSION}.*cpython"
# -- lalburst -----------------------------------
#
# build packages for LALBurst
#
.lalburst:
stage: LALBurst
lalburst:rpm-el7:
extends:
- .rpmbuild:el7
- .lalburst
needs:
- tarballs
- lal:rpm-el7
- lalmetaio:rpm-el7
- lalsimulation:rpm-el7
lalburst:rpm-el8:
extends:
- .rpmbuild:el8
- .lalburst
needs:
- tarballs
- lal:rpm-el8
- lalmetaio:rpm-el8
- lalsimulation:rpm-el8
lalburst:deb:
extends:
- .debuild
- .lalburst
needs:
- tarballs
- lal:deb
- lalmetaio:deb
- lalsimulation:deb
lalburst:conda:
extends:
- .conda-build
- .lalburst
needs:
- tarballs
- lal:conda:fftw
- lalmetaio:conda
- lalsimulation:conda
# -- lalinspiral --------------------------------
#
# build packages for LALInspiral
#
.lalinspiral:
stage: LALInspiral
lalinspiral:rpm-el7:
extends:
- .rpmbuild:el7
- .lalinspiral
needs:
- tarballs
- lal:rpm-el7
- lalframe:rpm-el7
- lalmetaio:rpm-el7
- lalsimulation:rpm-el7
- lalburst:rpm-el7
lalinspiral:rpm-el8:
extends:
- .rpmbuild:el8
- .lalinspiral
needs:
- tarballs
- lal:rpm-el8
- lalframe:rpm-el8
- lalmetaio:rpm-el8
- lalsimulation:rpm-el8
- lalburst:rpm-el8
lalinspiral:deb:
extends:
- .debuild
- .lalinspiral
needs:
- tarballs
- lal:deb
- lalframe:deb
- lalmetaio:deb
- lalsimulation:deb
- lalburst:deb
lalinspiral:conda:
extends:
- .conda-build
- .lalinspiral
needs:
- tarballs
- lal:conda:fftw
- lalframe:conda
- lalmetaio:conda
- lalsimulation:conda
- lalburst:conda
# -- lalinference -------------------------------
#
# build packages for LALInference
#
.lalinference:
stage: LALInference
lalinference:rpm-el7:
extends:
- .rpmbuild:el7
- .lalinference
needs:
- tarballs
- lal:rpm-el7
- lalframe:rpm-el7
- lalmetaio:rpm-el7
- lalsimulation:rpm-el7
- lalburst:rpm-el7
- lalinspiral:rpm-el7
lalinference:rpm-el8:
extends:
- .rpmbuild:el8
- .lalinference
needs:
- tarballs
- lal:rpm-el8
- lalframe:rpm-el8
- lalmetaio:rpm-el8
- lalsimulation:rpm-el8
- lalburst:rpm-el8
- lalinspiral:rpm-el8
lalinference:deb:
extends:
- .debuild
- .lalinference
needs:
- tarballs
- lal:deb
- lalframe:deb
- lalmetaio:deb
- lalsimulation:deb
- lalburst:deb
- lalinspiral:deb
lalinference:conda:
extends:
- .conda-build
- .lalinference
needs:
- tarballs
- lal:conda:fftw
- lalframe:conda
- lalmetaio:conda
- lalsimulation:conda
- lalburst:conda
- lalinspiral:conda
# -- lalpulsar ----------------------------------
#
# build packages for LALPulsar
#
.lalpulsar:
stage: LALPulsar
lalpulsar:rpm-el7:
extends:
- .rpmbuild:el7
- .lalpulsar
needs:
- tarballs
- lal:rpm-el7
- lalframe:rpm-el7
- lalmetaio:rpm-el7
- lalsimulation:rpm-el7
- lalburst:rpm-el7
- lalinspiral:rpm-el7
- lalinference:rpm-el7
lalpulsar:rpm-el8:
extends:
- .rpmbuild:el8
- .lalpulsar
needs:
- tarballs
- lal:rpm-el8