Repository navigation
Add multi-version matrix support to Wasm Swift SDK workflow - #3575
Merged
Merged
Conversation
Motivation: The WASM CI only ran against nightly-main, making it impossible to distinguish toolchain regressions from code issues. Other repos in the ecosystem using swiftlang/github-workflows already test against nightly-main, nightly-6.3, and 6.3 by default. Modifications: - Add a `swift_versions` input to `wasm_swift_sdk.yml` (default: `["nightly-main", "nightly-6.3", "6.3"]`, matching swiftlang/github-workflows/swift_package_test.yml) and update the matrix generation to iterate over versions, mapping `nightly-X.Y` to the corresponding branch snapshot and `X.Y` to the release toolchain. - Validate `swift_versions` is a non-empty string array with entries matching `nightly-X`, `nightly-X.Y`, or `X.Y` format. - Update `install_swift_sdk.sh` to support non-main branch snapshots by deriving the API and download paths from `INSTALL_SWIFT_BRANCH` rather than hardcoding `main`/`development`. - Fail early with a clear message if the branch snapshot API returns no results, rather than hitting an unbound variable error. Result: WASM builds are now tested against multiple Swift versions, providing a stable baseline to identify nightly-only regressions.
rnro
reviewed
Apr 14, 2026
| swift_versions: | ||
| type: string | ||
| description: "Swift version list (JSON). Use 'nightly-main', 'nightly-X.Y' for branch snapshots, or 'X.Y' for releases." | ||
| default: '["nightly-main", "nightly-6.3", "6.3"]' |
Contributor
There was a problem hiding this comment.
At the moment the idiomatic way to enable/disable Swift versions in the NIO workflows is to have a parameter which enables/disables specific versions:
rnro
requested changes
Apr 14, 2026
### Motivation: The previous implementation used a `swift_versions` JSON array input, which is not idiomatic for NIO workflows. The reviewer pointed out that the standard pattern in this repository is to use individual boolean inputs to enable/disable specific versions (as seen in unit_tests.yml). ### Modifications: Replace the `swift_versions` JSON array input with three individual boolean inputs: `nightly_main_enabled`, `nightly_6_3_enabled`, and `release_6_3_enabled`, each defaulting to true. ### Result: The workflow input API now matches the idiomatic NIO pattern used across other workflows in this repository.
rnro
reviewed
Apr 14, 2026
rnro
requested changes
Apr 14, 2026
rnro
reviewed
Apr 15, 2026
| fi | ||
|
|
||
| if [[ "$INPUT_NIGHTLY_NEXT_ENABLED" == "true" ]]; then | ||
| entry=$(make_entry "nightly-6.3" "INSTALL_SWIFT_BRANCH=swift-6.3-branch") |
Contributor
There was a problem hiding this comment.
Almost there, can you move this next -> 6.3 mapping out of the body of this code somehow? In an env var might be nicest because then it's very clear how you would update it.
rnro
approved these changes
Apr 16, 2026
Lukasa
enabled auto-merge (squash)
April 21, 2026 14:40
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 multi-version matrix support to Wasm Swift SDK workflow
Motivation:
The WASM CI only ran against nightly-main, making it impossible to distinguish toolchain regressions from code issues. Other repos in the ecosystem using
swiftlang/github-workflowsalready test againstnightly-main,nightly-6.3, and6.3by default.Modifications:
nightly_main_enabled,nightly_6_3_enabled, andrelease_6_3_enabledboolean inputs towasm_swift_sdk.yml(all defaulting totrue, matching the coverage ofswiftlang/github-workflows/swift_package_test.yml) and update the matrix generation to emit the appropriate entry per enabled version.install_swift_sdk.shto support non-main branch snapshots by deriving the API and download paths fromINSTALL_SWIFT_BRANCHrather than hardcodingmain/development.Result:
WASM builds are now tested against multiple Swift versions, providing a stable baseline to identify nightly-only regressions. Callers using the workflow without arguments get the new default coverage automatically; those who want to narrow the matrix can set specific version inputs to
false.