forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
604 lines (541 loc) · 19.8 KB
/
builds.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
name: Builds
on:
push:
pull_request:
branches:
- main
- 'release/**'
- 'develop/**'
paths-ignore:
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CTEST_OUTPUT_ON_FAILURE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 500M
CCACHE_KEY_SUFFIX: r1
jobs:
linux_ubuntu:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2204:v41
env:
INSTALL_DIR: ${{ github.workspace }}/install
ACTS_LOG_FAILURE_THRESHOLD: WARNING
steps:
- name: Install git lfs
run: apt-get update && apt-get install -y git-lfs
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- name: Restore ccache
uses: actions/cache/restore@v3
id: ccache-restore
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux_ubuntu_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux_ubuntu_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
# setting CMAKE_CXX_STANDARD=17 is a workaround for a bug in the
# dd4hep CMake configuration that gets triggered on recent CMake
# versions
run: >
ccache -z &&
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=17
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DACTS_ENABLE_LOG_FAILURE_THRESHOLD=ON
-DACTS_BUILD_EVERYTHING=ON
-DACTS_BUILD_ODD=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ONNX=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: cmake --build build
- name: ccache stats
run: ccache -s
- name: Save ccache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ github.workspace }}/ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Unit tests
run: ctest --test-dir build -j$(nproc)
- name: Integration tests
run: cmake --build build --target integrationtests
- name: Install
run: cmake --build build --target install
- name: Package build
run: tar czf build.tar.gz -C build --exclude "*.o" --exclude "bin/ActsUnitTest*" --exclude "bin/ActsIntegrationTest*" .
- uses: actions/upload-artifact@v3
with:
name: acts-linux-ubuntu
path: build.tar.gz
- name: Downstream configure
run: >
cmake -B build-downstream -S Tests/DownstreamProject
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=17
-DCMAKE_PREFIX_PATH="${INSTALL_DIR}"
- name: Downstream build
run: cmake --build build-downstream
- name: Downstream run
run: ./build-downstream/bin/ShowActsVersion
linux_examples_test:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2204:v41
needs: [linux_ubuntu]
env:
ACTS_SEQUENCER_DISABLE_FPEMON: true
steps:
- name: Install git lfs
run: apt-get update && apt-get install -y git-lfs
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- uses: actions/download-artifact@v3
with:
name: acts-linux-ubuntu
- name: Unpack build
run: mkdir build && tar xf build.tar.gz -C build
- name: Python level tests
shell: bash
env:
PYTEST_MD_REPORT: true
PYTEST_MD_REPORT_VERBOSE: 0
PYTEST_MD_REPORT_OUTPUT: pytest.md
run: >
/usr/local/bin/geant4-config --install-datasets
&& source /usr/local/bin/thisroot.sh
&& source /usr/local/bin/thisdd4hep_only.sh
&& source /usr/local/bin/geant4.sh
&& source build/python/setup.sh
&& export PYTHONPATH=/usr/local/python:$PYTHONPATH
&& export LD_LIBRARY_PATH=$PWD/build/thirdparty/OpenDataDetector/factory:$LD_LIBRARY_PATH
&& pip3 install -r Examples/Python/tests/requirements.txt
&& pip3 install pytest-md-report
&& pytest -rFsv -k "not exatrkx" -v
&& cat ${PYTEST_MD_REPORT_OUTPUT} >> $GITHUB_STEP_SUMMARY
linux_physmon:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2204:v41
needs: [linux_ubuntu]
env:
ACTS_SEQUENCER_DISABLE_FPEMON: true
steps:
- name: Install git lfs
run: apt-get update && apt-get install -y git-lfs
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- uses: actions/download-artifact@v3
with:
name: acts-linux-ubuntu
- name: Unpack build
run: mkdir build && tar xf build.tar.gz -C build
- name: Save PR number
if: ${{ github.event_name == 'pull_request' }}
run: |
mkdir -p physmon
echo ${{ github.event.number }} > physmon/pr_number
echo ${{ github.event.pull_request.head.sha }} > physmon/sha
- name: Physics performance checks
shell: bash
run: >
echo "::group::Dependencies"
&& git config --global safe.directory "$GITHUB_WORKSPACE"
&& pip3 install histcmp==0.6.5 spyral-cli==1.1.1 matplotlib
&& pip3 install -r Examples/Scripts/requirements.txt
&& /usr/local/bin/geant4-config --install-datasets
&& source /usr/local/bin/thisroot.sh
&& source /usr/local/bin/thisdd4hep_only.sh
&& source /usr/local/bin/geant4.sh
&& source build/python/setup.sh
&& export LD_LIBRARY_PATH=$PWD/build/thirdparty/OpenDataDetector/factory:$LD_LIBRARY_PATH
&& echo "::endgroup::"
&& export PYTHONPATH="${PYTHONPATH}":"${GITHUB_WORKSPACE}/Examples/Scripts/Python"
&& CI/physmon/phys_perf_mon.sh all physmon
&& cat physmon/summary.md >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v3
if: always()
with:
name: physmon
path: physmon
linux_physmon_perf_report:
needs: [linux_physmon]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Install dependencies
run: pip3 install spyral-cli==1.1.0
- uses: actions/download-artifact@v3
with:
name: physmon
path: physmon
- name: Store metrics
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.RUNTIME_METRIC_DEPLOY_SSH_KEY }}"
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git clone [email protected]:acts-project/runtime_metrics.git
spyral maxima runtime_metrics/metrics.csv physmon/memory/*.csv -e $(date +%Y-%m-%dT%H-%M-%S) -e ${GITHUB_REF_NAME} -e ${GITHUB_REF} -e ${GITHUB_SHA}
cd runtime_metrics
git add -A
git commit -m"update metrics"
git push
linux_ubuntu_extra:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: ubuntu2004
std: 17
- image: ubuntu2204_cpp20
std: 20
- image: ubuntu2204_clang
std: 17
container: ghcr.io/acts-project/${{ matrix.image }}:v41
env:
INSTALL_DIR: ${{ github.workspace }}/install
ACTS_LOG_FAILURE_THRESHOLD: WARNING
steps:
- name: Install git lfs
run: apt-get update && apt-get install -y git-lfs
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- name: Restore ccache
uses: actions/cache/restore@v3
id: ccache-restore
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux_${{ matrix.image }}_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux_${{ matrix.image }}_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
# setting CMAKE_CXX_STANDARD=17 is a workaround for a bug in the
# dd4hep CMake configuration that gets triggered on recent CMake
# versions
run: >
ccache -z &&
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DACTS_ENABLE_LOG_FAILURE_THRESHOLD=ON
-DACTS_BUILD_EVERYTHING=ON
-DACTS_BUILD_ODD=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_FORCE_ASSERTIONS=OFF
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: cmake --build build
- name: ccache stats
run: ccache -s
- name: Save ccache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ github.workspace }}/ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Unit tests
run: cmake --build build --target test
- name: Integration tests
run: cmake --build build --target integrationtests
- name: Install
run: cmake --build build --target install
- name: Downstream configure
run: >
cmake -B build-downstream -S Tests/DownstreamProject
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=17
-DCMAKE_PREFIX_PATH="${INSTALL_DIR}"
- name: Downstream build
run: cmake --build build-downstream
- name: Downstream run
run: ./build-downstream/bin/ShowActsVersion
linux-nodeps:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/${{ matrix.image }}:v41
strategy:
matrix:
image:
# Note: We only want the centos8 base here, and so we do not
# setup the lcg environment below
- centos8-lcg100-gcc10
env:
# NOTE: we setup the ROOT from LCG even though this is a
# "nodeps" build. This is because we want to test that the boost
# dependency is handled correctly when building the examples
# (same for tbb below). ROOT is available from the "epel"
# official centos8 repo, but to save hundreds of MB's of package
# download we simply use lcg for this one package.
SETUP: source /opt/lcg/ROOT/v6.24.00-e7098/x86_64-centos8-gcc10-opt/bin/thisroot.sh
PRELOAD: export LD_PRELOAD=/opt/lcg/gcc/10/x86_64-centos8/lib64/libstdc++.so.6
INSTALL_DIR: ${{ github.workspace }}/install
steps:
- uses: actions/checkout@v3
- name: Install dependencies
# Install tbb-devel also to build the examples
run: >
dnf -y install ninja-build tbb-devel ccache
&& ln -s $(find / -type f -name 'ccache') /usr/local/bin/ccache
- name: Restore ccache
uses: actions/cache/restore@v3
id: ccache-restore
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux-nodeps_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux-nodeps_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
ccache -z &&
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DACTS_BUILD_UNITTESTS=ON
-DACTS_BUILD_INTEGRATIONTESTS=ON
-DACTS_LOG_FAILURE_THRESHOLD=WARNING
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_USE_SYSTEM_BOOST=OFF
-DACTS_USE_SYSTEM_EIGEN3=OFF
-DACTS_BUILD_PLUGIN_JSON=ON
- name: Build
run: ${SETUP} && ( cmake --build build || cmake --build build )
# The above line is required as a sort of retry mechanism. Without it,
# the build fails for technical reasons.
- name: ccache stats
run: ccache -s
- name: Save ccache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ github.workspace }}/ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Unit tests
run: ${SETUP} && cmake --build build --target test
- name: Integration tests
run: ${SETUP} && cmake --build build --target integrationtests
- name: Install
run: ${SETUP} && cmake --build build --target install
# For some reasons, this version of ROOT complains that it
# cannot find the nlohmann::json config before we even installed
# it. So we have to do the examples in separate step.
- name: Configure Examples
run: >
${SETUP} &&
cmake -B build -S .
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DACTS_LOG_FAILURE_THRESHOLD=WARNING
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_USE_SYSTEM_BOOST=OFF
-DACTS_USE_SYSTEM_EIGEN3=OFF
-DACTS_BUILD_EXAMPLES=ON
- name: Build Examples
run: ${SETUP} && cmake --build build
- name: Install Examples
run: ${SETUP} && cmake --build build --target install
- name: Run Examples
# Run a single example to be sure that the boost dependencies
# got linked correctly
run: ${SETUP} && ${PRELOAD} && "${INSTALL_DIR}/bin/ActsExampleHelloWorld" -n 1
- name: Downstream configure
run: >
${SETUP} &&
cmake -B build-downstream-nodeps -S Tests/DownstreamProjectNodeps
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_PREFIX_PATH="${INSTALL_DIR}"
- name: Downstream build
run: cmake --build build-downstream-nodeps
- name: Downstream run
run: ./build-downstream-nodeps/bin/ShowActsVersion
&& CI/check_boost_eigen_versions.sh ./build-downstream-nodeps/bin/ShowActsVersion
macos:
runs-on: macos-11
env:
INSTALL_DIR: ${{ github.workspace }}/install
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- name: Install dependencies
run: >
brew install cmake eigen ninja ccache
&& sudo mkdir /usr/local/acts
&& sudo chown $USER /usr/local/acts
&& wget --verbose --progress=dot:giga --continue --retry-connrefused --tries=5 --timeout=2 -O deps.tar.gz https://acts.web.cern.ch/ACTS/ci/macOS/deps.67dd08d.tar.gz
&& tar -xf deps.tar.gz -C /usr/local/acts
&& python3 -m pip install pyyaml jinja2
- name: Restore ccache
uses: actions/cache/restore@v3
id: ccache-restore
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
# setting CMAKE_CXX_STANDARD=17 is a workaround for a bug in the
# dd4hep CMake configuration that gets triggered on recent CMake
# versions such as the one installed via homebrew
run: >
ccache -z &&
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DPython_EXECUTABLE=$(command -v python3)
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=17
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DCMAKE_PREFIX_PATH=/usr/local/acts
-DACTS_BUILD_EVERYTHING=ON
-DACTS_BUILD_ODD=ON
-DACTS_LOG_FAILURE_THRESHOLD=WARNING
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
- name: Build
run: cmake --build build
- name: ccache stats
run: ccache -s
- name: Save ccache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ github.workspace }}/ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Unit tests
run: cmake --build build --target test
- name: Integration tests
run: cmake --build build --target integrationtests
- name: Install
run: cmake --build build --target install
- uses: actions/upload-artifact@v3
with:
name: acts-macos
path: ${{ env.INSTALL_DIR }}
- name: Downstream configure
run: >
cmake -B build-downstream -S Tests/DownstreamProject
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=17
-DCMAKE_PREFIX_PATH="${INSTALL_DIR};/usr/local/acts"
- name: Downstream build
run: cmake --build build-downstream
- name: Downstream run
run: ./build-downstream/bin/ShowActsVersion
cuda:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu1804_cuda:v41
steps:
- uses: actions/checkout@v3
- name: Restore ccache
uses: actions/cache/restore@v3
id: ccache-restore
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-cuda_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-cuda_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
ccache -z &&
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER=/usr/bin/g++-8
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DACTS_BUILD_PLUGIN_CUDA=ON
-DACTS_BUILD_UNITTESTS=ON
- name: Build
run: cmake --build build
- name: ccache stats
run: ccache -s
- name: Save ccache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ github.workspace }}/ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
sycl:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2004_oneapi:v41
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Restore ccache
uses: actions/cache/restore@v3
id: ccache-restore
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-sycl_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-sycl_${{ env.CCACHE_KEY_SUFFIX }}_
- name: Configure
run: >
source /opt/intel/oneapi/setvars.sh
&& ccache -z
&& cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER=/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/clang++
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DACTS_SETUP_VECMEM=ON
-DACTS_BUILD_PLUGIN_SYCL=ON
-DACTS_BUILD_UNITTESTS=ON
- name: Build
run: >
source /opt/intel/oneapi/setvars.sh
&& cmake --build build
- name: ccache stats
run: ccache -s
- name: Save ccache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ github.workspace }}/ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}