-
Notifications
You must be signed in to change notification settings - Fork 45
712 lines (680 loc) · 24.6 KB
/
linux-eic-shell.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
name: linux-eic-shell
on:
push:
branches:
- main
tags:
- '*'
pull_request:
merge_group:
workflow_dispatch: # allow manual triggering
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
xmllint-before-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
find compact/ -name "*.xml" -exec xmllint {} \; > /dev/null
list-detector-configs:
runs-on: ubuntu-latest
outputs:
configs_csv: ${{ steps.list-detector-configs.outputs.configs_csv }}
configs_json: ${{ steps.list-detector-configs.outputs.configs_json }}
steps:
- uses: actions/checkout@v4
- id: list-detector-configs
run: |
CONFIGS_CSV=$(
ls -1 configurations | sed 's/^/epic_/g' | xargs | sed 's/\.yml//g;s/ /,/g'
)
CONFIGS_JSON=$((
echo '['
ls -1 configurations | sed 's/^/epic_/g' | xargs | sed 's/\.yml//g;s/ /, /g' | xargs -n 1 echo | sed -r 's/^([^,]*)(,?)$/"\1"\2/'
echo ']'
) | jq -c .)
echo "configs_csv=${CONFIGS_CSV}" | tee -a $GITHUB_OUTPUT
echo "configs_json=${CONFIGS_JSON}" | tee -a $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: xmllint-before-build
strategy:
matrix:
include:
- CC: gcc
CXX: g++
- CC: clang
CXX: clang++
env:
PREFIX: ${{ github.workspace }}/install
steps:
- uses: actions/checkout@v4
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
echo "timestamp=$(date --iso-8601=minutes)" >> $GITHUB_OUTPUT
- name: Retrieve ccache cache files
uses: actions/cache@v4
with:
path: .ccache
key: ccache-${{ matrix.CC }}-${{ github.ref_name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ccache-${{ matrix.CC }}-${{ github.ref_name }}-
ccache-${{ matrix.CC }}-
ccache-
- name: Configure ccache
run: |
mkdir -p ~/.ccache/
echo "cache_dir=${{ github.workspace }}/.ccache" >> ~/.ccache/ccache.conf
echo "max_size=500MB" >> ~/.ccache/ccache.conf
echo "compression=true" >> ~/.ccache/ccache.conf
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Setup CVMFS OSG eic-shell environment
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
run: |
eic-info
- name: Build detector geometry
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
run: |
CC=${{ matrix.CC }} CXX=${{ matrix.CXX }} cmake -B build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build build -- -k -j $(getconf _NPROCESSORS_ONLN) install
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.CC }}-full-eic-shell
path: install/
if-no-files-found: error
- run: |
source install/bin/thisepic.sh
sed -i 's%\(<fiber\|<lens\)%<comment>\1%g; s%\(/fiber>\|/lens>\)%\1</comment>%g' \
${DETECTOR_PATH}/compact/ecal/bic_default.xml \
${DETECTOR_PATH}/compact/ecal/forward_scfi.xml \
${DETECTOR_PATH}/compact/far_forward/ZDC_Ecal_WSciFi.xml \
${DETECTOR_PATH}/compact/pid/mrich.xml
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.CC }}-fast-eic-shell
path: install/
if-no-files-found: error
xmllint-after-build:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
find install/share -name "*.xml" -exec xmllint {} \; > /dev/null
trigger-geoviewer:
runs-on: ubuntu-latest
needs:
- xmllint-after-build
- list-detector-configs
steps:
- uses: eic/trigger-gitlab-ci@v3
id: trigger
with:
url: https://eicweb.phy.anl.gov
project_id: 539
token: ${{ secrets.EICWEB_GEOVIEWER_TRIGGER }}
ref_name: main
variables: |
DETECTOR=epic
DETECTOR_REPOSITORYURL=${{ github.server_url }}/${{ github.repository }}
DETECTOR_REPOSITORYREF=${{ github.ref }}
DETECTOR_CONFIG=${{ needs.list-detector-configs.outputs.configs_csv }}
DETECTOR_VERSION=${{ github.sha }}
GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_SHA=${{ github.event.pull_request.head.sha || github.sha }}
GITHUB_PR=${{ github.event.pull_request.number }}
check-geometry-configs:
needs:
- build
- list-detector-configs
uses: ./.github/workflows/check-geometry-configs.yml
with:
detector_configs: ${{needs.list-detector-configs.outputs.configs_csv}}
check-tracking-geometry:
needs: build
uses: ./.github/workflows/check-tracking-geometry.yml
with:
detector_configs: "['epic_craterlake', 'epic_ip6']"
validate-material-map:
runs-on: ubuntu-latest
needs:
- build
- check-tracking-geometry
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/bin/thisepic.sh
run: |
pushd scripts/material_map
export DETECTOR_CONFIG=epic_craterlake_material_map
./run_material_map_validation.sh
popd
- uses: actions/upload-artifact@v4
with:
name: material_map
path: |
"scripts/material_map/*.json"
"scripts/material_map/*.root"
scripts/material_map/Surfaces/
scripts/material_map/Validation/
if-no-files-found: error
convert-to-gdml:
needs:
- build
- list-detector-configs
uses: ./.github/workflows/convert-to-gdml.yml
with:
detector_configs: ${{needs.list-detector-configs.outputs.configs_csv}}
convert-to-tgeo:
needs:
- build
- list-detector-configs
uses: ./.github/workflows/convert-to-tgeo.yml
with:
detector_configs: ${{needs.list-detector-configs.outputs.configs_csv}}
convert-to-step:
needs:
- build
- list-detector-configs
uses: ./.github/workflows/convert-to-step.yml
with:
detector_configs: ${{needs.list-detector-configs.outputs.configs_json}}
dump-constants:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
detector_config: [epic_craterlake]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "none"
setup: install/bin/thisepic.sh
run: |
mkdir -p doc
npdet_info dump ${DETECTOR_PATH}/${{matrix.detector_config}}.xml | tee doc/${{matrix.detector_config}}_constants.out
- uses: actions/upload-artifact@v4
with:
name: ${{matrix.detector_config}}_constants.out
path: doc/${{matrix.detector_config}}_constants.out
if-no-files-found: error
dump-parameter-table:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
detector_config: [epic_craterlake]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "none"
setup: install/bin/thisepic.sh
run: |
mkdir -p doc
npdet_info dump ${DETECTOR_PATH}/${{matrix.detector_config}}.xml | grep -v '^\s' | grep '=' | cut -d= -f1-2 | tee doc/${{matrix.detector_config}}_constants.toml
cp doc/${{matrix.detector_config}}_constants.toml doc/constants.toml
python bin/make_detector_parameter_table | tee doc/${{matrix.detector_config}}.csv
sqlite3 -cmd \
".import --csv doc/${{matrix.detector_config}}.csv detector_parameter_table" \
".headers on" \
".mode html" \
".output doc/${{matrix.detector_config}}.html" \
"select * from detector_parameter_table;"
sed -i '1s/^/<html><body><table border="1" style="border-collapse:collapse">\n/;$a</table></body></html>' doc/${{matrix.detector_config}}.html
- uses: actions/upload-artifact@v4
with:
name: ${{matrix.detector_config}}_constants.toml
path: doc/${{matrix.detector_config}}_constants.toml
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: ${{matrix.detector_config}}_DetectorParameterTable
path: |
doc/${{matrix.detector_config}}.csv
doc/${{matrix.detector_config}}.html
if-no-files-found: error
merge-constants:
runs-on: ubuntu-latest
needs:
- dump-constants
- dump-parameter-table
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: constants
pattern: '*_constants.*'
delete-merged: true
merge-parameter-table:
runs-on: ubuntu-latest
needs:
- dump-parameter-table
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: DetectorParameterTable
pattern: '*_DetectorParameterTable'
delete-merged: true
check-overlap-tgeo:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
option: ['m'] #, 's'] # FIXME
detector_config: [epic_craterlake] # FIXME
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "bridge" # this job must succeed even when new artifacts
setup: install/bin/thisepic.sh
run: |
mkdir -p doc
checkOverlaps --option ${{ matrix.option }} -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_tgeo.out
noverlaps="$(grep -c ovlp doc/overlap_check_tgeo.out || true)"
if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi
check-geometry-full:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/bin/thisepic.sh
run: |
mkdir -p doc
checkGeometry -f true -c ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml | tee geometry_check_full.out
mv statistics.root geometry_check_full.root
- uses: actions/upload-artifact@v4
with:
name: check-geometry-full
path: |
geometry_check_full.out
geometry_check_full.root
if-no-files-found: error
check-overlap-geant4:
runs-on: ubuntu-latest
needs:
- build
strategy:
matrix:
detector_config: [epic_craterlake]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "bridge" # this job must succeed even when new artifacts
setup: install/bin/thisepic.sh
run: |
mkdir -p doc
python scripts/checkOverlaps.py -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_geant4.out
noverlaps="$(grep -c GeomVol1002 doc/overlap_check_geant4.out || true)"
if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi
check-overlap-geant4-fast:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
detector_config: [epic_inner_detector, epic_craterlake]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-fast-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "bridge" # this job must succeed even when new artifacts
setup: install/bin/thisepic.sh
run: |
mkdir -p doc
python scripts/checkOverlaps.py -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_geant4.out
noverlaps="$(grep -c GeomVol1002 doc/overlap_check_geant4.out || true)"
if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi
trigger-container:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
needs: [check-overlap-tgeo, check-overlap-geant4-fast]
steps:
- uses: eic/trigger-gitlab-ci@v3
id: trigger
with:
url: https://eicweb.phy.anl.gov
project_id: 290
token: ${{ secrets.EICWEB_CONTAINER_TRIGGER }}
ref_name: master
variables: |
DETECTOR=epic
DETECTOR_REPOSITORYURL=${{ github.server_url }}/${{ github.repository }}
DETECTOR_VERSION=${{ github.sha }}
DETECTOR_CONFIG=epic_craterlake
GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_SHA=${{ github.event.pull_request.head.sha || github.sha }}
GITHUB_PR=${{ github.event.pull_request.number }}
EPIC_VERSION="${{ github.event.pull_request.head.ref || github.ref_name }}"
PIPELINE_NAME=${{ github.repository }}: ${{ github.event.pull_request.title || github.ref_name }}
- run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha || github.sha }} \
-f state="pending" \
-f target_url="${{ steps.trigger.outputs.web_url }}" \
-f description="Triggered... $(TZ=America/New_York date)" \
-f context="eicweb/eic_container"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
generate-prim-file:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
detector_config: [epic_craterlake]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-fast-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "none"
setup: install/bin/thisepic.sh
run: |
bin/generate_prim_file -c $DETECTOR_PATH/${{ matrix.detector_config }}.xml -o prim -D -t ${{ matrix.detector_config }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.detector_config }}.prim
path: prim/${{ matrix.detector_config }}.prim
if-no-files-found: error
retention-days: 1
dawn-view:
runs-on: ubuntu-latest
needs: generate-prim-file
strategy:
matrix:
view: [view1, view2, view3, view6, view7, view11, view13, view50]
detector_config: [epic_craterlake]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.detector_config }}.prim
path: prim/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "none"
run: |
mkdir -p images
bin/make_dawn_views -i prim/${{ matrix.detector_config }}.prim -t ${{ matrix.view }} -d scripts/${{ matrix.view }} -D
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.detector_config }}_views_${{ matrix.view }}
path: images/
if-no-files-found: error
dawn-view-slices:
runs-on: ubuntu-latest
needs: generate-prim-file
if: github.ref == 'refs/heads/main'
strategy:
matrix:
view: [view12, view14, view15]
slice: [100, 300, 500, 700, 900, 1100, 1300, 1500, 1700, 1900]
detector_config: [epic_craterlake]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.detector_config }}.prim
path: prim/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
network_types: "none"
run: |
mkdir -p images
bin/make_dawn_views -i prim/${{ matrix.detector_config }}.prim -t ${{ matrix.view }} -d scripts/${{ matrix.view }} -D -- ${{ matrix.slice }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.detector_config }}_views_${{ matrix.view }}_${{ matrix.slice }}
path: images/
if-no-files-found: error
#TODO view20
merge-dawn-view:
runs-on: ubuntu-latest
needs:
- dawn-view
- dawn-view-slices
strategy:
matrix:
detector_config: [epic_craterlake]
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: ${{ matrix.detector_config }}_views
pattern: ${{ matrix.detector_config }}_views_*
delete-merged: true
npsim-gun:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
particle: [pi, e]
detector_config: [epic_craterlake]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/bin/thisepic.sh
run: |
npsim --compactFile ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml -G --random.seed 1 --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
- uses: actions/upload-artifact@v4
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.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@v6
with:
branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
path: ref/
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
workflow_conclusion: ""
if_no_artifact_found: warn
- name: Compare to previous artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/bin/thisepic.sh
run: |
export PYTHONPATH=$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH
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 }}
touch .sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
- uses: actions/upload-artifact@v4
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.capy
path: |
.sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}/
if-no-files-found: error
npsim-dis:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
beam: [5x41, 10x100, 18x275]
minq2: [1, 1000]
detector_config: [epic_craterlake]
exclude:
- beam: 5x41
minq2: 1000
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/bin/thisepic.sh
run: |
url=root://dtn-eic.jlab.org//work/eic2/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
- uses: actions/upload-artifact@v4
with:
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.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@v6
with:
branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
path: ref/
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
workflow_conclusion: ""
if_no_artifact_found: warn
- name: Compare to previous artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/bin/thisepic.sh
run: |
pip install 'pygithub>=2' 'bokeh>=3'
export PYTHONPATH=$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH
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 }}
touch .sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}
- uses: actions/upload-artifact@v4
with:
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.capy
path: |
.sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}
sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}/
if-no-files-found: error
merge-npsim-capybara:
runs-on: ubuntu-latest
needs:
- npsim-gun
- npsim-dis
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: capybara-report
pattern: |
*.capy
delete-merged: true
build-artifacts-page:
runs-on: ubuntu-latest
needs:
- convert-to-gdml
- convert-to-tgeo
- merge-constants
- merge-parameter-table
- merge-dawn-view
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts/
- uses: actions/jekyll-build-pages@v1
- uses: actions/upload-pages-artifact@v3
with:
retention-days: 7
deploy-artifacts-page:
needs:
- build-artifacts-page
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4