Repository navigation
feat(ci): add macOS CI workflow #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wdconinc
wants to merge
106
commits into
master
Choose a base branch
from
macos-ci-workflow
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,238
−82
Open
Changes from all commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
3050e6d
Add macOS CI workflow using spack/setup-spack and spack/github-action…
wdconinc bebe4c1
Align macOS CI with container build: derive configuration at runtime …
Copilot eff1f04
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6e979d7
fix(ci): matrix on ENV [ci, xl] instead of compiler
wdconinc 5717657
fix: spack/setup-spack => manual clone
wdconinc 6308bd1
fix(ci): only run on push to master
wdconinc 0bd9f2b
fix(macos): avoid external cmake
wdconinc 2b649b0
fix(macos): buildcache autopush unsigned with secrets
wdconinc 2ace61f
fix(macos): clone spack for spack
wdconinc d1c88bf
fix(ci): add key4hep-spack, eic-spack, and fixup repo.yaml location
wdconinc 965e335
fix: key4hep url fix
wdconinc d3af3f3
fix: cd into cloned path
wdconinc e3b063d
fix: spack repo add relative to spack root
wdconinc 08dee5c
fix: avoid activate; install both ENV and ENV/epic
wdconinc 3b289e0
fix: packages: clang on darwin
wdconinc f0547f3
fix: strace on linux only
wdconinc 762e4ad
fix: gl/glu provided by apple-gl/glu on darwin
wdconinc b7577a2
fix: darwin: c,cxx=apple-clang, fortran=gcc
wdconinc 1572b08
fix: use definitions for extra packages per platform
wdconinc 687d592
fix: disable view in macOS (/opt/local not writable)
wdconinc 9782cc3
fix: add comment on definitions:when syntax
wdconinc 04566b2
fix: epic: install with view:false
wdconinc 9a999c1
fix: allow for empty and duplicative cherry-picks
wdconinc 7810826
fix: packages: require: ~opengl when platform=darwin
wdconinc b6a9618
fix: packages: geant4: require: ~x11 when platform=linux
wdconinc da8928d
fix: packages: qt{-base}: require: +opengl also on darwin
wdconinc 5d39f57
fix: packages: root: require: ~x when darwin
wdconinc d8ddcb7
fix: grammar
wdconinc d812bdc
fix: spack install ~~install~~ epic
wdconinc 2d70280
fix(ci): fail-fast: false, cancel-in-progress: false
wdconinc 1b46646
fix: use actions/checkout (faster)
wdconinc f652634
fix: correct checkout syntax
wdconinc b186527
fix: checkout syntax
wdconinc c90be1a
fix: fetch pull request for cherry-picking in CI
wdconinc a73d6c8
fix: add fetch for pull request 52207 in macOS CI
wdconinc 71e40f4
Fetch develop branch in macOS CI workflow
wdconinc f13a9d4
Add fetch for pull request 3698 in macOS CI
wdconinc 9fb8690
Add fetch for pull request 4871 in macOS CI workflow
wdconinc 7181f35
Add fetch for pull request 5856 in macOS CI workflow
wdconinc 9cd4439
Add 'tf' to the environment matrix in CI workflow
wdconinc a5720df
Add platform-specific TensorFlow definitions
wdconinc a3a576d
fix: concretize $ENV/epic; move compilers/externals/mirrors to scope …
wdconinc 34a0d27
fix: add valgrind to linux_packages
wdconinc c448ea2
fix: unpin binutils
wdconinc 641e862
Set MACOSX_DEPLOYMENT_TARGET in macOS CI workflow
wdconinc 9a42132
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8fcb22b
fix: ci: move more packages to linux-only
wdconinc c0e6e1b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9de42a4
fix(ci): fetch spack-packages cherry-picks by SHA when missing locally
wdconinc 639d277
Update SPACK_CHERRYPICKS with new commit hash
wdconinc bda77af
fix(ci): fetch spack cherry-picks by SHA when missing locally
wdconinc f734222
fix(ci): move gfal2, graphviz, py-onnxruntime to linux-only; include …
wdconinc 0ac72e8
fix(ci): make py-onnxruntime linux-only in tf; diagnose numpy import …
wdconinc 2ec30ac
fix(ci): move non-macOS packages to linux-only in xl; fix numpy diagn…
wdconinc f9a80c1
fix(ci): make macOS buildcache read-only outside trusted contexts; fe…
wdconinc eda8473
fix(spack): restore Linux packages.yaml; move macOS overrides to pack…
wdconinc 3dcd0f0
refactor(spack): split platform-specific settings into packages_linux…
wdconinc 65b46a6
refactor(spack): list packages.yaml last in environment includes
wdconinc 8b75477
fix(spack): build binutils on macOS with -include limits.h
wdconinc 72a67b1
fix(spack): build tf environment without TensorFlow stack on macOS
wdconinc 717aaa7
fix(spack): more macOS build fixes (binutils flags, doxygen ~graphviz…
wdconinc 8c51d45
fix(ci): use Homebrew binutils external on macOS; make /opt writable …
wdconinc bd9e590
fix(ci): build binutils from source on macOS (@2.47:); drop Homebrew …
wdconinc 0af6d86
ci: dump libiberty config.log and environment when macOS build fails
wdconinc e57cff5
ci: do not export MACOSX_DEPLOYMENT_TARGET on macOS
wdconinc dd2b9e0
ci: print the failing limits.h probe from libiberty config.log
wdconinc a66fd54
ci: print clang include search path and stray system headers on failure
wdconinc ef1cfad
ci: do not abort the binutils diagnostic when find reports missing di…
wdconinc dbbbb7c
fix(spack): silence clang deployment version warning for binutils on …
wdconinc dcc85be
fix(spack): also pass -Wno-overriding-deployment-version via cppflags…
wdconinc b5e7be5
Copy additional packages_darwin.yaml to Dockerfile
wdconinc 1a9f24d
ci: bisect which dependency sets MACOSX_DEPLOYMENT_TARGET=10.16 in th…
wdconinc d839290
ci: list dependencies in the pkgconf build environment with their dep…
wdconinc fbae492
fix(spack): cherry-pick removal of the forced MACOSX_DEPLOYMENT_TARGE…
wdconinc febe576
Fix markdown formatting for platform-specific settings
wdconinc 321ddf7
ci(macos): package and publish macOS environments to GHCR via crane
wdconinc 469aa5d
fix(ci): quote spack config paths and initialize view mapping in macO…
wdconinc a8eb4ae
fix(ci): disable view validation when configuring spack views on macOS
wdconinc 82db680
fix(ci): make /opt/local writable and defer epic view configuration
wdconinc e6c4f28
fix(ci): add install tree padding and rebuild macOS packages without …
wdconinc 1535fac
fix(ci): replace colon in INSTALL_PREFIX with hyphen to prevent build…
wdconinc 647d401
ci(macos): enable buildcache consumption now that padded packages are…
wdconinc 7d74fa1
fix(ci): fall back to source build on buildcache binary relocation fa…
wdconinc 32a3ccb
fix(ci): patch new_installer.py for buildcache fallback with valid ya…
wdconinc 0c3c362
fix(ci): exit with 0 explicitly from root.exe smoke test
wdconinc a98ca67
fix(darwin): use autotools for libxml2 to match spack libiconv symbols
wdconinc 49bbdde
feat(macos): exclude iwyu on darwin and garbage-collect build depende…
wdconinc 23783e4
ci(macos): separate build into /opt/software and install into cvmfs p…
wdconinc 395c1ea
refactor(ci): split macos workflow into build and install jobs
wdconinc fd47a18
ci(macos): cache spack checkouts & concretizer cache, pass lockfiles …
wdconinc 130dd90
feat(ci): ensure Spack in PATH early and build only missing packages …
wdconinc 9a13007
feat(ci): cache bootstrap store, add bootstrap step, and fix check-bu…
wdconinc 24a550a
chore: remove copyright and SPDX license header from check-buildcache.py
wdconinc 4d9c487
fix(macos-ci): ensure configure buildcache is idempotent on cache hit
wdconinc 82b77a2
fix(macos-ci): skip mirror configuration when exact mirror is already…
wdconinc 5801ad4
fix(macos-ci): support /System/Volumes/Data firmlinks in spack reloca…
wdconinc 0931642
Revert "fix(macos-ci): support /System/Volumes/Data firmlinks in spac…
wdconinc 7dd2373
ci(macos): bump actions/cache to v6, upload-artifact to v7, and downl…
wdconinc 9c153f7
fix(ci): ensure setup.sh uses target CVMFS prefix for SPACK_ENV and c…
wdconinc 7a35589
fix(ci): avoid GitHub Actions expression syntax in setup.sh script
wdconinc b19c4c3
fix(spack): adjust geant4 variants for macOS compatibility
wdconinc 3482eaf
ci(macos): add independent job testing existing CVMFS deployment
wdconinc 01c4e92
fix(ci): resolve legacy prefix from view symlinks in test-cvmfs job
wdconinc 96ddacc
fix(ci): make setup.sh and test-cvmfs colon-safe for macOS CVMFS depl…
wdconinc bb42a55
fix(spack): disable opengl for root on macOS in xl and cuda environments
wdconinc b7abe16
fix(ci): configure ROOT runtime environment and dynamic libraries in …
wdconinc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| #!/usr/bin/env python3 | ||
| """Check concrete specs of a Spack environment against a binary buildcache. | ||
|
|
||
| Ignores external packages (which cannot be built by Spack). | ||
| Outputs missing spec DAG hashes (prefixed with '/') to output-file (or stdout). | ||
| Exits with 0 if all specs exist in the buildcache, or 1 if any specs are missing. | ||
| """ | ||
|
|
||
| import concurrent.futures | ||
| import sys | ||
|
|
||
| import spack.environment as ev | ||
| from spack.binary_distribution import _oci_default_tag, _oci_get_blob_info | ||
| from spack.oci.image import ImageReference | ||
|
|
||
|
|
||
| def main(): | ||
| if len(sys.argv) < 3: | ||
| print("Usage: check-buildcache.py <env-dir> <mirror-url> [output-file]", file=sys.stderr) | ||
| sys.exit(2) | ||
|
|
||
| env_dir = sys.argv[1] | ||
| mirror_url = sys.argv[2] | ||
| output_file = sys.argv[3] if len(sys.argv) > 3 else None | ||
|
|
||
| env = ev.Environment(env_dir) | ||
| # Ignore external specs as they are pre-installed on the host / not built | ||
| all_specs = [s for s in env.all_specs() if not s.external] | ||
| if not all_specs: | ||
| print(f"No non-external specs in environment {env_dir}", file=sys.stderr) | ||
| if output_file: | ||
| open(output_file, "w").close() | ||
| sys.exit(0) | ||
|
|
||
| target_image = ImageReference.from_url(mirror_url) | ||
| print(f"Checking {len(all_specs)} non-external specs against {mirror_url}...", file=sys.stderr) | ||
|
|
||
| def is_missing(spec): | ||
| tag = _oci_default_tag(spec) | ||
| ref = target_image.with_tag(tag) | ||
| blob = _oci_get_blob_info(ref) | ||
| return spec, (blob is None) | ||
|
|
||
| missing = [] | ||
| with concurrent.futures.ThreadPoolExecutor(max_workers=16) as pool: | ||
| for spec, missing_flag in pool.map(is_missing, all_specs): | ||
| if missing_flag: | ||
| missing.append(spec) | ||
|
|
||
| if missing: | ||
| print(f"Found {len(missing)} missing spec(s) that need to be built:", file=sys.stderr) | ||
| for s in missing: | ||
| print(f" - {s.short_spec} (/{s.dag_hash()})", file=sys.stderr) | ||
| hashes = [f"/{s.dag_hash()}" for s in missing] | ||
| hashes_str = " ".join(hashes) | ||
| if output_file: | ||
| with open(output_file, "w", encoding="utf-8") as f: | ||
| f.write(hashes_str + "\n") | ||
| else: | ||
| print(hashes_str) | ||
| sys.exit(1) | ||
| else: | ||
| print(f"All {len(all_specs)} specs already exist in buildcache.", file=sys.stderr) | ||
| if output_file: | ||
| open(output_file, "w").close() | ||
| sys.exit(0) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.