Skip to content

Matrix fan out fan in#3517

Open
rnro wants to merge 6 commits intomainfrom
matrix_fan_out_fan_in
Open

Matrix fan out fan in#3517
rnro wants to merge 6 commits intomainfrom
matrix_fan_out_fan_in

Conversation

@rnro
Copy link
Contributor

@rnro rnro commented Feb 20, 2026

Add fan-in jobs with stable names to reusable CI workflows

Motivation

  • Downstream repos pin required checks to specific job names like
    Linux (6.2) or Xcode 16.3. Every time a Swift/Xcode version is
    added or removed, all downstream repos must update their required
    checks.
  • A stable fan-in job that aggregates matrix results means downstream
    repos only need to register it once and never update it again.

Modifications

  • scripts/generate_matrix.sh: add a required boolean field to each
    matrix entry — false for nightly-* versions, true for all
    stable versions.
  • .github/workflows/swift_test_matrix.yml: add
    continue-on-error: ${{ !matrix.config.required }} to
    execute-matrix so nightly failures are absorbed at the job level
    rather than propagating to the matrix result.
  • .github/workflows/macos_tests.yml: add "required": true to all
    stable Xcode entries and "required": false to xcode_latest_beta
    in the inline bash matrix; add continue-on-error to darwin-job.
  • Add a required-checks-passed fan-in job to unit_tests.yml,
    cxx_interop.yml, release_builds.yml, and macos_tests.yml with
    stable names Unit tests (All Required), Cxx interop (All Required), Release builds (All Required), and macOS tests (All Required) respectively.

Result

  • Downstream repos can register the stable fan-in job name as their
    required check once and never revisit it when Swift/Xcode versions
    rotate.
  • Nightly failures do not cause the fan-in job to fail by default; only
    failures in required (stable) matrix entries do.
  • Existing per-version job names are unchanged, so existing downstream
    required checks continue to work.
  • In the failure case, users will see something like:
One or more required release build matrix jobs failed.
By default, stable versions are required and nightly versions are not.
To diagnose, expand the 'Release builds' job above and look for failing matrix entries.
To change which versions are required, see the linux_*_required / windows_*_required inputs in .github/workflows/release_builds.yml.

See:

rnro added 2 commits February 20, 2026 16:53
Motivation

* Downstream repos pin required checks to specific job names like
`Linux (6.2)` or `Xcode 16.3`. Every time a Swift/Xcode version is
added or removed, all downstream repos must update their required
checks.
* A stable fan-in job that aggregates matrix results means downstream
repos only need to register it once and never update it again.

Modifications

* `scripts/generate_matrix.sh`: add a `required` boolean field to each
matrix entry — `false` for `nightly-*` versions, `true` for all
stable versions.
* `.github/workflows/swift_test_matrix.yml`: add
`continue-on-error: ${{ !matrix.config.required }}` to
`execute-matrix` so nightly failures are absorbed at the job level
rather than propagating to the matrix result.
* `.github/workflows/macos_tests.yml`: add `"required": true` to all
stable Xcode entries and `"required": false` to `xcode_latest_beta`
in the inline bash matrix; add `continue-on-error` to `darwin-job`.
* Add a `required-checks-passed` fan-in job to `unit_tests.yml`,
`cxx_interop.yml`, `release_builds.yml`, and `macos_tests.yml` with
stable names `Unit tests (All Required)`, `Cxx interop (All
Required)`, `Release builds (All Required)`, and `macOS tests (All
Required)` respectively.

Result

* Downstream repos can register the stable fan-in job name as their
required check once and never revisit it when Swift/Xcode versions
rotate.
* Nightly failures do not cause the fan-in job to fail by default; only
failures in required (stable) matrix entries do.
* Existing per-version job names are unchanged, so existing downstream
required checks continue to work.
@rnro rnro added the semver/none No version bump required. label Feb 20, 2026
@rnro rnro force-pushed the matrix_fan_out_fan_in branch from e8f288e to 59900dd Compare February 20, 2026 16:55
@rnro rnro force-pushed the matrix_fan_out_fan_in branch from 1b7c40b to 0366caf Compare February 20, 2026 18:01
This reverts commit 0366caf.
@rnro rnro marked this pull request as ready for review February 20, 2026 19:55
@rnro rnro requested a review from simonjbeaumont February 20, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

1 participant