Open
Conversation
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.
e8f288e to
59900dd
Compare
1b7c40b to
0366caf
Compare
This reverts commit 0366caf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add fan-in jobs with stable names to reusable CI workflows
Motivation
Linux (6.2)orXcode 16.3. Every time a Swift/Xcode version isadded or removed, all downstream repos must update their required
checks.
repos only need to register it once and never update it again.
Modifications
scripts/generate_matrix.sh: add arequiredboolean field to eachmatrix entry —
falsefornightly-*versions,truefor allstable versions.
.github/workflows/swift_test_matrix.yml: addcontinue-on-error: ${{ !matrix.config.required }}toexecute-matrixso nightly failures are absorbed at the job levelrather than propagating to the matrix result.
.github/workflows/macos_tests.yml: add"required": trueto allstable Xcode entries and
"required": falsetoxcode_latest_betain the inline bash matrix; add
continue-on-errortodarwin-job.required-checks-passedfan-in job tounit_tests.yml,cxx_interop.yml,release_builds.yml, andmacos_tests.ymlwithstable names
Unit tests (All Required),Cxx interop (All Required),Release builds (All Required), andmacOS tests (All Required)respectively.Result
required check once and never revisit it when Swift/Xcode versions
rotate.
failures in required (stable) matrix entries do.
required checks continue to work.
See: