Skip to content

ci: runner-built image, concurrency, scoped jobs and packages, and the merge push reuses the PR's checks - #19

Merged
ashtonian merged 7 commits into
masterfrom
ci/runner-built-image
Nov 22, 2026
Merged

ashtonian merged 7 commits into
masterfrom
ci/runner-built-image

Conversation

@ashtonian

@ashtonian ashtonian commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

A gitstead push took 22.6 min wall on the one-runner set, for 9.4 runner-min. The docker job compiled inside dind at two CPUs, throttled in 40-60% of CFS periods and without the shared Go build cache. The push then re-ran every check the PR had just passed, ci.yml had no concurrency: block, and every PR ran every job.

  • ci: cancel a pull request's superseded run. concurrency: ci-${{ github.ref }}, cancelling in progress for PRs only.
  • build: cross-compile the image's binaries on the runner.
    • scripts/build-binaries.sh cross-compiles through go-ci-actions with .goreleaser.yaml's flags into <os>/<arch>/gitstead.
    • One Dockerfile copies the platform's binary onto Alpine with git and openssh-client, for CI, local builds and GoReleaser's dockers_v2.
    • PRs build linux/amd64 without provenance or an SBOM. master builds both platforms and pushes :edge.
  • ci: run only the jobs and packages a change affects (the program rule "CI runs only on what changed").
    • A scope job (go-ci-actions scope) selects the jobs and packages: the changed packages and those that import one.
    • test, vuln and lint check the affected packages. e2e and docker run when the binary's package graph or their own files (e2e/, Dockerfile, scripts/build-binaries.sh) change.
    • internal/config's tests read examples/*.yaml and config.example.yaml, which go-owners declares.
    • A PR is measured from its base, a push from the last green run on master. ci.yml, go.mod, go.sum and the full-ci label run everything.
    • A new 04:51 UTC schedule is the full run, skipped when master hasn't moved since the last green one.
    • The merge push reuses the PR's acceptance receipt job by job for its own scope, on a green parent, so e2e no longer reruns on it either. It still publishes :edge when the image's inputs changed.
    • Only a push or a manual run on master pushes :edge; the nightly and dispatch from other branches don't.
    • The artifact storage contract no longer repeats on the merge push.

SPEC.md, docs/RELEASING.md and CONTRIBUTING are updated. The release path (goreleaser with the one Dockerfile) first runs on the next tag. goreleaser release --snapshot --clean --skip=homebrew,publish checks it before then.

Pinned to go-ci-actions v1.8.0 (08c90cf).

Part of ashtonian/home-ops-private#731.

ci.yml had no concurrency block, so every push to a pull request queued
another full run behind the one in progress on a single-runner set. A
newer push now cancels a pull request's run in progress; master runs each
finish, since each one publishes :edge.
The docker job compiled gitstead inside dind at two CPUs, throttled in
40-60% of CFS periods, without the shared Go build cache, and paid for
the buildkit-cache-dance post step and a mode=max GHA cache export. The
binaries are now cross-compiled on the runner through go-ci-actions,
with its remote build cache (scripts/build-binaries.sh), and the image
build only copies them. One Dockerfile does that for CI, local builds
and GoReleaser's dockers_v2, which already laid binaries out the same
way, so Dockerfile.goreleaser is gone. Pull requests build linux/amd64
only, without provenance or an SBOM; master builds both platforms and
pushes :edge.
The push to master re-ran build, vet, tests, e2e, govulncheck and lint
over the tree the pull request had just tested. A pull request's run now
ends by recording a receipt of the tested merge tree (go-ci-actions
acceptance), and the push that merges it skips those checks when its
merge commit carries that tree and the pull request run passed within
six hours; it still builds and pushes :edge.
The record job's default success() also looks at the skipped acceptance
job upstream of every need, so it never ran on a pull request. It now
checks its needs' results explicitly.
CI ran build, vet, race tests, e2e, govulncheck, lint and the image on
every change. A scope job (go-ci-actions scope) now selects the jobs a
change needs and the packages they check, the changed packages and those
that import one; e2e and the image run when the binary's package graph or
their own files change. internal/config's tests read examples/*.yaml and
config.example.yaml, which go-owners declares. A pull request is measured
from its base, a push from the last green run on master; ci.yml, go.mod,
go.sum and the full-ci label run everything, and a nightly schedule is the
full run, skipped when master has not moved. The merge push reuses the
pull request's receipt for its own scope and still publishes :edge when
the image's inputs changed; e2e no longer reruns on it. Only a push or a
manual run on master pushes :edge. The artifact storage contract no longer
repeats on the merge push what its pull request checked.

Part of ashtonian/home-ops-private#731.
go-ci-actions acceptance now reuses a receipt only when the commit the
merge sits on has a green run, and job by job: verify's remaining lists the
scoped jobs the pull request did not pass, and the push runs only those.
The scope job's jobs output is remaining, falling back to the scope's own
jobs on pull requests. The CI docs say so.

Part of ashtonian/home-ops-private#731.
Every go-ci-actions use moves from the go-ci-actions#18 candidate to the
v1.8.0 release (08c90cf).

Part of ashtonian/home-ops-private#731.
@ashtonian ashtonian changed the title ci: runner-built image, concurrency, and the merge push reuses the PR's checks ci: runner-built image, concurrency, scoped jobs and packages, and the merge push reuses the PR's checks Nov 22, 2026
@ashtonian
ashtonian merged commit 1e87708 into master Nov 22, 2026
8 checks passed
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