Skip to content

Commit a000999

Browse files
authored
Merge branch 'master' into acts-45.1.1
2 parents 686e749 + 65291a0 commit a000999

File tree

9 files changed

+85
-37
lines changed

9 files changed

+85
-37
lines changed

.github/workflows/build-push.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ jobs:
353353
runner: ubuntu-latest
354354
PLATFORM: linux/amd64
355355
target: final
356+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
356357
- BUILD_IMAGE: eic_
357358
BUILD_TYPE: default
358359
BUILDER_IMAGE: debian_stable_base
@@ -362,6 +363,7 @@ jobs:
362363
runner: ubuntu-latest
363364
PLATFORM: linux/amd64/v3
364365
target: final
366+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
365367
- BUILD_IMAGE: eic_
366368
BUILD_TYPE: default
367369
BUILDER_IMAGE: debian_stable_base
@@ -371,6 +373,7 @@ jobs:
371373
runner: ubuntu-24.04-arm
372374
PLATFORM: linux/arm64
373375
target: final
376+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
374377
- BUILD_IMAGE: eic_
375378
BUILD_TYPE: default
376379
BUILDER_IMAGE: debian_stable_base
@@ -380,6 +383,7 @@ jobs:
380383
runner: ubuntu-latest
381384
PLATFORM: linux/amd64
382385
target: final
386+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
383387
- BUILD_IMAGE: eic_
384388
BUILD_TYPE: default
385389
BUILDER_IMAGE: debian_stable_base
@@ -389,6 +393,7 @@ jobs:
389393
runner: ubuntu-latest
390394
PLATFORM: linux/amd64/v3
391395
target: final
396+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
392397
- BUILD_IMAGE: eic_
393398
BUILD_TYPE: default
394399
BUILDER_IMAGE: debian_stable_base
@@ -398,6 +403,7 @@ jobs:
398403
runner: ubuntu-24.04-arm
399404
PLATFORM: linux/arm64
400405
target: final
406+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests"
401407
- BUILD_IMAGE: eic_
402408
BUILD_TYPE: default
403409
BUILDER_IMAGE: cuda_devel
@@ -407,6 +413,7 @@ jobs:
407413
runner: ubuntu-latest
408414
PLATFORM: linux/amd64
409415
target: builder_concretization_default
416+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
410417
- BUILD_IMAGE: eic_
411418
BUILD_TYPE: default
412419
BUILDER_IMAGE: cuda_devel
@@ -415,7 +422,8 @@ jobs:
415422
arch: amd64
416423
runner: ubuntu-latest
417424
PLATFORM: linux/amd64
418-
target: builder_concretization_default
425+
target: final
426+
SPACK_DUPLICATE_ALLOWLIST: "epic|llvm|py-setuptools|py-urllib3"
419427
fail-fast: false
420428
steps:
421429
- name: Free Disk Space (Ubuntu)
@@ -537,6 +545,7 @@ jobs:
537545
RUNTIME_IMAGE=${{ matrix.RUNTIME_IMAGE }}
538546
INTERNAL_TAG=${{ env.INTERNAL_TAG }}
539547
ENV=${{ matrix.ENV }}
548+
SPACK_DUPLICATE_ALLOWLIST=${{ matrix.SPACK_DUPLICATE_ALLOWLIST }}
540549
cache-from: |
541550
type=registry,ref=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/buildcache:${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }}-${{ matrix.BUILD_TYPE }}-${{ env.GITHUB_REF_POINT_SLUG }}-${{ matrix.arch }}
542551
type=registry,ref=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/buildcache:${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }}-${{ matrix.BUILD_TYPE }}-${{ env.GITHUB_BASE_REF_SLUG }}-${{ matrix.arch }}

.gitlab-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,16 @@ eic:
477477
--build-arg JUGGLER_SHA=$(sh .ci/resolve_git_ref eic/juggler ${JUGGLER_VERSION:-main})
478478
}
479479
--build-arg ENV=${ENV}
480+
--build-arg SPACK_DUPLICATE_ALLOWLIST=$(
481+
case "${ENV}" in
482+
ci|ci_without_acts|cuda|dbg|jl|prod)
483+
echo "epic|llvm|py-setuptools|py-urllib3" ;;
484+
xl|tf)
485+
echo "epic|llvm|py-setuptools|py-urllib3|py-dask|py-dask-awkward|py-dask-histogram|py-distributed|py-requests" ;;
486+
*)
487+
echo "epic|llvm|py-setuptools|py-urllib3" ;;
488+
esac
489+
)
480490
--build-arg jobs=${JOBS}
481491
--build-context spack-environment=spack-environment
482492
--secret id=mirrors,src=mirrors.yaml

