Skip to content

ci: add CI gate for branch protection (RIG-2213) - #3

Merged
mattwilkinsonn merged 4 commits into
mainfrom
mintaka-rig-2213-devenv-ci
Aug 22, 2026
Merged

ci: add CI gate for branch protection (RIG-2213)#3
mattwilkinsonn merged 4 commits into
mainfrom
mintaka-rig-2213-devenv-ci

Conversation

@rigel-mintaka

Copy link
Copy Markdown

Add a job named CI to the pull_request-triggered PR Test workflow that needs: [pipeline] and echoes success. This produces a check-run literally named CI for main branch protection to pin. It goes green iff the real per-system Rust/nix build+test pipeline passes, and deliberately excludes unrelated workflows such as the upstream generate-docs job (which is red on main). Bare passthrough: minimal, single-file addition, no toolchain or structural changes.

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 21, 2026

Copy link
Copy Markdown

RIG-2213

Add a `.github/workflows/rigel-ci.yml` whose job is named `CI` so the fork's
`main` branch-protection ruleset can pin `["CI"]` as its required status check.

The job runs `nix build .#devenv` — the same build command upstream's own
`build.yml` runs — on a GitHub-hosted `ubuntu-latest` runner. It pulls the
closure from the `devenv.cachix.org` substituter the flake already declares, so
it is a real (non-vacuous) gate that can go green here.

Why standalone rather than aggregating upstream's `pipeline`: upstream's
per-system pipeline runs on `self-hosted` runners this fork does not have, so a
`needs:`-aggregator over it would sit `queued` indefinitely and wedge the
required-check pin.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the mintaka-rig-2213-devenv-ci branch from 0325431 to c31c69c Compare August 21, 2026 18:44
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review August 21, 2026 19:14
…e) (RIG-2213)

Two pre-existing upstream workflows light up red/hung once Actions is
enabled on the RigelBuild fork; neither has a monorepo consumer and the
fork's real build gate is the standalone rigel-ci.yml `CI` producer
(`nix build .#devenv`, GitHub-hosted, the branch-protection pin target):

- generate.yml -> .disabled: regenerates docs and auto-commits via
  EndBug/add-and-commit on push, which 403s (the bot cannot push to a
  protected fork main) and then reds every PR on the uncommitted-diff
  check. We consume devenv as a pinned nix flake input, not its generated
  docs.
- pr-test.yml: its `pipeline` matrix runs on upstream Cachix's self-hosted
  runners (warm nix store + native Apple Silicon) that RigelBuild has no
  runners for, so every leg sits `queued` forever on the fork. Scope it to
  the upstream owner (`if: github.repository_owner == 'cachix'`) so it
  skips cleanly. The richer multi-arch build + cache-push PR gate is
  deliberately left to RIG-2449; the release path (release.yml /
  release-test.yml) is untouched for the same reason.

Spec-impact: none
@rigel-mintaka
rigel-mintaka force-pushed the mintaka-rig-2213-devenv-ci branch from f29ed24 to c6e634c Compare August 22, 2026 01:55
The producer ran `nix build .#devenv` with no binary cache: the flake
declares devenv.cachix.org only in `nixConfig.extra-substituters`, which nix
ignores non-interactively without `--accept-flake-config`. So on the fork the
gate cold-compiled the custom Nix fork (`github:cachix/nix/devenv-2.35`) and
nixd from source — a 24-minute build one heavier closure away from exhausting
the hosted runner, on the very check `main` will pin.

Add `cachix/cachix-action` (pull-only, name `devenv`, no authToken),
matching upstream build.yml, so the closure is substituted rather than built.
Add a `concurrency` group so superseded pushes cancel instead of running
redundant full builds to completion.

Spec-impact: none
With the substituter wired the build is fast, but a substituter regression
would fall back to a cold rebuild and hang to GitHub's 6h job default on the
check `main` pins. Add `timeout-minutes: 20` so a regression surfaces as a
fast failure.

Spec-impact: none
@mattwilkinsonn
mattwilkinsonn merged commit 3ea257c into main Aug 22, 2026
3 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.

2 participants