Skip to content
Open
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
aba2719
Add macOS CI workflow using spack/setup-spack and spack/github-action…
wdconinc Dec 18, 2025
61b57b4
Align macOS CI with container build: derive configuration at runtime …
Copilot Dec 19, 2025
36be71a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 9, 2026
9cd97c1
fix(ci): matrix on ENV [ci, xl] instead of compiler
wdconinc Aug 9, 2026
d818597
fix: spack/setup-spack => manual clone
wdconinc Aug 9, 2026
013c767
fix(ci): only run on push to master
wdconinc Aug 9, 2026
43c4444
fix(macos): avoid external cmake
wdconinc Aug 9, 2026
8ad8b05
fix(macos): buildcache autopush unsigned with secrets
wdconinc Aug 9, 2026
dc629dc
fix(macos): clone spack for spack
wdconinc Aug 9, 2026
f4fb6b5
fix(ci): add key4hep-spack, eic-spack, and fixup repo.yaml location
wdconinc Aug 9, 2026
6a8eac5
fix: key4hep url fix
wdconinc Aug 9, 2026
2cfcdb1
fix: cd into cloned path
wdconinc Aug 9, 2026
0185366
fix: spack repo add relative to spack root
wdconinc Aug 9, 2026
c120d17
fix: avoid activate; install both ENV and ENV/epic
wdconinc Aug 9, 2026
e7245a8
fix: packages: clang on darwin
wdconinc Aug 9, 2026
2345030
fix: strace on linux only
wdconinc Aug 9, 2026
3fef000
fix: gl/glu provided by apple-gl/glu on darwin
wdconinc Aug 9, 2026
6b4b421
fix: darwin: c,cxx=apple-clang, fortran=gcc
wdconinc Aug 9, 2026
6b74af0
fix: use definitions for extra packages per platform
wdconinc Aug 9, 2026
5c8a576
fix: disable view in macOS (/opt/local not writable)
wdconinc Aug 9, 2026
1c78613
fix: add comment on definitions:when syntax
wdconinc Aug 9, 2026
e25d698
fix: epic: install with view:false
wdconinc Aug 9, 2026
2739b7b
fix: allow for empty and duplicative cherry-picks
wdconinc Aug 9, 2026
dd27cc4
fix: packages: require: ~opengl when platform=darwin
wdconinc Aug 9, 2026
bef60cc
fix: packages: geant4: require: ~x11 when platform=linux
wdconinc Aug 9, 2026
b685c6f
fix: packages: qt{-base}: require: +opengl also on darwin
wdconinc Aug 9, 2026
22f25e2
fix: packages: root: require: ~x when darwin
wdconinc Aug 9, 2026
81004af
fix: grammar
wdconinc Aug 9, 2026
446cda3
fix: spack install ~~install~~ epic
wdconinc Aug 9, 2026
35d64a6
fix(ci): fail-fast: false, cancel-in-progress: false
wdconinc Aug 9, 2026
6621aec
fix: use actions/checkout (faster)
wdconinc Aug 9, 2026
6929f4b
fix: spack cherry-pick: readline: switch url for patch download
wdconinc Aug 9, 2026
262472b
fix: correct checkout syntax
wdconinc Aug 9, 2026
5750755
fix: checkout syntax
wdconinc Aug 10, 2026
4be1419
fix: fetch pull request for cherry-picking in CI
wdconinc Aug 10, 2026
904af07
fix: add fetch for pull request 52207 in macOS CI
wdconinc Aug 10, 2026
d3d2cda
Update SPACK_CHERRYPICKS with new commit hash
wdconinc Aug 10, 2026
94fca93
Update SPACKPACKAGES_CHERRYPICKS with new package
wdconinc Aug 10, 2026
b810184
Fetch develop branch in macOS CI workflow
wdconinc Aug 10, 2026
c0bb828
Remove cherry-pick reference and update comments
wdconinc Aug 10, 2026
b2c6b19
Modify SPACKPACKAGES_CHERRYPICKS entries
wdconinc Aug 10, 2026
c5a17fc
Update package version for py-tensorboard
wdconinc Aug 10, 2026
c9af7e2
Add fetch for pull request 3698 in macOS CI
wdconinc Aug 10, 2026
d1ba781
Update TensorFlow and add missing dependencies
wdconinc Aug 10, 2026
a2412b8
Add fetch for pull request 4871 in macOS CI workflow
wdconinc Aug 10, 2026
7dfe2b8
Add fetch for pull request 5856 in macOS CI workflow
wdconinc Aug 10, 2026
32fe2fe
Add 'tf' to the environment matrix in CI workflow
wdconinc Aug 10, 2026
261e1eb
Add platform-specific TensorFlow definitions
wdconinc Aug 10, 2026
5f0f2e7
fix: concretize $ENV/epic; move compilers/externals/mirrors to scope …
wdconinc Aug 10, 2026
7a32392
fix: add valgrind to linux_packages
wdconinc Aug 10, 2026
55d0d8f
fix: unpin binutils
wdconinc Aug 10, 2026
900644e
Set MACOSX_DEPLOYMENT_TARGET in macOS CI workflow
wdconinc Aug 10, 2026
b1eb757
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 10, 2026
382e34e
fix: ci: move more packages to linux-only
wdconinc Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: macOS CI Build

on:
push:
branches:
- master
pull_request:
branches:
- master
Comment on lines +7 to +9
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false

permissions:
contents: read
packages: write
Comment on lines +16 to +18

jobs:
build:
runs-on: macos-latest
Comment thread
wdconinc marked this conversation as resolved.
strategy:
fail-fast: false
matrix:
ENV: [ci, xl, tf]

env:
GITHUB_REGISTRY_USER: ${{ secrets.GHCR_REGISTRY_USER }}
GITHUB_REGISTRY_TOKEN: ${{ secrets.GHCR_REGISTRY_TOKEN }}
Comment on lines +28 to +30
Comment on lines +28 to +30

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Extract Spack configuration
id: spack-config
run: |
# Source spack.sh to get SPACK_VERSION and SPACK_CHERRYPICKS
source spack.sh
echo "spack-version=${SPACK_VERSION}" >> $GITHUB_OUTPUT
echo "spack-cherrypicks<<EOF" >> $GITHUB_OUTPUT
echo "${SPACK_CHERRYPICKS}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# Source spack-packages.sh to get SPACKPACKAGES_VERSION and SPACKPACKAGES_CHERRYPICKS
source spack-packages.sh
echo "spackpackages-version=${SPACKPACKAGES_VERSION}" >> $GITHUB_OUTPUT
echo "spackpackages-cherrypicks<<EOF" >> $GITHUB_OUTPUT
echo "${SPACKPACKAGES_CHERRYPICKS}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# Source key4hep-spack.sh to get KEY4HEPSPACK_VERSION
source key4hep-spack.sh
echo "key4hepspack-version=${KEY4HEPSPACK_VERSION}" >> $GITHUB_OUTPUT

# Source eic-spack.sh to get EICSPACK_VERSION
source eic-spack.sh
echo "eicspack-version=${EICSPACK_VERSION}" >> $GITHUB_OUTPUT

# Extract buildcache URL from mirrors.yaml.in (simplified - get the version)
echo "buildcache-version=${SPACKPACKAGES_VERSION}" >> $GITHUB_OUTPUT

- name: Checkout Spack repository
uses: actions/checkout@v7
with:
repository: spack/spack
path: spack
ref: ${{ steps.spack-config.outputs.spack-version }}
Comment thread
Copilot marked this conversation as resolved.
fetch-depth: 0

- name: Configure spack
run: |
cd ${{ github.workspace }}/spack
echo "${{ github.workspace }}/spack/bin" >> $GITHUB_PATH
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

# Fetch branches from which we cherry-pick
git fetch origin refs/heads/develop:refs/heads/develop
git fetch origin pull/51584/head:pr-51584
git fetch origin pull/52207/head:pr-52207

# Apply cherry-picks from spack.sh (match only valid git commit hashes)
while read -r commit; do
if git merge-base --is-ancestor "${commit}" HEAD; then
echo "Skipping already applied ${commit}"
continue
fi
echo "Cherry-picking ${commit}"
git cherry-pick "${commit}"
done < <(echo "${{ steps.spack-config.outputs.spack-cherrypicks }}" | grep -E '^[a-f0-9]{40}$' || true)

- name: Checkout spack-packages repository
uses: actions/checkout@v7
with:
repository: spack/spack-packages
path: spack/var/spack/repos/spack-packages
ref: ${{ steps.spack-config.outputs.spackpackages-version }}

- name: Configure spack-packages
run: |
cd ${{ github.workspace }}/spack/var/spack/repos/spack-packages
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

# Fetch branches from which we cherry-pick
git fetch origin refs/heads/develop:refs/heads/develop
git fetch origin pull/3698/head:pr-3698
git fetch origin pull/4871/head:pr-4871
git fetch origin pull/5856/head:pr-5856

# Apply cherry-picks from spack-packages.sh (match only valid git commit hashes)
while read -r commit; do
if git merge-base --is-ancestor "${commit}" HEAD; then
echo "Skipping already applied ${commit}"
continue
fi
echo "Cherry-picking ${commit}"
git cherry-pick "${commit}"
done < <(echo "${{ steps.spack-config.outputs.spackpackages-cherrypicks }}" | grep -E '^[a-f0-9]{40}$' || true)

cd ${{ github.workspace }}/spack
spack repo add var/spack/repos/spack-packages/repos/spack_repo/builtin

- name: Checkout key4hep-spack repository
uses: actions/checkout@v7
with:
repository: key4hep/key4hep-spack
path: spack/var/spack/repos/key4hep-spack
ref: ${{ steps.spack-config.outputs.key4hepspack-version }}

- name: Configure key4hep-spack
run: |
cd ${{ github.workspace }}/spack
spack repo add var/spack/repos/key4hep-spack
Comment thread
wdconinc marked this conversation as resolved.

- name: Checkout eic-spack repository
uses: actions/checkout@v7
with:
repository: eic/eic-spack
path: spack/var/spack/repos/eic-spack
ref: ${{ steps.spack-config.outputs.eicspack-version }}

- name: Configure eic-spack
run: |
cd ${{ github.workspace }}/spack
spack repo add var/spack/repos/eic-spack/spack_repo/eic
Comment thread
wdconinc marked this conversation as resolved.

- name: Add Spack environment
run: |
spack -e spack-environment/${{matrix.ENV}} compiler find
spack -e spack-environment/${{matrix.ENV}} external find llvm

- name: Concretize
run: |
spack -e spack-environment/${{matrix.ENV}} -c view:false concretize --force

- name: Configure buildcache
run: |
spack -e spack-environment/${{matrix.ENV}} mirror add eic \
--autopush --unsigned \
--oci-username-variable GITHUB_REGISTRY_USER \
--oci-password-variable GITHUB_REGISTRY_TOKEN \
oci://ghcr.io/eic/spack-${{ steps.spack-config.outputs.buildcache-version }}
Comment thread
wdconinc marked this conversation as resolved.
Outdated
Comment on lines +163 to +169
Comment on lines +163 to +169

- name: Install base environment
run: |
spack -e spack-environment/${{matrix.ENV}} -c view:false install --no-check-signature --show-log-on-error