containers/debian/Dockerfile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ if [ -n "${SPACKPACKAGES_CHERRYPICKS}" ] ; then
237237
done
238238
fi
239239
git -C ${SPACKPACKAGES_ROOT} gc --prune=all --aggressive
240-
spack repo add --scope site "${SPACKPACKAGES_ROOT}/repos/spack_repo/builtin"
240+
spack repo add --scope spack "${SPACKPACKAGES_ROOT}/repos/spack_repo/builtin"
241241
EOF
242242

243243
## Setup build configuration
@@ -252,17 +252,18 @@ declare -A target=(
252252
["linux/arm64"]="aarch64"
253253
)
254254
target=${target[${TARGETPLATFORM}]}
255-
spack config --scope site add "packages:all:require:[target=${target}]"
256-
spack config --scope site add "packages:all:target:[${target}]"
255+
spack config --scope spack add "packages:all:require:[target=${target}]"
256+
spack config --scope spack add "packages:all:target:[${target}]"
257257
spack config blame packages
258+
mkdir -p $HOME/.spack/ # workaround for Spack not creating config directory automatically in some versions (see https://github.com/spack/spack/issues/51564)
258259
spack config --scope user add "config:suppress_gpg_warnings:true"
259260
spack config --scope user add "config:build_jobs:${jobs}"
260261
spack config --scope user add "config:db_lock_timeout:${jobs}00"
261262
spack config --scope user add "config:source_cache:/var/cache/spack"
262263
spack config --scope user add "config:install_tree:root:/opt/software"
263264
spack config --scope user add "config:ccache:true"
264265
spack config blame config
265-
spack compiler find --scope site
266+
spack compiler find --scope spack
266267
# Ensure GCC externals have LTO‑safe binutils configured.
267268
#
268269
# 1. LTO issue being worked around:
@@ -296,9 +297,9 @@ EOF
296297
## - allow llvm to be buildable for py-numba > py-llvmlite
297298
RUN <<EOF
298299
set -e
299-
spack external find --scope site llvm
300-
spack external find --scope site --not-buildable gcc
301-
spack external find --scope site --not-buildable --path /usr/local/cuda/bin cuda
300+
spack external find --scope spack llvm
301+
spack external find --scope spack --not-buildable gcc
302+
spack external find --scope spack --not-buildable --path /usr/local/cuda/bin cuda
302303
spack config blame packages
303304
EOF
304305

@@ -307,8 +308,8 @@ EOF
307308
## - the write-enabled mirror is provided later as a secret mount
308309
RUN --mount=type=cache,target=/var/cache/spack <<EOF
309310
set -e
310-
spack mirror add --scope site --signed spack-${SPACK_VERSION} https://binaries.spack.io/${SPACK_VERSION}
311-
spack mirror add --scope site --unsigned ghcr-${SPACKPACKAGES_VERSION} oci://ghcr.io/eic/spack-${SPACKPACKAGES_VERSION}
311+
spack mirror add --scope spack --signed spack-${SPACK_VERSION} https://binaries.spack.io/${SPACK_VERSION}
312+
spack mirror add --scope spack --unsigned ghcr-${SPACKPACKAGES_VERSION} oci://ghcr.io/eic/spack-${SPACKPACKAGES_VERSION}
312313
spack mirror list
313314
EOF
314315

@@ -321,7 +322,7 @@ RUN <<EOF
321322
set -e
322323
git clone --filter=tree:0 https://github.com/${KEY4HEPSPACK_ORGREPO}.git ${KEY4HEPSPACK_ROOT}
323324
git -C ${KEY4HEPSPACK_ROOT} checkout ${KEY4HEPSPACK_SHA:-${KEY4HEPSPACK_VERSION}}
324-
spack repo add --scope site "${KEY4HEPSPACK_ROOT}"
325+
spack repo add --scope spack "${KEY4HEPSPACK_ROOT}"
325326
EOF
326327

