ci(mg7): build madspace once per workflow and cache the wheel#19
Open
oliviermattelaer wants to merge 7 commits into
Open
ci(mg7): build madspace once per workflow and cache the wheel#19oliviermattelaer wants to merge 7 commits into
oliviermattelaer wants to merge 7 commits into
Conversation
Add a single build_madspace job to acceptancetest_mg7.yml that compiles the
madspace wheel and caches it under a content-addressed key
(hashFiles('madspace/**')), so it is only rebuilt when the madspace sources
change. All mg7 test jobs now depend on this job (needs: build_madspace) and
install the cached wheel via the new install_madspace composite action
(restore-only + pip install) instead of recompiling the C++/CUDA extension
themselves. This guarantees exactly one madspace build per workflow run.
checkout_mg5 still installs madspace for now; removing that is a separate
follow-up commit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
this still need to remove the old way to install madspace... |
madspace is only needed by the mg7 acceptance workflow, which now builds it once per run and installs the cached wheel via install_madspace. Remove the pip install ./madspace step from the shared checkout_mg5 action so non-mg7 workflows no longer recompile the C++/CUDA extension. Any other workflow that turns out to need madspace will be migrated to the same build/cache pattern. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
theoheimel
requested changes
Jun 28, 2026
theoheimel
left a comment
Contributor
There was a problem hiding this comment.
See suggested changes
Install the cached wheel with --target=madspace/install (the local prefix the mg7 runtime and madspace/install.py expect) instead of site-packages, so the generated madevent.py finds it rather than triggering a source rebuild. Export that dir on PYTHONPATH so the test harness own import madspace availability check resolves and the mg7 tests run instead of self-skipping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pass -Ccmake.define.ENABLE_OPENBLAS=ON so the OpenBLAS dependency is built from source and linked statically into the extension (BUILD_SHARED_LIBS=OFF in madspace/CMakeLists.txt). The cached wheel is then self-contained and works in every test job without a system libopenblas. Previously libopenblas-dev was apt-installed only inside the cache-miss build step, so a dynamically linked wheel would have lacked its BLAS dependency on a cache hit; remove that apt step since it is no longer needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Build_madspace now builds and installs madspace into madspace/install (the prefix the mg7 runtime and madspace/install.py expect) and caches that directory directly. The install_madspace action restores madspace/install and puts it on PYTHONPATH, dropping the per-job pip install: every test job reuses the ready-to-use install built once for the commit. The cache key (clean-source hashFiles) is unchanged and is evaluated before madspace/install exists, so build and restore agree. OpenBLAS stays statically linked (ENABLE_OPENBLAS=ON) so the cached install is self-contained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a single build_madspace job to acceptancetest_mg7.yml that compiles the madspace wheel and caches it under a content-addressed key (hashFiles('madspace/**')), so it is only rebuilt when the madspace sources change. All mg7 test jobs now depend on this job (needs: build_madspace) and install the cached wheel via the new install_madspace composite action (restore-only + pip install) instead of recompiling the C++/CUDA extension themselves. This guarantees exactly one madspace build per workflow run.
checkout_mg5 still installs madspace for now; removing that is a separate follow-up commit.