Add official workflows to CI - #459
Conversation
|
@Lukasa, wdyt, can you approve the workflow run? |
| enable_macos_checks: true | ||
| enable_macos_swiftly_checks: true | ||
| enable_linux_static_sdk_build: true | ||
| enable_wasm_sdk_build: true | ||
| enable_android_sdk_build: true | ||
| enable_android_sdk_checks: true | ||
| enable_freebsd_checks: true |
There was a problem hiding this comment.
Was there something in this list that we don't already have coverage for that you'd like to see added?
I ask because this project, like many others our team maintains, tends to make use of the NIO matrix workflows where they exist, which offers a different enough UX for maintainers and contributors that we have yet to converge on a shared set.
It already covers some of the above, e.g. macOS and the static Linux SDK. We also have Windows CI, which is not mentioned in this list.
There was a problem hiding this comment.
No, I simply enabled everything in these official workflows initially, to see if anything fails. I thought you could then pick out what you want, especially since they offer more versions and the snapshots builds are more up to date, eg Android builds with the latest snapshot bundles whereas the NIO-configured ones appear out of date.
These official GitHub workflows build for Windows and linux by default, as you can see in the results, so listing those two here is unnecessary.
|
Can you approve the workflow run, @simonjbeaumont? |
I have done so, but I think there's probably some drawbacks to us adopting swiftlang/github-workflows. |
|
Such as? These swiftlang workflows would give much better coverage to this repo, such as adding Android and FreeBSD and the trunk snapshot of the static linux SDK would be much more recent than the old Dec. 1 2025 snapshot that the NIO-configured workflow uses. Where there is overlap, we can always choose the best of each set of workflows to use. |
The primary issue we had is they produce a lot of noise in the CI checks due to the way the matrix workflows are evaluated. For every matrix cell that we don't want, the workflows still generate a skipped check and one that has some distracting unexpanded variable expansions. Here's an example from a currently open PR in Swift Collections, which uses the swiftlang workflows
The NIO workflows do not do this. Instead they dynamically generate the matrix jobs based on config which means that only checks for things we enable show up. IIUC there is an ongoing discussion about unifying the NIO and Swiftlang workflows and so the NIO (and adjacent projects) have been holding out.
I am sympathetic to the request though -- better coverage is important -- which is why I originally asked if there were ones you were specifically interested in. For those, we can evaluate the swiftlang workflows and/or update the NIO workflows to include the missing coverage.
I believe we already have the static SDK check (including a nightly-main variant), although I just checked and presumably this is the snapshot issue you were mentioning: — (link) That looks like a bug with the NIO workflow. Willing to accept it might be a bug that the swiftlang workflows do not have, but we should get it addressed independently in any event. For Android, NIO does have a workflow we've adopted in many of the NIO-adjacent repos. Do you consider it to be sufficient? If so I expect that would be the path of least resistance here. For FreeBSD, I think that's just setting the runner so potentially we could do this too here with the NIO workflow. Let me do some more digging here. Curious what you think to the above in the meantime. EDIT: Now filed apple/swift-nio#3711 to track the use of old static SDK. |
|
We are working with @shahmishal to unify the workflows between the NIO ones and the swiftlang provided ones. As Si mentioned, the swiftlang provided workflows have severe deficiencies that we do not want from a contributor experience perspective on our repositories. We really do want to unify but we need to solve those deficiencies first before we can move over. There is a lot of automated tooling that we are using to update the branch protection rules based on how those workflows generate their checks. Moving just one repository over means our tools won't work for this repo anymore. |
I'm aware, Jake tried to fix that in swiftlang/github-workflows#208 but couldn't get it to work, swiftlang/github-workflows#234.
That merger has been publicly referenced before, but in the meantime I don't see any reason not to use both. I don't think the extra skipped checks shown in the UI are a big deal, provided we fix that in the coming months.
I am only interested in better coverage generally: that's why I enabled everything in this pull, so we could compare the CI results and choose.
Yep, that's the outdated 2025 snapshot I noted.
That NIO workflow was also outdated for the Android snapshots, last I checked.
Why stick with the NIO-based workflows for the platforms where they are missing or behind, when this simple config would add those instead? Other than the minor issue of noise from the skipped checks, I see no reason not to just use both until the merger is done.
@FranzBusch, I don't know what you mean by "branch protection rules," but we could only require the NIO workflows to pass, as they are now, and simply add these swiftlang workflows for additional platform info. Would that avoid the problems you mention? |
Sadly no because it will add skipped workflows that @simonjbeaumont was referring to and which we really wanna avoid showing to contributors. |
|
OK, if the skipped workflows shown in the GitHub UI are such a big deal to you, then these official swiftlang build workflows cannot be used in these server-side Swift packages at all. Is there any timeline for merging the swiftlang and NIO workflows? It would seem we are stuck with two separate testing approaches until then. I don't think it would be a good idea to splinter resources by maintaining two separate approaches to the same GitHub workflows, so better to merge the two soon, if possible. |
Good news! @rnro is working on exactly this and intends to opening PRs pretty soon. |

See what works