-
Notifications
You must be signed in to change notification settings - Fork 5
1310 lines (1282 loc) · 55 KB
/
Copy pathbuild-push.yml
File metadata and controls
1310 lines (1282 loc) · 55 KB
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
name: build-push
on:
schedule:
- cron: "30 */6 * * *"
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
EDM4EIC_VERSION:
required: false
default: ''
type: string
EICRECON_VERSION:
required: false
default: ''
type: string
JUGGLER_VERSION:
required: false
default: ''
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
permissions:
contents: read
packages: write
env:
## CUDA version and container operating system
CUDA_VERSION: 12.5.1
CUDA_OS: ubuntu24.04
## Default versions are specified in packages.yaml but can be overridden
## note: nightly builds will always use the master/main branch
EDM4EIC_VERSION: ${{ inputs.EDM4EIC_VERSION }}
EICRECON_VERSION: ${{ inputs.EICRECON_VERSION }}
JUGGLER_VERSION: ${{ inputs.JUGGLER_VERSION }}
## Dockerhub registry
DH_REGISTRY: docker.io
DH_REGISTRY_USER: eicweb
DH_PUSH: 0
## GitHub registry
GH_REGISTRY: ghcr.io
GH_REGISTRY_USER: eic
GH_PUSH: 1 # required
## Number of jobs to start during container builds
JOBS: 4
## Internal tag used for the CI
INTERNAL_TAG: pipeline-${{ github.run_id }}
## Compressed image size caps (GiB). Fail the build if a final image exceeds
## these limits to catch regressions early (e.g. accidental Spack-built LLVM).
## To update: measure the compressed sizes of the published master images,
## add ~15% headroom, round up, and update here and in .gitlab-ci.yml
## variables.
SIZE_LIMIT_DEBIAN_STABLE_BASE_GIB: 0.8
SIZE_LIMIT_EIC_CI_GIB: 3
SIZE_LIMIT_EIC_XL_GIB: 4.5
jobs:
env:
## The env context is not available in matrix, only in steps,
## so this job is merely to transfer env to job outputs which
## can be used in matrix.
name: Turn env into outputs
runs-on: ubuntu-latest
outputs:
CUDA_VERSION: ${{ steps.env.outputs.CUDA_VERSION }}
CUDA_OS: ${{ steps.env.outputs.CUDA_OS }}
BUILDWEEK: ${{ steps.env.outputs.BUILDWEEK }}
steps:
- name: Turn env into outputs
id: env
run: |
echo "CUDA_VERSION=${{ env.CUDA_VERSION }}" >> $GITHUB_OUTPUT
echo "CUDA_OS=${{ env.CUDA_OS }}" >> $GITHUB_OUTPUT
echo "BUILDWEEK=$(date +%Yw%V)" >> $GITHUB_OUTPUT
base:
name: Build ${{ matrix.BUILD_IMAGE }} on ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
needs: env
strategy:
matrix:
include:
- BASE_IMAGE: debian:trixie-slim
BUILD_IMAGE: debian_stable_base
PLATFORM: linux/amd64
runner: ubuntu-latest
arch: amd64
- BASE_IMAGE: debian:trixie-slim
BUILD_IMAGE: debian_stable_base
PLATFORM: linux/amd64/v3
runner: ubuntu-latest
arch: amd64_v3
- BASE_IMAGE: debian:trixie-slim
BUILD_IMAGE: debian_stable_base
PLATFORM: linux/arm64
runner: ubuntu-24.04-arm
arch: arm64
- BASE_IMAGE: nvidia/cuda:${{ needs.env.outputs.CUDA_VERSION }}-devel-${{ needs.env.outputs.CUDA_OS }}
BUILD_IMAGE: cuda_devel
PLATFORM: linux/amd64
runner: ubuntu-latest
arch: amd64
- BASE_IMAGE: nvidia/cuda:${{ needs.env.outputs.CUDA_VERSION }}-runtime-${{ needs.env.outputs.CUDA_OS }}
BUILD_IMAGE: cuda_runtime
PLATFORM: linux/amd64
runner: ubuntu-latest
arch: amd64
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: linux/amd64,linux/amd64/v3,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
id: buildx
- name: Cache build mounts
# Cache mount contents (ccache, apt cache, spack cache) using GitHub Actions cache
# This is separate from the registry cache which stores image layers
# Reference: https://docs.docker.com/build/ci/github-actions/cache/#cache-mounts
# Implementation: https://github.com/reproducible-containers/buildkit-cache-dance
uses: actions/cache@v6
id: cache-base-mounts
with:
path: cache-mount-base-${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}
key: ${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}-base-mounts-${{ github.ref_name }}-${{ needs.env.outputs.BUILDWEEK }}
restore-keys: |
${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}-base-mounts-main-${{ needs.env.outputs.BUILDWEEK }}
${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}-base-mounts-main
${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}-base-mounts-
- name: Inject cache mounts into builder
uses: reproducible-containers/buildkit-cache-dance@v3
with:
builder: ${{ steps.buildx.outputs.name }}
cache-dir: cache-mount-base-${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}
cache-map: |
{
"var-cache-apt": "/var/cache/apt",
"var-lib-apt": "/var/lib/apt",
"var-cache-spack": "/var/cache/spack"
}
skip-extraction: ${{ steps.cache-base-mounts.outputs.cache-hit }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
if: ${{ env.GH_PUSH == '1' }}
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
- name: Build and push
env:
BUILD_IMAGE: ${{ matrix.BUILD_IMAGE }}
BASE_IMAGE: ${{ matrix.BASE_IMAGE }}
PLATFORM: ${{ matrix.PLATFORM }}
BUILDWEEK: ${{ needs.env.outputs.BUILDWEEK }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
METADATA_FILE: /tmp/build-metadata.json
run: bash scripts/build-base.sh
- name: Export digest to file
run: |
DIGEST=$(jq -r '."containerimage.digest"' /tmp/build-metadata.json)
IMAGE="${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }}"
mkdir -p /tmp/digests
echo "${IMAGE}@${DIGEST}" > /tmp/digests/${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}.digest
- name: Check image size
run: |
FULLNAME="${{ matrix.BUILD_IMAGE }}"
LIMIT_VAR="SIZE_LIMIT_$(printf '%s' "${FULLNAME}" | tr '[:lower:]' '[:upper:]')_GIB"
LIMIT="${!LIMIT_VAR}"
if [ -n "${LIMIT}" ]; then
scripts/check_image_size \
"${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${FULLNAME}@$(jq -r '."containerimage.digest"' /tmp/build-metadata.json)" \
"${LIMIT}"
else
echo "No size limit configured for ${FULLNAME}, skipping check."
fi
- name: Upload digest as artifact
uses: actions/upload-artifact@v7
with:
name: base-${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}-digest
path: /tmp/digests/${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}.digest
retention-days: 1
base-manifest:
name: Push ${{ matrix.BUILD_IMAGE }} manifest
runs-on: ubuntu-latest
needs: base
strategy:
matrix:
include:
- BUILD_IMAGE: debian_stable_base
- BUILD_IMAGE: cuda_devel
- BUILD_IMAGE: cuda_runtime
steps:
- name: Set up QEMU (for imagetools)
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
uses: docker/login-action@v4
if: ${{ env.DH_PUSH == '1' }}
with:
registry: ${{ env.DH_REGISTRY }}
username: ${{ env.DH_REGISTRY_USER }}
password: ${{ secrets.DH_EICWEB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
if: ${{ env.GH_PUSH == '1' }}
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
- name: Download all digest artifacts
uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: base-${{ matrix.BUILD_IMAGE }}-*-digest
merge-multiple: true
- name: Analyze digest artifacts
id: digests
run: |
# Loop over all available architecture artifacts
ALL_DIGESTS=""
FIRST_DIGEST=""
shopt -s nullglob
for digest_file in /tmp/digests/${{ matrix.BUILD_IMAGE }}-*.digest; do
DIGEST=$(cat "$digest_file")
echo "Found digest: $DIGEST"
if [ -z "$ALL_DIGESTS" ]; then
ALL_DIGESTS="$DIGEST"
else
ALL_DIGESTS="$ALL_DIGESTS $DIGEST"
fi
if [ -z "$FIRST_DIGEST" ]; then
FIRST_DIGEST="$DIGEST"
fi
done
shopt -u nullglob
# Check if at least one digest was found
if [ -z "$FIRST_DIGEST" ]; then
echo "Error: No digest files found"
exit 1
fi
# Get the base image name from the first digest
REGISTRY_IMAGE=$(echo $FIRST_DIGEST | cut -d'@' -f1)
REGISTRY=$(echo $REGISTRY_IMAGE | cut -d'/' -f1-2)
IMAGE=$(echo $REGISTRY_IMAGE | cut -d'/' -f3)
echo "Registry Name: $REGISTRY"
echo "Image Name: $IMAGE"
echo "All Digests: $ALL_DIGESTS"
echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
echo "all=$ALL_DIGESTS" >> $GITHUB_OUTPUT
- name: Extract Docker metadata for final tags
id: meta
uses: docker/metadata-action@v6
with:
images: |
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/${{ steps.digests.outputs.image }},enable=${{ env.DH_PUSH != 0 }}
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ steps.digests.outputs.image }},enable=${{ env.GH_PUSH != 0 }}
tags: |
${{ env.INTERNAL_TAG }}
type=ref,prefix=unstable-pr-,event=pr
type=match,pattern=^v(\d+\.\d+\.\d+-.*)$,group=1
- name: Create and push manifest list
run: |
# Create tag arguments from the multi-line 'tags' output from the meta step
TAG_ARGS=""
while read -r line; do
TAG_ARGS="$TAG_ARGS --tag $line"
done <<< "${{ steps.meta.outputs.tags }}"
# Create the manifest list and tag it with the final tags
docker buildx imagetools create \
$TAG_ARGS \
${{ steps.digests.outputs.all }}
eic:
name: Build ${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }} on ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
needs: base-manifest
strategy:
matrix:
include:
- BUILD_IMAGE: eic_
BUILD_TYPE: "default,nightly"
BUILDER_IMAGE: debian_stable_base
RUNTIME_IMAGE: debian_stable_base
ENV: ci
arch: amd64
runner: ubuntu-latest
PLATFORM: linux/amd64
target: final
- BUILD_IMAGE: eic_
BUILD_TYPE: "default,nightly"
BUILDER_IMAGE: debian_stable_base
RUNTIME_IMAGE: debian_stable_base
ENV: ci
arch: amd64_v3
runner: ubuntu-latest
PLATFORM: linux/amd64/v3
target: final
- BUILD_IMAGE: eic_
BUILD_TYPE: "default,nightly"
BUILDER_IMAGE: debian_stable_base
RUNTIME_IMAGE: debian_stable_base
ENV: ci
arch: arm64
runner: ubuntu-24.04-arm
PLATFORM: linux/arm64
target: final
- BUILD_IMAGE: eic_
BUILD_TYPE: "default,nightly"
BUILDER_IMAGE: debian_stable_base
RUNTIME_IMAGE: debian_stable_base
ENV: xl
arch: amd64
runner: ubuntu-latest
PLATFORM: linux/amd64
target: final
- BUILD_IMAGE: eic_
BUILD_TYPE: "default,nightly"
BUILDER_IMAGE: debian_stable_base
RUNTIME_IMAGE: debian_stable_base
ENV: xl
arch: amd64_v3
runner: ubuntu-latest
PLATFORM: linux/amd64/v3
target: final
- BUILD_IMAGE: eic_
BUILD_TYPE: "default,nightly"
BUILDER_IMAGE: debian_stable_base
RUNTIME_IMAGE: debian_stable_base
ENV: xl
arch: arm64
runner: ubuntu-24.04-arm
PLATFORM: linux/arm64
target: final
- BUILD_IMAGE: eic_
BUILD_TYPE: "default"
BUILDER_IMAGE: cuda_devel
RUNTIME_IMAGE: cuda_devel
ENV: cuda
arch: amd64
runner: ubuntu-latest
PLATFORM: linux/amd64
target: builder_concretization_default
- BUILD_IMAGE: eic_
BUILD_TYPE: "default"
BUILDER_IMAGE: cuda_devel
RUNTIME_IMAGE: cuda_runtime
ENV: tf
arch: amd64
runner: ubuntu-latest
PLATFORM: linux/amd64
target: builder_concretization_default
fail-fast: false
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
android: true
dotnet: true
- name: Checkout
uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: linux/amd64,linux/amd64/v3,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
id: buildx
- name: Cache build mounts
# Cache mount contents (ccache, apt cache, spack cache) using GitHub Actions cache
# This is separate from the registry cache which stores image layers
# Reference: https://docs.docker.com/build/ci/github-actions/cache/#cache-mounts
# Implementation: https://github.com/reproducible-containers/buildkit-cache-dance
uses: actions/cache@v6
id: cache-eic-mounts
with:
path: cache-mount-eic-${{ matrix.arch }}
key: ${{ matrix.arch }}-eic-${{ matrix.ENV }}-mounts-${{ github.ref_name }}
restore-keys: |
${{ matrix.arch }}-eic-${{ matrix.ENV }}-mounts-main
${{ matrix.arch }}-eic-${{ matrix.ENV }}-mounts-
${{ matrix.arch }}-eic-mounts-
- name: Inject cache mounts into builder
uses: reproducible-containers/buildkit-cache-dance@v3
with:
builder: ${{ steps.buildx.outputs.name }}
cache-dir: cache-mount-eic-${{ matrix.arch }}
cache-map: |
{
"ccache": "/ccache",
"var-cache-spack": "/var/cache/spack"
}
skip-extraction: ${{ steps.cache-eic-mounts.outputs.cache-hit }}
- name: Login to Docker Hub
uses: docker/login-action@v4
if: ${{ env.DH_PUSH == '1' }}
with:
registry: ${{ env.DH_REGISTRY }}
username: ${{ env.DH_REGISTRY_USER }}
password: ${{ secrets.DH_EICWEB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
if: ${{ env.GH_PUSH == '1' }}
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
- name: Build and push
env:
BUILD_IMAGE: ${{ matrix.BUILD_IMAGE }}
ENV: ${{ matrix.ENV }}
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
BUILD_TARGET: ${{ matrix.target }}
BUILDER_IMAGE: ${{ matrix.BUILDER_IMAGE }}
RUNTIME_IMAGE: ${{ matrix.RUNTIME_IMAGE }}
PLATFORM: ${{ matrix.PLATFORM }}
CI_REGISTRY_USER: ${{ secrets.GHCR_REGISTRY_USER }}
CI_REGISTRY_PASSWORD: ${{ secrets.GHCR_REGISTRY_TOKEN }}
GITHUB_REGISTRY_USER: ${{ secrets.GHCR_REGISTRY_USER }}
GITHUB_REGISTRY_TOKEN: ${{ secrets.GHCR_REGISTRY_TOKEN }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
METADATA_FILE: /tmp/build-metadata.json
run: bash scripts/build-eic.sh
- name: Export digests to files
run: |
IMAGE="${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }}"
mkdir -p /tmp/digests
for metadata_file in /tmp/build-metadata-*.json; do
build_type="${metadata_file#/tmp/build-metadata-}"
build_type="${build_type%.json}"
DIGEST=$(jq -r '."containerimage.digest"' "${metadata_file}")
echo "${IMAGE}@${DIGEST}" > "/tmp/digests/${{ matrix.arch }}-${build_type}.digest"
done
- name: Check image size
# Only check final images; concretization-only targets (cuda, tf) don't produce a full image
if: ${{ matrix.target == 'final' }}
run: |
FULLNAME="${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }}"
LIMIT_VAR="SIZE_LIMIT_$(printf '%s' "${FULLNAME}" | tr '[:lower:]' '[:upper:]')_GIB"
LIMIT="${!LIMIT_VAR}"
if [ -n "${LIMIT}" ]; then
metadata_file=/tmp/build-metadata-default.json
[ -f "${metadata_file}" ] || metadata_file=$(ls /tmp/build-metadata-*.json | head -1)
scripts/check_image_size \
"${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${FULLNAME}@$(jq -r '."containerimage.digest"' "${metadata_file}")" \
"${LIMIT}"
else
echo "No size limit configured for ${FULLNAME}, skipping check."
fi
- name: Check produced build types
id: built-types
run: |
[ -f /tmp/digests/${{ matrix.arch }}-default.digest ] \
&& echo "has_default=true" >> $GITHUB_OUTPUT \
|| echo "has_default=false" >> $GITHUB_OUTPUT
[ -f /tmp/digests/${{ matrix.arch }}-nightly.digest ] \
&& echo "has_nightly=true" >> $GITHUB_OUTPUT \
|| echo "has_nightly=false" >> $GITHUB_OUTPUT
- name: Upload default digest as artifact
if: steps.built-types.outputs.has_default == 'true'
uses: actions/upload-artifact@v7
with:
name: eic-${{ matrix.ENV }}-${{ matrix.arch }}-default-digest
path: /tmp/digests/${{ matrix.arch }}-default.digest
retention-days: 1
- name: Upload nightly digest as artifact
if: steps.built-types.outputs.has_nightly == 'true'
uses: actions/upload-artifact@v7
with:
name: eic-${{ matrix.ENV }}-${{ matrix.arch }}-nightly-digest
path: /tmp/digests/${{ matrix.arch }}-nightly.digest
retention-days: 1
eic-manifest:
name: Push ${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }} ${{ matrix.BUILD_TYPE }} manifest
runs-on: ubuntu-latest
needs: eic
strategy:
matrix:
BUILD_IMAGE: [eic_]
ENV: [ci, xl]
BUILD_TYPE: [default, nightly]
steps:
- name: Set up QEMU (for imagetools)
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
uses: docker/login-action@v4
if: ${{ env.DH_PUSH == '1' }}
with:
registry: ${{ env.DH_REGISTRY }}
username: ${{ env.DH_REGISTRY_USER }}
password: ${{ secrets.DH_EICWEB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
if: ${{ env.GH_PUSH == '1' }}
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
- name: Download all digest artifacts
uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: eic-${{ matrix.ENV }}-*-${{ matrix.BUILD_TYPE }}-digest
merge-multiple: true
- name: Analyze digest artifacts
id: digests
run: |
# Loop over all available architecture artifacts
ALL_DIGESTS=""
FIRST_DIGEST=""
shopt -s nullglob
for digest_file in /tmp/digests/*-${{ matrix.BUILD_TYPE }}.digest; do
DIGEST=$(cat "$digest_file")
echo "Found digest: $DIGEST"
if [ -z "$ALL_DIGESTS" ]; then
ALL_DIGESTS="$DIGEST"
else
ALL_DIGESTS="$ALL_DIGESTS $DIGEST"
fi
if [ -z "$FIRST_DIGEST" ]; then
FIRST_DIGEST="$DIGEST"
fi
done
shopt -u nullglob
# Check if at least one digest was found
if [ -z "$FIRST_DIGEST" ]; then
echo "Error: No digest files found"
exit 1
fi
# Get the base image name from the first digest
REGISTRY_IMAGE=$(echo $FIRST_DIGEST | cut -d'@' -f1)
REGISTRY=$(echo $REGISTRY_IMAGE | cut -d'/' -f1-2)
IMAGE=$(echo $REGISTRY_IMAGE | cut -d'/' -f3)
echo "Registry Name: $REGISTRY"
echo "Image Name: $IMAGE"
echo "All Digests: $ALL_DIGESTS"
echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
echo "all=$ALL_DIGESTS" >> $GITHUB_OUTPUT
- name: Extract Docker metadata for final tags
id: meta
uses: docker/metadata-action@v6
with:
images: |
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/${{ steps.digests.outputs.image }},enable=${{ env.DH_PUSH != 0 }}
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ steps.digests.outputs.image }},enable=${{ env.GH_PUSH != 0 }}
tags: |
${{ env.INTERNAL_TAG }}-${{ matrix.BUILD_TYPE }}
type=ref,prefix=unstable-pr-,event=pr,suffix=-${{ matrix.BUILD_TYPE }}
type=match,pattern=^v(\d+\.\d+\.\d+-.*)$,group=1,enable=${{ matrix.BUILD_TYPE == 'default' }}
type=match,pattern=^v(\d+\.\d+\.\d+-.*)$,group=1,suffix=-nightly,enable=${{ matrix.BUILD_TYPE == 'nightly' }}
- name: Create and push manifest list
run: |
# Create tag arguments from the multi-line 'tags' output from the meta step
TAG_ARGS=""
while read -r line; do
TAG_ARGS="$TAG_ARGS --tag $line"
done <<< "${{ steps.meta.outputs.tags }}"
# Create the manifest list and tag it with the final tags
docker buildx imagetools create \
$TAG_ARGS \
${{ steps.digests.outputs.all }}
npsim-gun:
name: npsim (gun, ${{ matrix.particle }}, ${{ matrix.detector_config }}, ${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
needs: eic-manifest
container:
image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }}
credentials:
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
strategy:
fail-fast: false
matrix:
particle: [pi, e]
detector_config: [epic_craterlake]
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Produce simulation files
shell: bash --login -eo pipefail {0}
run: |
source /opt/detector/epic-main/bin/thisepic.sh
npsim \
--compactFile ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml \
-G --random.seed 1 \
--random.enableEventSeed \
--gun.particle "${{ matrix.particle }}-" \
--gun.momentumMin "1*GeV" --gun.momentumMax "20*GeV" \
--gun.distribution "uniform" \
-N 100 \
--outputFile sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root \
-v WARNING
- id: upload_new_artifact
uses: actions/upload-artifact@v7
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4hep.root
path: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v21
with:
branch: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
path: ref/
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4hep.root
workflow: ".github/workflows/build-push.yml"
workflow_conclusion: "success"
if_no_artifact_found: warn
- name: Compare to previous artifacts
shell: bash --login -eo pipefail {0}
run: |
mkdir capybara-reports
shopt -s nullglob
capybara bara ref/sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root* sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
mv capybara-reports sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}
touch .sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}
- name: Write artifact metadata
env:
NEW_URL: ${{ steps.upload_new_artifact.outputs.artifact-url }}
FOUND_ARTIFACT: ${{ steps.download_previous_artifact.outputs.found_artifact }}
REF_ARTIFACTS: ${{ steps.download_previous_artifact.outputs.artifacts }}
REPOSITORY: ${{ github.repository }}
run: |
REF_URL=""
if [ "$FOUND_ARTIFACT" = "true" ]; then
REF_ART_ID=$(echo "$REF_ARTIFACTS" | jq -r '.[0].id // empty')
REF_RUN_ID=$(echo "$REF_ARTIFACTS" | jq -r '.[0].workflow_run.id // empty')
if [ -n "$REF_ART_ID" ] && [ -n "$REF_RUN_ID" ]; then
REF_URL="https://github.com/$REPOSITORY/actions/runs/${REF_RUN_ID}/artifacts/${REF_ART_ID}"
fi
fi
jq -nc --arg new "$NEW_URL" --arg ref "$REF_URL" '{new: $new, ref: $ref}' \
> sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}/meta.json
- uses: actions/upload-artifact@v7
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.capy
path: |
.sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}
sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}/
if-no-files-found: error
npsim-dis:
name: npsim (DIS, ${{ matrix.beam }}, minQ2=${{ matrix.minq2 }}, ${{ matrix.detector_config }}, ${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
needs: eic-manifest
container:
image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }}
credentials:
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
strategy:
fail-fast: false
matrix:
beam: [5x41, 10x100, 18x275]
minq2: [1, 1000]
detector_config: [epic_craterlake]
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
exclude:
- beam: 5x41
minq2: 1000
- beam: 10x100
minq2: 1
arch: arm64
- beam: 10x100
minq2: 1000
arch: arm64
- beam: 18x275
minq2: 1
arch: arm64
- beam: 18x275
minq2: 1000
arch: arm64
steps:
- name: Produce simulation files
shell: bash --login -eo pipefail {0}
run: |
source /opt/detector/epic-main/bin/thisepic.sh
url=root://dtn-eic.jlab.org//volatile/eic/EPIC/EVGEN/DIS/NC/${{ matrix.beam }}/minQ2=${{ matrix.minq2 }}/pythia8NCDIS_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_beamEffects_xAngle=-0.025_hiDiv_1.hepmc3.tree.root
npsim \
--compactFile ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml \
-N 100 --inputFiles ${url} --random.seed 1 \
--outputFile sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root \
-v WARNING
- id: upload_new_artifact
uses: actions/upload-artifact@v7
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4hep.root
path: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v21
with:
branch: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
path: ref/
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4hep.root
workflow: ".github/workflows/build-push.yml"
workflow_conclusion: "success"
if_no_artifact_found: warn
- name: Compare to previous artifacts
shell: bash --login -eo pipefail {0}
run: |
mkdir capybara-reports
shopt -s nullglob
capybara bara ref/sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root* sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root
mv capybara-reports sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}
touch .sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}
- name: Write artifact metadata
env:
NEW_URL: ${{ steps.upload_new_artifact.outputs.artifact-url }}
FOUND_ARTIFACT: ${{ steps.download_previous_artifact.outputs.found_artifact }}
REF_ARTIFACTS: ${{ steps.download_previous_artifact.outputs.artifacts }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
REF_URL=""
if [ "$FOUND_ARTIFACT" = "true" ]; then
REF_ART_ID=$(echo "$REF_ARTIFACTS" | jq -r '.[0].id // empty')
REF_RUN_ID=$(echo "$REF_ARTIFACTS" | jq -r '.[0].workflow_run.id // empty')
if [ -n "$REF_ART_ID" ] && [ -n "$REF_RUN_ID" ]; then
REF_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/${REF_RUN_ID}/artifacts/${REF_ART_ID}"
fi
fi
jq -nc --arg new "$NEW_URL" --arg ref "$REF_URL" '{new: $new, ref: $ref}' \
> sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}/meta.json
- uses: actions/upload-artifact@v7
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.capy
path: |
.sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}
sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}/
if-no-files-found: error
eicrecon-gun:
name: eicrecon (gun, ${{ matrix.particle }}, ${{ matrix.detector_config }}, ${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
needs: [eic-manifest, npsim-gun]
container:
image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }}
credentials:
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
strategy:
fail-fast: false
matrix:
particle: [pi, e]
detector_config: [epic_craterlake]
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- uses: actions/download-artifact@v8
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4hep.root
- name: Run EICrecon
shell: bash --login -eo pipefail {0}
run: |
source /opt/detector/epic-main/bin/thisepic.sh
export DETECTOR_CONFIG=${{ matrix.detector_config }}
eicrecon \
-Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root \
sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
- id: upload_new_artifact
uses: actions/upload-artifact@v7
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4eic.root
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v21
with:
branch: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
path: ref/
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4eic.root
workflow: ".github/workflows/build-push.yml"
workflow_conclusion: "success"
if_no_artifact_found: warn
- name: Compare to previous artifacts
shell: bash --login -eo pipefail {0}
run: |
mkdir capybara-reports
mkdir new
ln -sf ../rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root new/
shopt -s nullglob
capybara bara ref/rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root* new/rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
mv capybara-reports rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}
touch .rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}
- name: Write artifact metadata
env:
NEW_URL: ${{ steps.upload_new_artifact.outputs.artifact-url }}
FOUND_ARTIFACT: ${{ steps.download_previous_artifact.outputs.found_artifact }}
REF_ARTIFACTS_JSON: ${{ steps.download_previous_artifact.outputs.artifacts }}
GITHUB_REPOSITORY_NAME: ${{ github.repository }}
run: |
REF_URL=""
if [ "$FOUND_ARTIFACT" = "true" ]; then
REF_ART_ID=$(echo "$REF_ARTIFACTS_JSON" | jq -r '.[0].id // empty')
REF_RUN_ID=$(echo "$REF_ARTIFACTS_JSON" | jq -r '.[0].workflow_run.id // empty')
if [ -n "$REF_ART_ID" ] && [ -n "$REF_RUN_ID" ]; then
REF_URL="https://github.com/${GITHUB_REPOSITORY_NAME}/actions/runs/${REF_RUN_ID}/artifacts/${REF_ART_ID}"
fi
fi
jq -nc --arg new "$NEW_URL" --arg ref "$REF_URL" '{new: $new, ref: $ref}' \
> rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}/meta.json
- uses: actions/upload-artifact@v7
with:
name: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}.capy
path: |
.rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}
rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}_${{ matrix.arch }}/
if-no-files-found: error
eicrecon-dis:
name: eicrecon (DIS, ${{ matrix.beam }}, minQ2=${{ matrix.minq2 }}, ${{ matrix.detector_config }}, ${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
needs: [eic-manifest, npsim-dis]
container:
image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }}
credentials:
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
strategy:
fail-fast: false
matrix:
beam: [5x41, 10x100, 18x275]
minq2: [1, 1000]
detector_config: [epic_craterlake]
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
exclude:
- beam: 5x41
minq2: 1000
- beam: 10x100
minq2: 1
arch: arm64
- beam: 10x100
minq2: 1000
arch: arm64
- beam: 18x275
minq2: 1
arch: arm64
- beam: 18x275
minq2: 1000
arch: arm64
steps:
- uses: actions/download-artifact@v8
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4hep.root
- name: Run EICrecon
shell: bash --login -eo pipefail {0}
run: |
source /opt/detector/epic-main/bin/thisepic.sh
export DETECTOR_CONFIG=${{ matrix.detector_config }}
eicrecon \
-Ppodio:output_file=rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4eic.root \
sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root
- id: upload_new_artifact
uses: actions/upload-artifact@v7
with:
name: rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4eic.root
path: rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v21
with:
branch: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
path: ref/
name: rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.edm4eic.root
workflow: ".github/workflows/build-push.yml"
workflow_conclusion: "success"
if_no_artifact_found: warn
- name: Compare to previous artifacts
shell: bash --login -eo pipefail {0}
run: |
mkdir capybara-reports
mkdir new
ln -sf ../rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4eic.root new/
shopt -s nullglob
capybara bara ref/rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4eic.root* new/rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4eic.root
mv capybara-reports rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}
touch .rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}
- name: Write artifact metadata
env:
NEW_URL: ${{ steps.upload_new_artifact.outputs.artifact-url }}
FOUND_ARTIFACT: ${{ steps.download_previous_artifact.outputs.found_artifact }}
REF_ARTIFACTS_JSON: ${{ steps.download_previous_artifact.outputs.artifacts }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
REF_URL=""
if [ "$FOUND_ARTIFACT" = "true" ]; then
REF_ART_ID=$(echo "$REF_ARTIFACTS_JSON" | jq -r '.[0].id // empty')
REF_RUN_ID=$(echo "$REF_ARTIFACTS_JSON" | jq -r '.[0].workflow_run.id // empty')
if [ -n "$REF_ART_ID" ] && [ -n "$REF_RUN_ID" ]; then
REF_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${REF_RUN_ID}/artifacts/${REF_ART_ID}"
fi
fi
jq -nc --arg new "$NEW_URL" --arg ref "$REF_URL" '{new: $new, ref: $ref}' \
> rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}/meta.json
- uses: actions/upload-artifact@v7
with:
name: rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}.capy
path: |
.rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}
rec_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_${{ matrix.arch }}/
if-no-files-found: error
npsim-dis-cross-arch:
name: capybara (npsim DIS, ${{ matrix.beam }}, minQ2=${{ matrix.minq2 }}, ${{ matrix.detector_config }}, amd64 vs arm64)
runs-on: ubuntu-latest
needs: [eic-manifest, npsim-dis]
container:
image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }}
credentials:
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
strategy:
fail-fast: false
matrix:
beam: [5x41]
minq2: [1]
detector_config: [epic_craterlake]
steps:
- name: Download amd64 artifact
uses: actions/download-artifact@v8
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_amd64.edm4hep.root
path: amd64/
- name: Download arm64 artifact
uses: actions/download-artifact@v8
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_arm64.edm4hep.root
path: arm64/
- name: Compare amd64 vs arm64 artifacts
shell: bash --login -eo pipefail {0}
run: |
mkdir capybara-reports
capybara bara amd64/sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root arm64/sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}.edm4hep.root
mv capybara-reports sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_amd64_vs_arm64
touch .sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_amd64_vs_arm64
- uses: actions/upload-artifact@v7
with:
name: sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_amd64_vs_arm64.capy
path: |
.sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_amd64_vs_arm64
sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}_amd64_vs_arm64/
if-no-files-found: error
eicrecon-dis-cross-arch:
name: capybara (eicrecon DIS, ${{ matrix.beam }}, minQ2=${{ matrix.minq2 }}, ${{ matrix.detector_config }}, amd64 vs arm64)
runs-on: ubuntu-latest
needs: [eic-manifest, eicrecon-dis]
container:
image: ghcr.io/eic/eic_ci:pipeline-${{ github.run_id }}
credentials:
username: ${{ secrets.GHCR_REGISTRY_USER }}
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
strategy:
fail-fast: false
matrix:
beam: [5x41]
minq2: [1]
detector_config: [epic_craterlake]