- name: Install epic environment
run: |
spack -e spack-environment/${{matrix.ENV}}/epic -c view:false install --no-check-signature --show-log-on-error
Comment thread
wdconinc marked this conversation as resolved.
60 changes: 47 additions & 13 deletions spack-environment/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,26 @@ packages:
- cxxstd=20
c:
prefer:
- gcc
require:
- gcc
- spec: gcc
when: platform=linux
- spec: apple-clang
when: platform=darwin
require:
- spec: gcc
when: platform=linux
- spec: apple-clang
when: platform=darwin
Comment on lines 74 to +84
cxx:
prefer:
- gcc
require:
- gcc
- spec: gcc
when: platform=linux
- spec: apple-clang
when: platform=darwin
require:
- spec: gcc
when: platform=linux
- spec: apple-clang
when: platform=darwin
Comment on lines +91 to +95
cairo:
require:
- '@1.18.2:'
Expand Down Expand Up @@ -202,9 +214,15 @@ packages:
- +shared cxxstd=20
fortran:
prefer:
- gcc
require:
- gcc
- spec: gcc
when: platform=linux
- spec: gcc
when: platform=darwin
require:
- spec: gcc
when: platform=linux
- spec: gcc
when: platform=darwin
Comment on lines 215 to +225
freetype:
require:
- build_system=autotools
Expand Down Expand Up @@ -248,7 +266,13 @@ packages:
require:
- '@11.4.1.east'
- cxxstd=20 -vecgeom +threads -vtk
- any_of: [+opengl +qt +x11, -opengl -qt -x11]
- any_of: [+opengl +qt, -opengl -qt]
- spec: ~x11
when: ~opengl platform=linux
- spec: +x11
when: +opengl platform=linux
- spec: ~x11
when: platform=darwin
geant4-data:
require:
- +nudexlib +tendl +urrpt
Expand All @@ -263,10 +287,16 @@ packages:
- ~gtk
gl:
require:
- glx
- spec: glx
when: platform=linux
- spec: apple-gl
when: platform=darwin
glu:
require:
- openglu
- spec: openglu
when: platform=linux
- spec: apple-glu
when: platform=darwin
gloo:
require:
- '@2023-12-03'
Expand Down Expand Up @@ -642,8 +672,12 @@ packages:
root:
require:
- '@6.40.02'
- cxxstd=20 +fftw +fortran +gdml +http -ipo +mlp +python +root7 +tmva +tmva-sofie +x +xrootd +ssl
- cxxstd=20 +fftw +fortran +gdml +http -ipo +mlp +python +root7 +tmva +tmva-sofie +xrootd +ssl
- any_of: [+opengl +webgui, -opengl -webgui]
- spec: +x
when: platform=linux
- spec: ~x
when: platform=darwin
sherpa:
require:
- '@3.0.1'
Expand Down
9 changes: 8 additions & 1 deletion spack-environment/xl/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ spack:
- ../packages.yaml
- ../packages_root_with_opengl.yaml
- ../view.yaml
definitions:
# Note that in definitions 'when' takes a python expression as argument
# https://spack.readthedocs.io/en/latest/environments.html#spec-list-references
- when: arch.satisfies("platform=linux")
extra_packages: [strace]
- when: arch.satisfies("platform=darwin")
extra_packages: []
Comment thread
wdconinc marked this conversation as resolved.
Outdated
specs:
- $extra_packages
- acts
- actsvg
- afterburner
Expand Down Expand Up @@ -133,7 +141,6 @@ spack:
- snakemake
- spdlog
- stow
- strace
- valgrind
- xeyes
- xrootd
Expand Down
26 changes: 14 additions & 12 deletions spack-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ SPACKPACKAGES_VERSION="v2026.06.0"
## Space-separated list of spack-packages cherry-picks
read -r -d '' SPACKPACKAGES_CHERRYPICKS <<- \
--- || true
a115a811bdfce4db5298a9ba9b7903ccfb0de101
20444b8e9382e659360a1446688d10a8c2d2ad31
f5742718da7bd1d078ddc8423011a82ef2e3c759
384fd54caf18c6393607bff018853747d02c6e0f
bd9b4838fbf9e4ca01ad7b6c6df633ddcc750d71
deb4f17d93dbe012403614245334f7c73fcc086f
82a6d07a37d13c247e84417055f9cb5b4802ac4f
47780b2c59a8356c1f13cd7c8d250e3250c15ba8
28bd1a044251fca35e14ba55d7ddb567deadcdaa
a7c32f24cd5b69b237dc974804a71326306f4e58
de97f131df3dbc940151f406afd5c2c1158a660c
caf013be0ee1594fdbba8feb07ffecc88474a2b0
72269859719d77f986be7cc752946650d020ac3f
125ca0c4f3b8bb2c5312c571e27006d9ddc06085
7a6fa1c4f62f27531c93ecfeedad30181e9616f9
c72830c64ceda0390b12e0b7ddda6418fa3806be
75395349957ad785cca50002dffb18bbcb48af27
acac89d6bb7079412e711a50a3f06681132a2723
438abd1e09f0cea9cb0ccc7e0326adcd0408196b
d4fb37cedfb7552a753bdc9c0c4792082f4b46e8
4dc856a13e9066ca3249a593d351af8cda521fa3
3dcad5bb860184c91c17b97a9f3b13252d26d309
---
## Optional hash table with comma-separated file list
## For these commits, the cherry-pick will be restricted to the listed files only.
Expand All @@ -36,18 +37,19 @@ read -r -d '' SPACKPACKAGES_CHERRYPICKS_FILES <<- \
---
## Ref: https://github.com/spack/spack-packages/commit/[hash]
## [hash]: [description]
## a115a811bdfce4db5298a9ba9b7903ccfb0de101: github-copilot: new package
## 20444b8e9382e659360a1446688d10a8c2d2ad31: github-copilot: add v1.0.8
## f5742718da7bd1d078ddc8423011a82ef2e3c759: gaudi: workaround test-dependency bug with a when
## 384fd54caf18c6393607bff018853747d02c6e0f: github-copilot: new package
## bd9b4838fbf9e4ca01ad7b6c6df633ddcc750d71: gaudi: workaround test-dependency bug with a when
## deb4f17d93dbe012403614245334f7c73fcc086f: fix: add latest osg-ca-cert
## 82a6d07a37d13c247e84417055f9cb5b4802ac4f: osg-ca-certs: depends on gmake and perl, type build
## 47780b2c59a8356c1f13cd7c8d250e3250c15ba8: py-pynacl: depends on gmake, type build
## 28bd1a044251fca35e14ba55d7ddb567deadcdaa: py-throttler: add v1.2.3
## a7c32f24cd5b69b237dc974804a71326306f4e58: py-tensorboard: add v2.21.0
## de97f131df3dbc940151f406afd5c2c1158a660c: TensorFlow: add v2.21.0
## caf013be0ee1594fdbba8feb07ffecc88474a2b0: Add missing xxd dep
## 72269859719d77f986be7cc752946650d020ac3f: py-tensorboard: add v2.21.0
## 125ca0c4f3b8bb2c5312c571e27006d9ddc06085: TensorFlow: add v2.21.0
## 7a6fa1c4f62f27531c93ecfeedad30181e9616f9: Add missing xxd dep
## c72830c64ceda0390b12e0b7ddda6418fa3806be: Workaround for macOS arm64 compile bug
## 75395349957ad785cca50002dffb18bbcb48af27: py-torch: ensure setuptools is not unnecessarily constrained for 2.10:
## acac89d6bb7079412e711a50a3f06681132a2723: cuda: append --allow-unsupported-compiler to CUDAFLAGS for dependent_spec
## 438abd1e09f0cea9cb0ccc7e0326adcd0408196b: herwig3: add CT14(?n)lo pdfsets as build-time resources
## d4fb37cedfb7552a753bdc9c0c4792082f4b46e8: py-tensorflow: add libclang variant
## 4dc856a13e9066ca3249a593d351af8cda521fa3: root: add v6.40.00, v6.40.02
## 3dcad5bb860184c91c17b97a9f3b13252d26d309: readline: switch url for patch download
4 changes: 2 additions & 2 deletions spack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SPACK_VERSION="v1.2.2"
read -r -d '' SPACK_CHERRYPICKS <<- \
--- || true
292b0dcaba3b2a5e3f9668d205d39fee2c715721
678e506a95b319c573ba7e84703b06d7275ab80e
473d1459fba532de0d3d7edc34d27b1432bc90cd
---
## Optional hash table with comma-separated file list
read -r -d '' SPACK_CHERRYPICKS_FILES <<- \
Expand All @@ -20,4 +20,4 @@ read -r -d '' SPACK_CHERRYPICKS_FILES <<- \
## Ref: https://github.com/spack/spack/commit/[hash]
## [hash]: [description]
## 292b0dcaba3b2a5e3f9668d205d39fee2c715721: fix: write created time field with OCI buildcache config
## 678e506a95b319c573ba7e84703b06d7275ab80e: fix: don't map prefix to view root for pkgs excluded from view
## 473d1459fba532de0d3d7edc34d27b1432bc90cd: fix: don't map prefix to view root for pkgs excluded from view
Loading