Skip to content

ci(build-images): skip GPU and arm64 builds on PRs#90

Open
viniciusdc wants to merge 1 commit into
mainfrom
ci/filter-pr-builds
Open

ci(build-images): skip GPU and arm64 builds on PRs#90
viniciusdc wants to merge 1 commit into
mainfrom
ci/filter-pr-builds

Conversation

@viniciusdc

Copy link
Copy Markdown
Contributor

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 single pixi.toml and 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-base and jupyterlab-gpu jobs gated on if: github.event_name != 'pull_request' — skipped entirely on PRs.
  • Non-GPU callers pass build_arm64: ${{ github.event_name != 'pull_request' }} — PRs build amd64 only.
  • Main pushes, tag pushes, and workflow_dispatch keep the full multi-arch matrix.

The merge job in build-image.yaml has needs: [build-amd64, build-arm64] with if: "!cancelled() && !failure()", which still runs when build-arm64 is skipped. docker buildx imagetools create produces 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

  • This PR's own run: verify only jupyterlab-base, jupyterlab, jupyterhub jobs run; each runs amd64 only; merge produces a single-arch pr-NN manifest in quay/ghcr
  • After merge, the main-branch run rebuilds full multi-arch + GPU variants and tags sha-<new> / main / latest as before
  • Verify a deploy off the pr-NN tag works on a test cluster (would catch any single-arch manifest deployment quirks)

Refs #86, #88.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants