`cmake_tests.yml` has a `cmake_version` input and passes it to
`scripts/cmake-build.sh` as `CMAKE_VERSION`, but the script does not use
that value, so the CMake from the image's apt is used instead.
With this patch, when `CMAKE_VERSION` is set, the script downloads the
release from Kitware's GitHub releases on Linux (x86_64/aarch64) and
uses it for the build.
This lets projects that need a newer CMake than the image's apt provides
use the shared workflow by setting `cmake_version`.
This is blocking https://github.com/apple/swift-certificates/pull/325.
Reenable 6.1 CI workflows by default.
### Motivation:
6.1 workflows were disabled by default in
https://github.com/apple/swift-nio/commit/d09ffc8ad6437bc278897279e33150d8e39ee3d5.
However, we haven't been able to drop 6.1 in all repos using these
workflows yet, so this PR temporarily reenables the 6.1 workflows until
we can land that work everywhere else.
### Modifications:
Reenable 6.1 CI workflows by default.
### Result:
6.1 workflows are enabled by default.
### Motivation
* Swift 6.4 has been released, so we should add it to our CI coverage.
### Modifications
* Update `apple/swift-nio/scripts/generate_matrix.sh`
* Update `apple/swift-nio/scripts/check-matrix-job.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Add Swift 6.4 inputs to `macos_tests.yml` and `macos_benchmarks.yml`
* Add a 6.4 release job to `wasm_swift_sdk.yml`
* Enable the Windows 6.4 unit test job in `main.yml` and
`pull_request.yml`
* Copy benchmark thresholds from 6.3
### Result
* NIO runs Swift 6.4 CI, and downstream repositories can opt-in.
---
- Successful run (minus broken nightlies):
https://github.com/apple/swift-nio/actions/runs/36403423635?pr=3750
### Motivation:
We started seeing issues in Swift Log with building for Android when
using types from the Concurrency module.
Folks from the Android workgroup suggested we don't build with static
stdlib, and I confirmed that removing it fixes the issue:
https://github.com/apple/swift-log/actions/runs/34365246956/job/102512196662?pr=509
### Modifications:
Links the stdlib dynamically (default) for Android.
### Result:
Unblock Swift Log's CI. This topic can be further discussed in the
ongoing GitHub Actions unification.
### Motivation:
In October 2025, the naming convention for the file name of the Android
Swift SDK changed to drop the version. Our script expected it however,
so all SDK bundles published after that were getting skipped, which has
now caused other problems.
### Modifications:
Fixed the Android SDK file suffix.
However, this is only an immediate fix. A proper fix, which is out of
scope of this PR, will be to adopt the explicit "download" parameter in
the API
(https://www.swift.org/openapi/openapi.html#/Toolchains/listAndroidSDKDevToolchains),
which gives us the filename and we don't have to guess.
### Result:
Projects start downloading up-to-date Android Swift SDKs again.
Fix static Linux SDK snapshot resolution falling back to outdated
versions.
### Motivation:
The `main` job of the static Linux SDK matrix has been resolving
snapshots from over a month ago instead of recent nightlies.
`scripts/install_swift_sdk.sh` hardcodes the static-sdk artifact suffix
as `_static-linux-0.0.1`, but swift.org now publishes it as `0.1.0`.
Every recent snapshot 404s on the SDK URL, so the discovery loop keeps
rejecting them until it lands on a December snapshot that still used the
old suffix.
Fixes#3711
### Modifications:
`scripts/install_swift_sdk.sh` now tries a small list of known
static-sdk suffixes (`0.1.0`, then `0.0.1`) for each candidate snapshot
instead of a single hardcoded value, and stops at the first one that
resolves. The existing snapshot/SDK return-code checks and logging are
unchanged.
### Result:
The `main` branch job picks up current nightly snapshots again instead
of falling back 40+ days. If Apple bumps the static SDK version again in
the future, adding it to the candidate list is a one-line fix.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
Motivation:
We should be explicit about our dependencies, and not allow them to be
satisfied by transitive deps.
Modifications:
Add ncurses
Result:
More explicitness
### Motivation:
The CI pipelines offer the latest released Swift versions (which have
included Swift 6.3 for some time now) and
a nightly-main and nightly-next. Right now nightly-next pipelines are
all still 6.3, which is a problem and folks are
likely operating under the misguided assumption that they have 6.4
coverage in their pipelines.
### Modifications:
- Update the nightly-next pipelines to use 6.4 nightly images
### Result:
Nightly next pipelines moved to 6.4
### Motivation
* External callers of `macos_benchmarks.yml` (e.g. swift-log) currently
invoke the reusable workflow once per benchmark package, paying
self-hosted macOS runner-recycling cost for each invocation.
### Modifications
* Add a new `benchmark_package_paths` input to
`.github/workflows/macos_benchmarks.yml` and mark the singular
`benchmark_package_path` as deprecated. The run step forwards both
inputs straight to the script via `BENCHMARK_PACKAGE_PATH` and
`BENCHMARK_PACKAGE_PATHS` environment variables; the workflow itself
does no path parsing.
* Teach `scripts/check_benchmark_thresholds.sh` to accept
`BENCHMARK_PACKAGE_PATHS` as either a JSON array of strings
(auto-detected by a leading `[`, requires `jq`) or a newline-separated
list, falling back to the legacy `BENCHMARK_PACKAGE_PATH` when unset or
when the JSON form is an empty array.
* The script now loops over the resolved package list, wraps each
iteration in a GitHub Actions `::group::`, and emits an `::error::`
summary listing failed packages at the end, exiting non-zero if any
failed.
### Result
* A single workflow invocation runs all listed packages serially on each
Swift/Xcode runner, paying runner-recycling cost once per Swift version
instead of once per (version x package).
* Existing single-package callers keep working unchanged.
* Adopters of the script in other contexts (e.g. the Linux
`benchmarks.yml`) can pick up multi-package support by passing
`BENCHMARK_PACKAGE_PATHS` without reimplementing parsing or
failure-collection logic.
An example of this working https://github.com/apple/swift-log/pull/466
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-workflows` already test against
`nightly-main`, `nightly-6.3`, and `6.3` by default.
### Modifications:
- Add `nightly_main_enabled`, `nightly_6_3_enabled`, and
`release_6_3_enabled` boolean inputs to `wasm_swift_sdk.yml` (all
defaulting to `true`, matching the coverage of
`swiftlang/github-workflows/swift_package_test.yml`) and update the
matrix generation to emit the appropriate entry per enabled version.
- 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. 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`.
---------
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
### Motivation:
A recent PR (#3574) added support for customising the container
environment used for the matrix job for users of the reusable workflow.
It supported a custom Dockerfile and controlling `--cap-add` options to
the `docker run` command. Users who require this fine-grained control
with `--cap-add` also will benefit from being able to control the
`--security-opt` of the `docker run` command.
### Modifications:
- Add support for `--security-opt` docker flags in custom CI jobs
### Result:
Users of the reusable matrix CI workflow can control the
`--security-opt` for the container.
### Motivation
* Some consumers need to run CI inside custom Docker images with
additional Linux capabilities. The shared matrix workflows had no way to
express this — consumers had to maintain entirely bespoke CI workflows
instead.
### Modifications
* Added `MATRIX_LINUX_DOCKERFILE` and
`MATRIX_LINUX_DOCKER_CAPABILITIES_JSON` environment variables to
`generate_matrix.sh`. These propagate as `dockerfile` (string) and
`docker_capabilities` (JSON array) fields in the matrix JSON. Defaults
are empty/`[]` so existing callers are unaffected.
* Extended `add_matrix_entry()` with two optional trailing parameters
for the new fields.
* In `swift_test_matrix.yml`:
- Made the "Pull Docker image" step conditional — skipped when a
`dockerfile` is provided.
- Added a "Build Docker image from Dockerfile" step that builds the
image with `--build-arg SWIFT_IMAGE=<matrix image>` so consumers can
parameterise the Swift base image.
- Added `--cap-add` flags to `docker run` when `docker_capabilities` is
non-empty.
### Result
* Consumers can set `MATRIX_LINUX_DOCKERFILE` to a repo-relative path
and `MATRIX_LINUX_DOCKER_CAPABILITIES_JSON` to a JSON array of
capabilities. The matrix will build their Dockerfile per Swift version
and run containers with the requested capabilities.
* Existing consumers that don't set these variables see no change.
### Motivation
* The nightly Swift container images were still using `jammy` (Ubuntu
22.04) while the release images for 6.2+ have moved to `noble` (Ubuntu
24.04). We should align them.
### Modifications
* Changed `linux_nightly_next_container_image` and
`linux_nightly_main_container_image` in `generate_matrix.sh` from
`-jammy` to `-noble`.
### Result
* Nightly CI jobs now use noble-based images, consistent with the 6.2+
release images.
### Motivation:
An upcoming change in the library template adds a code snippet. Since
our cxx interop compatibility test script does not account for that
tests fail on nightly.
### Modifications:
Insert a newline character before other modifications.
### Result:
The cxx interop compatibility tests pass again on nightly.
### Motivation
* Swift 6.3 has been released, we should add it to our CI coverage.
### Modifications
* Update `apple/swift-nio/scripts/generate_matrix.sh`
* Update `apple/swift-nio/scripts/check-matrix-job.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Remove stale `NIGHTLY_6_1` fallback shims from `generate_matrix.sh`
* Migrate `linux_nightly_6_1_arguments_override` to
`linux_nightly_next_arguments_override` in `main.yml` and
`pull_request.yml`
* Copy benchmark thresholds from 6.2
### Result
* NIO tests against Swift 6.3 in CI and downstream repositories can
opt-in.
* A successful run using the new Swift 6.3 jobs:
https://github.com/apple/swift-nio/actions/runs/23841350537/job/69497505715?pr=3565
Fix static Linux SDK version hardcoding
### Motivation
* Nightly CI was failing with a checksum mismatch because the static
Linux SDK filename was hardcoded to `_static-linux-0.0.1`, but the
SDK has since been released as `0.1.0` with a different checksum.
* The swift.org releases API returns a `version` field alongside
the checksum for the `static-sdk` platform, so the version can be
resolved dynamically.
### Modifications
* Added `extract_static_sdk_version()` to read the `version` field from
the releases API response.
* In the `version` install path, override `sdk_suffix` with the
API-provided version rather than the hardcoded `0.0.1`.
### Result
* The correct SDK filename (`_static-linux-0.1.0`) is now resolved
and hopefully will continue to work for future version bumps.
### Motivation
* `check_benchmark_thresholds.sh` runs `git add --intent-to-add .` and
`git diff HEAD` to show updated threshold files when benchmarks regress.
* The unscoped `.` caused the diff to include everything in the working
tree, including the `.build` directory, producing noisy output.
### Modifications
* Pass `${benchmark_package_path}/Thresholds/` to both `git add
--intent-to-add` and `git diff HEAD --` so only threshold files appear
in the diff.
### Result
* The diff printed on benchmark failure shows only threshold file
changes.
### Motivation
* Swift 5.10 is no longer actively supported and CI does not require it
### Modifications
* Default Swift 5.10 CI jobs to disabled
### Result
* Swift 5.10 CI jobs will not run unless opted-in
### Motivation
* When threshold files don't exist yet, `thresholds update` creates new
untracked files. `git diff HEAD` only shows changes to tracked files, so
newly created threshold files were silently omitted from the diff.
### Modifications
* Run `git add --intent-to-add .` before `git diff HEAD` so that
untracked files are registered in the index and appear in the diff
output without staging their contents.
### Result
* The diff output now includes newly created threshold files.
### Motivation
* `check_benchmark_thresholds.sh` was updated to check for exit code 2
from `swift package benchmark thresholds check` to distinguish threshold
regression from build errors.
* It seems SwiftPM's `CommandPlugin` infrastructure always exits with
code 1 when `performCommand` throws, regardless of the error's raw
value. So the exit code is never 2, causing all regressions to fall
through to the `else` branch and be misreported as build errors, with no
diff output.
### Modifications
* Remove the `rc == 2` check and instead attempt `thresholds update` for
any non-zero `rc` from `thresholds check`.
* Use the result of `thresholds update` to distinguish regression
(success) from build error (failure).
* Remove `--exit-code` from `git diff` to prevent `set -uo pipefail`
from aborting the script before output is fully flushed.
### Result
* Benchmark threshold regressions correctly output the `=== BEGIN DIFF
===` section again.
* Actual build errors are still correctly detected and reported.
### Motivation:
Currently if there is an error in the Benchmark targets, that prevents
the Benchmark to build correctly, we still get a CI success.
### Modifications:
- Check for the threshold changed error
### Result:
- More reliable CI
### Motivation:
SwiftPM behaviour has changed in recent Swift nightlies.
In most recent released version of Swift, SwiftPM will use the parent
directory name for the source and test target directory too, even when
it contains a period:
```
% docker run -it swift:6.2 bash -c 'mkdir -p /tmp/foo.bar && cd /tmp/foo.bar && swift package init'
Creating library package: foo.bar
Creating Package.swift
Creating .gitignore
Creating Sources
Creating Sources/foo.bar/foo_bar.swift
Creating Tests/
Creating Tests/foo.barTests/
Creating Tests/foo.barTests/foo_barTests.swift
```
Note in the above how it replaces the `.` with a `_` in the source
files, but the directories retain the `.`.
In the recent nightly-main, SwiftPM has also started replacing `.` with
`_` in the target directory names:
```
% docker run -it swiftlang/swift:nightly-main bash -c 'cat /etc/motd && mkdir -p /tmp/foo.bar && cd /tmp/foo.bar && swift package init'
################################################################
# #
# Swift Nightly Docker Image #
# Tag: swift-DEVELOPMENT-SNAPSHOT-2026-02-06-a #
# #
################################################################
Creating library package: foo.bar
Creating Package.swift
Creating .gitignore
Creating Sources
Creating Sources/foo_bar/foo_bar.swift
Creating Tests/
Creating Tests/foo_barTests/
Creating Tests/foo_barTests/foo_barTests.swift
```
Probably this
https://github.com/swiftlang/swift-package-manager/pull/9252.
This breaks our CI automation, only on nightly-main, because we run
`swift package init` in a directory created by `mktemp -d`, which, by
default, follows the pattern `tmp.XXXXXXX`.
### Modifications:
Create temporary directory for Swift package using explicit pattern
containing no periods.
### Result:
C++ interop CI should now work again on nightly-main Swift, and continue
to work on all supported Swift versions.
This PR moves the nightly-next CI to use the 6.3 images. Since those
checks should be non required on any user of this package and the name
of the check doesn't change with moving images this should be a
non-breaking change.
Generate matrix script finds manifests in subdirs
### Motivation:
The genereate matrix script attempts to derive the minimum Swift version
supported by the package so that it doesn't run CI on versions which are
older than that supported. At the moment it can't cope with repositories
with packages in subdirectories like swift-nio-examples.
### Modifications:
The script looks for manifests in subdirectories if
`FIND_SUBDIRECTORY_MANIFESTS_ENABLED=true`. This is opt-in because by
default CI only uses the top-level manifests.
### Result:
CI should generate more appropriate jobs.
An example of this in action
https://github.com/apple/swift-nio/actions/runs/18968739126/job/54171197381?pr=3431
android build use swift static stdlib
### Motivation:
Android build fails and the guide says to use this flag
https://www.swift.org/documentation/articles/swift-sdk-for-android-getting-started.html
Recent failure - although weirdly it doesn't seem to happen every time:
```
error: link command failed with exit code 1 (use -v to see invocation)
ld.lld: error: cannot open crtbegin_dynamic.o: No such file or directory
ld.lld: error: cannot open crtend_android.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[558/601] Linking NIOUDPEchoClient
```
### Modifications:
android build use swift static stdlib
### Result:
hopefully success - making this change locally seemed to work.
This change can be seen in action here
https://github.com/apple/swift-nio/actions/runs/18949279888/job/54110590743?pr=3430
Swift SDK installation script improvements
### Motivation:
The SDK installation scripts had a few rough edges and didn't verify the
artefacts they downloaded.
### Modifications:
* Change naming to the more accurate "Swift SDK" where we can without
breaking downstream adopters.
* Separate Android NDK installation into its own script.
* Avoid using `cd` when setting up Android NDK.
* Verify checksums for SDKs and signatures for toolchains.
* Specify/control the SDK directory.
### Result:
* More accurate naming.
* More maintainable scripts.
* More secure downloads.
An example of this working
https://github.com/apple/swift-nio/actions/runs/18944235613/job/54090944716?pr=3429
### Motivation:
Android SDKs now exist and testing is good.
### Modifications:
Add an Android GitHub Actions workflow using the latest nightly image
and enable it in NIO targetting NIOCore (matching WASM testing).
### Result:
More reusable workflows and more test coverage for NIO
See this in action here (the CI job works but NIOCore fails to build):
https://github.com/apple/swift-nio/actions/runs/18718487605/job/53384086329?pr=3418
WASM SDK GitHub Actions workflows use NIO matrix rather than the
swiftlang one
### Motivation:
Using the NIO one is more in line with the surrounding workflows and
surfaces a simpler UI (possible jobs which aren't run don't appear in
the UI)
### Modifications:
Pull in changes from https://github.com/apple/swift-nio/pull/3159 and
add in the ability to specify environment variables and other build
arguments in line with the static Linux SDK workflow.
### Result:
More regularity, simpler checks UI.
See this in action here:
https://github.com/apple/swift-nio/actions/runs/18717131164/job/53379323803?pr=3417
---------
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
Co-authored-by: Max Desiatov <m_desiatov@apple.com>
Don't generate matrix jobs for Swift versions which aren't supported by
the package.
### Motivation:
Matrix workflows should not generate jobs for Swift versions < tools
version, doing so wastes compute and adds noise.
This means that:
- New repos don’t need to manually opt-out of old Swift versions
- Repos which have dropped an old Swift version (during a migration
window) won’t have failing tests until it’s turned off centrally.
### Modifications:
- The generate script now looks for `Package.swift` and
`Package@swift-*.swift` files and uses the lowest tools version in any
found file to determine the minimum supported Swift version
- Any Swift version lower than the minimum is disregarded and no jobs
are generated for it
- A new parameter is added to the workflows which allows the minimum
Swift version to be set manually (`minimum_swift_version`)
### Result:
By default in this and downstream packages we don't generate matrix jobs
for Swift versions which aren't supported by the package.
An example of this working:
https://github.com/apple/swift-nio/actions/runs/18711362977/job/53360387720?pr=3415
Allow the specification of custom environment variables in our matrix
workflow and those which use it.
### Motivation:
It can be useful to supply custom environment variables to control build
and runtime options.
### Modifications:
Allow users to supply a string of custom environment variable key-value
pairs which are supplied to the docker container running the matrix
commands.
To attempt to avoid issues with this string concatenation the change
also allows the user to specify custom list entry and key-value-pair
separators.
To avoid parameter bloat the env vars are set for all Swift versions,
hopefully that's sufficient for now.
### Result:
Adopters can
Examples of this working on Linux and Windows, note the presence of the
test environment variables I injected:
-
https://github.com/apple/swift-nio/actions/runs/17917619451/job/50943847555?pr=3376
- https://github.com/apple/swift-crypto/pull/413/checks
e.g.
```
Executing Docker command: docker run -v /home/runner/work/swift-nio/swift-nio:/swift-nio -w /swift-nio -e CI=true -e GITHUB_ACTIONS=true -e SWIFT_VERSION=6.0 -e workspace=/swift-nio -e TEST_DEBUG=1 -e TEST_LOG_LEVEL=info swift:6.0-jammy bash -c swift --version && swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error
```
Teach the script to indicate what is different on failure rather than
keeping quiet. This helps when the script is failing in CI but not
locally.
### Motivation:
The script is reporting that there are missing changes in CI on
swift-crypto, but I am unable to reproduce them locally. This is to get
immediate insight on why the check fails rather than keeping quiet.
### Modifications:
Include the diff in the update-cmake-lists script.
### Result:
update-cmake-lists script outputs the difference between what is in a PR
vs what it expects to see instead of shrugging and leaving it as an
exercise to the user.
Add assembly files for Windows
### Motivation:
These assembly files are now required to build on Windows Arm64.
### Modifications:
* The Windows assembly files are now handled in `update-cmake-lists.sh`.
### Result:
The assembly source files will be properly updated in `swift-crypto`.
### Motivation:
The current method of parsing the ASCII table output is brittle and
because the text output and the stored thresholds in JSON have different
precisions doesn't always work.
### Modifications:
* In the event that a deviation is found re-run the benchmarks in update
mode and print the git diff to the logs.
* The threshold update script scrapes this from the logs and applies it
locally so that it can then be committed.
* Add the functionality in the update script to update thresholds based
on diff in logs
### Result:
More reliable threshold updates.
An example of this working:
https://github.com/apple/swift-nio/actions/runs/15302748893?pr=3257
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
### Motivation:
Nightly builds for 6.2 exist, we should test against them.
### Modifications:
Update the matrix nightly-next to point to 6.2. This will affect
downstream adopters but shouldn't break them because they don't gatet
PRs on this passing.
### Result:
nightly tests will run against Swift 6.2
An example of this working
https://github.com/apple/swift-nio/actions/runs/15185876449/job/42706027686?pr=3250
Update check-matrix-job.sh to default swift commands so that callers
which don't define them can still run workflows. At the moment they see
failures if they don't define any one of the commands.
### Motivation:
Swift 5.9 is no longer supported and CI has been updated to no longer
require it, we should disable it by default.
### Modifications:
* Default Swift 5.9 CI jobs to disabled
### Result:
Swift 5.9 CI jobs will not run unless opted-in
### Motivation:
The matrix job script used by the legacy Swift matrix workflow is still
used directly in some places where they need to run sidecar services, it
hasn't been updated for Swift 6.1
### Modifications:
Add cases for Swift 6.1 and clean up some missed changes for the
nightly-6.1 -> nightly-next naming change.
### Result:
Downstream services should be able to run matrix workflows with Swift
6.1.
Add and enable Swift 6.1 workflows
### Motivation:
Swift 6.1 has been released, we should add it to our CI coverage.
### Modifications:
* Update `appe/swift-nio/scripts/generate_matrix.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Copy over test flags from Swift 6.0 jobs
### Result:
NIO tests against Swift 6.1 in CI and downstream repositories can
opt-in.
(Successful CI run with the workflows modified to use the changes on
this branch
https://github.com/apple/swift-nio/actions/runs/14400598096?pr=3196)
Static SDK installation script improvements
### Motivation:
Make static SDK installation scripts more modular and make
failures easier to diagnose.
### Modifications:
- Allow specification of binaries from outside the installation script
- Remove script dependency installation from the script
- Separate the Swift dependency installation into its own script
- Fatal error explicitly if the installed Swift can't be found
- Make curl operations for downloading artifacts explicitly fail
### Result:
Scripts which are easier to maintain and operate.
An example CI run with this in operation
https://github.com/apple/swift-nio/actions/runs/14329482180/job/40162003318?pr=3186
### Motivation
A few repositories have custom workflows for checking CMake, we would
like to unify this for maintenance and adoption simplicity.
Further to this at the moment they only check that the scripts are
up-to-date, we'd also like to have them build using CMake.
### Modifications
Add the re-usable workflow and supporting scripts
### Result:
Repositories using CMake can switch to the centralised workflow.
An example of it in action
https://github.com/apple/swift-crypto/actions/runs/13837092514/job/38782284575
### Motivation:
The static SDK workflow currently assumes a local setup script which
isn't true for external adopters.
### Modifications:
* The static SDK workflow now curls for the setup script.
* Run Static SDK checks on PR commits
### Result:
External adopters should be unblocked.
A re-usable static SDK compilation workflow
### Motivation:
We would like to offer the ability to opt-in to CI coverage for
compilation against the Linux static SDK.
### Modifications:
Introduce a workflow which will install a Swift snapshot and Linux SDK
and test the repository builds against it.
The script which sets up the VM will install snapshots and SDKs for
either branch or released-version snapshots. They can be specified as:
- a specific version string
- the 'latest' version, the script attempts to find the most recent
version enumerated on swift.org with both SDK and toolchain available
- the most recent snapshot for the specified branch name enumerated on
swift.org with both SDK and toolchain available
At the moment the script should work on ubuntu and amazonlinux OSes,
this can be expanded in the future.
The current matrix covers testing building on Ubuntu Jammy for the main
branch and latest released Swift version (6.0.3) and enables it on our
periodic CI runs.
See
https://github.com/apple/swift-nio/actions/runs/13722773053/job/38381907947?pr=3019
for a recent example of this workflow in action.
### Result:
Increased CI coverage
Use nightly_next as swift version
see https://github.com/apple/swift-nio/pull/3122
Motivation:
To not have to rename threshold directories when the nightly branch
changes.
Modifications:
* Use nightly_next as swift version in the matrix generation script
which
is picked up by the benchmark script.
* Move nightly-next thresholds and add legacy symlink
Result:
Benchmark thresholds will attempt to find directories named
nightly_next, not nightly_6_1.
Update generate matrix stript to use nightly_next
### Motivation:
Updating the CI parameters for changing nightly job targets with each
new Swift version (6.0, 6.1, ...) is onerous. Whilst this gives us some
value in the non-nightly pipelines by forcing adopters to apply thought
to what is applied to each supported version, the nightlies arguably
deliver less value in this regard as they tend to be non-required.
### Modifications:
Change flags to refer to nightly_next rather than nightly_6_1, implement
a shim so that the old environment variables still work.
### Result:
We will be able to modify adopter workflows to use nightly_next
terminology.
Example of a job where workflows are using the new matrix
https://github.com/apple/swift-nio/actions/runs/13520016728
### Motivation:
We recently added support for nightly 6.1 Swift and old scripts making
use of `check-matrix-job.sh` do not set `COMMAND_OVERRIDE_NIGHTLY_6_1`
which causes the script to fail. We should tolerate this.
### Modifications:
Add a default case for `COMMAND_OVERRIDE_NIGHTLY_6_1`.
### Result:
No failures if a caller doesn't specify `COMMAND_OVERRIDE_NIGHTLY_6_1`.
```
❯ SWIFT_VERSION=nightly-6.1 COMMAND="echo foo" COMMAND_OVERRIDE_5_9="" COMMAND_OVERRIDE_5_10="" COMMAND_OVERRIDE_6_0="" COMMAND_OVERRIDE_NIGHTLY_MAIN="" ./scripts/check-matrix-job.sh
** Running default command
foo
❯ SWIFT_VERSION=nightly-6.1 COMMAND="echo foo" COMMAND_OVERRIDE_5_9="" COMMAND_OVERRIDE_5_10="" COMMAND_OVERRIDE_6_0="" COMMAND_OVERRIDE_NIGHTLY_MAIN="" COMMAND_OVERRIDE_NIGHTLY_6_1="echo bar" ./scripts/check-matrix-job.sh
** Running nightly 6.1 command override
bar
```