ci(build-images): skip GPU and arm64 builds on PRs#90
Open
viniciusdc wants to merge 1 commit into
Open
Conversation
PR-time CI was rebuilding all five image targets (jupyterlab-base,
jupyterlab, jupyterlab-gpu-base, jupyterlab-gpu, jupyterhub) multi-arch
on every change to images/**, even though most PRs touch a single
pixi.toml and the same Dockerfile paths get exercised by the non-GPU
amd64 build. GPU image builds (cuda base pull + gpu builder) and arm64
runners are the bulk of the runtime, so the cost was paid every PR
to validate paths that the amd64 build already proves resolve.
Gate jupyterlab-gpu-base and jupyterlab-gpu jobs on a job-level
`if: github.event_name != 'pull_request'`. Pass `build_arm64:
${{ github.event_name != 'pull_request' }}` to the three non-GPU
callers so PRs build amd64 only. Main and tag pushes keep the full
multi-arch matrix; the merge job handles a single amd64 digest cleanly
(single-arch manifest list).
Refs #86 for the broader CI-scope audit.
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.
Summary
PR-time CI was rebuilding all five image targets (jupyterlab-base, jupyterlab, jupyterlab-gpu-base, jupyterlab-gpu, jupyterhub) multi-arch on every change to
images/**, even though most PRs touch a singlepixi.tomland the same Dockerfile paths get exercised by the non-GPU amd64 build. GPU images (cuda base pull + gpu builder runners) and arm64 runners are the bulk of the runtime.Changes:
jupyterlab-gpu-baseandjupyterlab-gpujobs gated onif: github.event_name != 'pull_request'— skipped entirely on PRs.build_arm64: ${{ github.event_name != 'pull_request' }}— PRs build amd64 only.workflow_dispatchkeep the full multi-arch matrix.The
mergejob inbuild-image.yamlhasneeds: [build-amd64, build-arm64]withif: "!cancelled() && !failure()", which still runs whenbuild-arm64is skipped.docker buildx imagetools createproduces a single-platform manifest list cleanly from one digest.This is the second of three follow-ups from #86. PR #88 (fork-PR skip) is the first; the e2e-consumes-build-artifact change will follow.
Test plan
jupyterlab-base,jupyterlab,jupyterhubjobs run; each runs amd64 only; merge produces a single-archpr-NNmanifest in quay/ghcrsha-<new>/main/latestas beforepr-NNtag works on a test cluster (would catch any single-arch manifest deployment quirks)Refs #86, #88.