Skip to content

ci(release): build the release matrix once, at the tag - #174

Open
brettdavies wants to merge 1 commit into
devfrom
ci/release-matrix-builds-once
Open

brettdavies wants to merge 1 commit into
devfrom
ci/release-matrix-builds-once

Conversation

@brettdavies

Copy link
Copy Markdown
Owner

Summary

A release compiles its seven targets once, on the tag push. release-matrix-check.yml no longer builds them for a release branch, a release pull request, or the backport of a release's version bump.

The check ran on every push to a release branch, and again on the release pull request and on the backport, since both change Cargo.toml and Cargo.lock and matched the path filter. The tag then built the targets that shipped.

It now runs for a pull request to dev that changes a manifest, the lock file, or the toolchain pin, which is the kind of change that breaks a cross-compiled target. A release pull request targets main and does not match. The backport's branch (chore/sync-dev-*) is skipped by name. workflow_dispatch still runs the matrix on any ref, so a release that wants a rehearsal runs gh workflow run release-matrix-check.yml --ref release/v<version>.

The preflight gate that read the release branch's matrix run reads the latest run on a pull request to dev. No ruleset requires the check, so a dependency pull request can merge with it red, and a cross-compile break that no such pull request showed is found by the tag's build, after the tag exists.

Changelog

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • refactor: Code refactoring (no functional changes)
  • perf: Performance improvement
  • docs: Documentation update
  • test: Adding or updating tests
  • chore: Maintenance tasks (dependencies, config, etc.)
  • ci: CI/CD configuration changes
  • style: Code style/formatting changes
  • build: Build system changes
  • BREAKING CHANGE: Breaking API change (requires major version bump)

Related Issues/Stories

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing completed
  • All tests passing

Test Summary:

  • This pull request targets dev and changes the workflow file, which is one of its own paths, so the matrix runs here once from pull_request.
  • The release and backport cases are read from the trigger: branches: [dev] excludes a pull request to main, the workflow has no push trigger, and the job's if is false for a head that starts with chore/sync-dev.

Files Modified

Modified:

  • .github/workflows/release-matrix-check.yml: no push trigger on release/**, the pull-request trigger limited to dev, and the backport skipped.
  • RELEASES.md: the cross-compile section states when the matrix runs.
  • RELEASES-PREFLIGHT.md: the matrix gate.

Created:

  • None.

Renamed:

  • None.

Deleted:

  • None.

`release-matrix-check.yml` built the seven release targets on every push to a release branch, and again on the release pull request and on the backport of its version bump, since both change `Cargo.toml` and `Cargo.lock` and matched the path filter. The tag then built the ones that shipped.

The check now runs for a pull request to `dev` that changes a manifest, the lock file, or the toolchain pin, which is where a cross-compiled target breaks. It has no trigger on a release branch, a release pull request targets `main` and does not match, and the backport's branch is skipped by name. `workflow_dispatch` still runs the matrix on any ref for a release that wants a rehearsal.

The preflight gate that read the release branch's matrix run reads the latest run on a pull request to `dev`. A cross-compile break that no such pull request showed is found by the tag's build, after the tag exists.
@brettdavies
brettdavies added this pull request to stack #177 October 8, 2026 22:27
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