327328
## Setup eic-spack (no need for cherry-picks)
@@ -333,5 +334,5 @@ RUN <<EOF
333334
set -e
334335
git clone --filter=tree:0 https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT}
335336
git -C ${EICSPACK_ROOT} checkout ${EICSPACK_SHA:-${EICSPACK_VERSION}}
336-
spack repo add --scope site "${EICSPACK_ROOT}/spack_repo/eic"
337+
spack repo add --scope spack "${EICSPACK_ROOT}/spack_repo/eic"
337338
EOF

containers/eic/Dockerfile

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ ARG ENV=xl
4646
ENV SPACK_ENV=/opt/spack-environment/${ENV}
4747
ARG SPACK_FLAGS="--backtrace"
4848
ARG SPACK_INSTALL_FLAGS="--no-check-signature --show-log-on-error --yes-to-all"
49+
ARG SPACK_DUPLICATE_ALLOWLIST=""
4950
ENV SPACK_COLOR="always"
5051
ENV GIT_TERMINAL_PROMPT=0
5152

@@ -55,11 +56,19 @@ set -e
5556
spack env activate --without-view --dir ${SPACK_ENV}
5657
spack concretize --force
5758
spack --color=never find --long --no-groups --show-concretized --format "{name}" \
58-
| uniq -D -f2 | grep -v -w -e "\(epic\|llvm\|py-setuptools\|py-urllib3\)" \
59-
| tee /tmp/duplicates.txt
60-
if [ -s /tmp/duplicates.txt ] ; then
61-
echo "Duplicate packages found"
62-
cat /tmp/duplicates.txt | while read status hash spec ; do
59+
| uniq -D -f2 \
60+
| tee /tmp/duplicates_all.txt
61+
if [ -n "${SPACK_DUPLICATE_ALLOWLIST}" ] ; then
62+
grep -Evw "(${SPACK_DUPLICATE_ALLOWLIST})" /tmp/duplicates_all.txt \
63+
| tee /tmp/duplicates_disallowed.txt
64+
else
65+
cat /tmp/duplicates_all.txt \
66+
| tee /tmp/duplicates_disallowed.txt
67+
fi
68+
if [ -s /tmp/duplicates_disallowed.txt ] ; then
69+
echo "Duplicate packages found:"
70+
cat /tmp/duplicates_disallowed.txt
71+
cat /tmp/duplicates_disallowed.txt | while read status hash spec ; do
6372
spack --backtrace spec --long /${hash}
6473
if [ "$prevspec" = "$spec" ] ; then
6574
spack diff /${hash} /${prevhash}
@@ -192,11 +201,19 @@ if [ -n "${JUGGLER_SHA}" ] ; then
192201
fi
193202
spack concretize --force
194203
spack --color=never find --long --no-groups --show-concretized --format "{name}" \
195-
| uniq -D -f2 | grep -v -w -e "\(epic\|llvm\|py-setuptools\|py-urllib3\)" \
196-
| tee /tmp/duplicates.txt
197-
if [ -s /tmp/duplicates.txt ] ; then
198-
echo "Duplicate packages found"
199-
cat /tmp/duplicates.txt | while read status hash spec ; do
204+
| uniq -D -f2 \
205+
| tee /tmp/duplicates_all.txt
206+
if [ -n "${SPACK_DUPLICATE_ALLOWLIST}" ] ; then
207+
grep -Evw "(${SPACK_DUPLICATE_ALLOWLIST})" /tmp/duplicates_all.txt \
208+
| tee /tmp/duplicates_disallowed.txt
209+
else
210+
cat /tmp/duplicates_all.txt \
211+
| tee /tmp/duplicates_disallowed.txt
212+
fi
213+
if [ -s /tmp/duplicates_disallowed.txt ] ; then
214+
echo "Duplicate packages found:"
215+
cat /tmp/duplicates_disallowed.txt
216+
cat /tmp/duplicates_disallowed.txt | while read status hash spec ; do
200217
spack --backtrace spec --long /${hash}
201218
if [ "$prevspec" = "$spec" ] ; then
202219
spack diff /${hash} /${prevhash}
@@ -359,13 +376,13 @@ RUN ldconfig
359376
ENV SPACK_DISABLE_LOCAL_CONFIG="true"
360377
RUN <<EOF
361378
set -e
362-
spack config --scope site add "config:install_tree:root:~/spack"
363-
spack config --scope site add "config:source_cache:~/.spack/cache"
364-
spack config --scope site add "config:binary_index_root:~/.spack"
365-
spack config --scope site add "config:environments_root:~/.spack/env"
366-
spack config --scope site add "config:suppress_gpg_warnings:true"
379+
spack config --scope spack add "config:install_tree:root:~/spack"
380+
spack config --scope spack add "config:source_cache:~/.spack/cache"
381+
spack config --scope spack add "config:binary_index_root:~/.spack"
382+
spack config --scope spack add "config:environments_root:~/.spack/env"
383+
spack config --scope spack add "config:suppress_gpg_warnings:true"
367384
spack config blame config
368-
spack config --scope site add "upstreams:eic-shell:install_tree:/opt/software"
385+
spack config --scope spack add "upstreams:eic-shell:install_tree:/opt/software"
369386
spack config blame upstreams
370387
EOF
371388

docs/spack-environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Spack versions can include cherry-picks from newer commits:
149149

150150
```bash
151151
# From spack.sh
152-
SPACK_VERSION="v1.0.2"
152+
SPACK_VERSION="v1.1.0"
153153
SPACK_CHERRYPICKS=$(cat <<- EOF
154154
09f75ee426a2e05e0543570821582480ff823ba5
155155
a462612b64e97fa7dfe461c32c58553fd6ec63c5

spack-environment/packages.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ packages:
2626
#- any_of: [+ipo, '@:']
2727
- any_of: [build_system=cmake, '@:']
2828
- any_of: [build_type=Release, '@:']
29+
abseil-cpp:
30+
require:
31+
# Without constraints on abseil-cpp, we end up with cxxstd=14 branches
32+
- cxxstd=17
2933
acts:
3034
require:
3135
- '@45.1.1'
3236
- cxxstd=20 +dd4hep +edm4hep +examples +fatras +geant4 +json +onnx +podio +python +svg +root +pr4496 +pr4502 +pr4620
3337
# ACTS requires same compiler as DD4hep since compiler options are reused
3438
- spec: '%gcc'
35-
when: '^dd4hep%gcc'
39+
when: '^dd4hep %gcc'
3640
- spec: '%clang'
37-
when: '^dd4hep%clang'
41+
when: '^dd4hep %clang'
3842
actsvg:
3943
require:
4044
- '@0.4.56'
@@ -242,7 +246,7 @@ packages:
242246
- '@1.0.10'
243247
irt2:
244248
require:
245-
- '@2.1.2'
249+
- '@2.1.3'
246250
iwyu:
247251
require:
248252
- '@0.23:'
@@ -279,9 +283,9 @@ packages:
279283
require:
280284
- '@6.5.5'
281285
- +python
282-
llvm:
283-
require:
284-
- any_of: [~gold, '@:']
286+
#llvm:
287+
#require:
288+
#- any_of: [~gold, '@:']
285289
# FIXME any ipo requirement breaks llvm external reuse
286290
#- any_of: [~ipo, '@:']
287291
madx:
@@ -453,7 +457,7 @@ packages:
453457
- '@0.61.0:'
454458
py-numpy:
455459
require:
456-
- '@2.0.2:'
460+
- '@2.2' # pin to avoid duplicates in eic_tf
457461
py-onnx:
458462
require:
459463
- '@1.17.0'
@@ -579,6 +583,9 @@ packages:
579583
strace:
580584
require:
581585
- -mpers
586+
swig:
587+
require:
588+
- '@4.1:' # constrain to avoid duplicates in eic_tf
582589
tbb:
583590
require:
584591
- 'intel-tbb'

spack-environment/tf/epic/spack.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ spack:
33
- ../../concretizer.yaml
44
- ../../packages.yaml
55
- ../../view.yaml
6+
concretizer:
7+
unify: when_possible # included environment: py-numba needs a different llvm than the one provided as external
68
include_concrete:
79
- /opt/spack-environment/tf
810
specs:

spack-environment/tf/spack.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ spack:
33
- ../concretizer.yaml
44
- ../packages.yaml
55
- ../view.yaml
6+
concretizer:
7+
unify: when_possible # py-numba needs a different llvm than the one provided as external
68
specs:
79
- edm4hep
810
- onnx

spack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SPACK_ORGREPO="spack/spack"
33

44
## Spack github version, e.g. v0.18.1 or commit hash
55
## note: nightly builds will use e.g. releases/v1.0
6-
SPACK_VERSION="v1.0.4"
6+
SPACK_VERSION="v1.1.0"
77

88
## Space-separated list of spack cherry-picks
99
read -r -d '' SPACK_CHERRYPICKS <<- \

0 commit comments

Comments
 (0)