Add separate uv cache image stage to CI that only changes on uv.lock changes#1293
Add separate uv cache image stage to CI that only changes on uv.lock changes#1293msimberg wants to merge 160 commits into
Conversation
|
cscs-ci run default |
Make cscs ci test jobs correspond more closely to nox sessions.
There was a problem hiding this comment.
Pull request overview
This PR refactors the GitLab CI container build pipeline by introducing a separate “venv” image stage intended to cache the uv sync environment across commits, so the expensive dependency install only needs to be rebuilt when uv.lock (or other venv inputs) change.
Changes:
- Adds a new
venvCI stage that builds and publishes anicon4py-venvimage keyed offuv.lock(and selected build inputs). - Updates the checkout/build image stage to be based on the new venv image rather than running
uv syncon every commit. - Tightens
gt4py-cache.shby requiringBASE_IMAGEto be present (but currently needs a small fix to work withset -u).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
ci/scripts/gt4py-cache.sh |
Adds a BASE_IMAGE validation check for consistent cache directory hashing. |
ci/docker/venv.Dockerfile |
New Dockerfile to build a reusable uv/venv layer intended to change only when dependency inputs change. |
ci/docker/checkout.Dockerfile |
Switches build to start from the new venv image instead of the base image and removing the uv sync step. |
ci/base.yml |
Introduces the new venv stage and wiring between baseimage → venv → checkout image builds. |
ci/default.yml |
Adds the build_venv_aarch64 job to the default pipeline. |
ci/all.yml |
Adds the build_venv_aarch64 job to the “all” pipeline. |
ci/merge.yml |
Adds the build_venv_aarch64 job to the merge-gating pipeline. |
ci/benchmark_bencher_common.yml |
Adds the build_venv_aarch64 job to the benchmark pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
cscs-ci run default |
|
cscs-ci run default |
|
cscs-ci run default |
|
Mandatory Tests Before merging, run the When developing, you can test your changes on CSCS CI before merge with the You can pass options to override pipeline variables, for example:
Available options are:
See The Optional Tests To run benchmarks you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
|
cscs-ci run default |
|
cscs-ci run merge |
|
The CI failure is "fixed" by #1352. |
Currently the uv cache is populated in the same step as the checkout stage. However, while the source code changes every commit, uv cache doesn't need to be repopulated every new commit, only when uv.lock changes. This introduces an intermediate image that is rebuilt only on uv.lock changes.