Skip to content

Build changed packages on pull requests with the release builder's container - #388

Closed
spencerbull wants to merge 1 commit into
omacom:masterfrom
spencerbull:add-pr-build-check
Closed

spencerbull wants to merge 1 commit into
omacom:masterfrom
spencerbull:add-pr-build-check

Conversation

@spencerbull

Copy link
Copy Markdown
Contributor

A package can reach master with only the self-tests having run, so the first time its dependencies are resolved inside the channel's container is the release build. claude-desktop (#348) was reviewed on bare makepkg on a machine that already had every dependency installed, which proves package() and the artifact and nothing about resolution, and then failed its first rc release build on "Could not resolve all dependencies" while the same commit shipped to edge and stable. Whether that failure was the package or the builder could only be answered by running the real thing, and nothing had.

This adds a workflow with two jobs. plan diffs pkgbuilds/ against the base and asks package_builds_for_mirror — the same helper the release builder uses — which mirrors each changed package ships to, so ring and channel policy stays in one place: edge always, rc and stable for release_ring: fast, pinned packages to edge only. build then runs bin/build --package … --mirror … --arch x86_64 per mirror as a matrix, the same command and container the release builder runs. A pull request chooses its own directory names, so names are validated against ^[a-z0-9@._+-]+$ and handed to the build step through env, never interpolated into a script. With nothing changed under pkgbuilds/, the plan is empty and the build job is skipped in seconds, so the check is always present. workflow_dispatch takes an explicit package list for rebuilding on demand.

x86_64 only: an emulated aarch64 build of a half-gigabyte Electron tree is not a check anyone would wait for, and #171 covers native ARM runners. The proof is a run of this workflow on a fork against a touched claude-desktop, where edge, rc and stable each built in six to seven minutes on ubuntu-latest: https://github.com/spencerbull/omarchy-pkgs/actions/runs/34531142335

🤖 Generated by Fable 5 in Claude Code.

…ntainer

A package could reach master with nothing but self-tests having run, and the first time its dependencies were resolved inside the channel's container was the release build. claude-desktop (omacom#348) was reviewed on bare makepkg, which never resolves dependencies on a machine that already has them, and then failed its first rc release build.

A plan job diffs pkgbuilds/ against the base and asks package_builds_for_mirror which mirrors each changed package ships to, so the policy stays in one helper. A matrix job then runs bin/build per mirror for x86_64, the same command and container the release builder uses. Package names are validated and passed through env rather than interpolated into a script, because a pull request chooses its own directory names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant