Sequoia runners are no longer available and we need to switch to Tahoe.
### Motivation:
Sequoia runners are no longer available and jobs requesting them hang.
### Modifications:
Request Tahoe runners.
### Result:
Jobs no longer hang, macOS tests and benchmarks are running on Tahoe.
Xcode-latest currently points to the 26.1 release so it gives us a false
sense of version coverage, and should be ignored.
### Motivation:
We do not need to build twice with the same environment.
### Modifications:
Set default value for Xcode latest beta enabled to `false`
### Result:
One fewer job generated for the macOS build matrix.
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
Instead of evaluating inputs directly in the run step, save them to an
environment variable and evaluate that.
### Motivation:
Evaluating workflow inputs directly can lead to injection attacks, such
as those described at https://docs.zizmor.sh/audits/#template-injection
### Modifications:
Evaluate workflow inputs as environment variables so that they do not
inadvertently execute arbitrary shell injections.
### Result:
The workflows should be more secure against malicious inputs.
Limit Darwin Job execution to apple org.
### Motivation:
When the repo is forked, the forks do not have access to the self-hosted
CI, so it should not block actions in the forked environment.
### Modifications:
Conditionalize Darwin job execution.
### Result:
macOS CI will not queue on forks.
### Motivation:
The Watch Series 10 and iPhone 16 Pro simulators haven't been working
for some time
### Modifications:
Swap the iOS and macOS test targets
### Result:
Testing against simulators should work
Here is an example of the change in action. The new targets can be
discovered but one of the Xcodes then hits an unrelated issue
https://github.com/apple/swift-nio/actions/runs/19130486127/job/54672071880?pr=3437
### Motivation:
Xcode 26.1 has been released so our support window slides forwards.
### Modifications:
* Add Xcode 26.1 job
* Log Xcode and swift versions for debugging purposes
### Result:
Current Xcode support window, easier debugging.
**NOTE:** we will soon disable Xcode 16.3 by default but will give
adopters time to update their PR status checks first
An example of this in action
https://github.com/apple/swift-nio/actions/runs/19129667587/job/54667112541?pr=3438
26.1 Beta 2 has been released so we have an Xcode beta to be testing, we
should enable it by default again. It was previously disabled under the
impression that there was no current beta.
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
```
### Motivation:
New Xcodes are out so we should test with them.
### Modifications:
Update the macOS matrix generation script
### Result:
Add Xcode 26.0, 16.4 CI, remove 16.2 jobs by default.
CI with the new Xcodes working (except 26.0 which will come online as
nodes recycle
https://github.com/apple/swift-nio/actions/runs/17834807139/job/50709176060?pr=3375)
Instead of checking for a setup command in bash, we use GitHub Actions
to determine if there is anything to run
### Motivation:
Slightly cleaner output when looking at logs.
### Modifications:
Moved an if statement from bash to yaml.
### Result:
The setup commands step will generally be skipped instead of executing a
no-op
Co-authored-by: Cory Benfield <lukasa@apple.com>
Motivation:
The nightly visionOS tests are failing because there
are too many simulators matching the given destination
selector.
Modifications:
- On Xcode 16.2 use visionOS 2.3
Result:
Nightly CI passes
Specify default macOS variant in non-catalyst builds.
https://developer.apple.com/forums/thread/737851
### Motivation:
macOS build has an extra warning:
```
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, name:Any Mac }
{ platform:macOS, variant:Mac Catalyst, name:Any Mac }
```
### Modifications:
Explicitly select the macOS variant.
### Result:
No warnings
### Motivation:
The macOS runners have a symlink to the latest released Xcode beta at
Xcode-latest.app, by making use of it we will always test against the
most recent version.
### Modifications:
Introduce new parameters for the latest Xcode beta and deprecate those
which mention Xcode 21 betas.
### Result:
Tests will move on to using Xcode 26 beta 2 via the symlink
Example of this working
https://github.com/apple/swift-nio/actions/runs/16075841548/job/45370760690?pr=3285
Fixed issue with macOS CI when overrides are being used.
### Motivation:
When we use Xcode_XX_X_build_arguments_override, the CI fails because of
an extra double quotes ("") making its way to the final command.
### Modifications:
Remove the extra double quote from the Yaml file defining macOS tests.
### Result:
We are able to run `swift build` with extra arguments.
Add Xcode 26 beta 1 to macOS CI and disable Xcode 16.1 jobs by default
### Motivation:
* Xcode 26 beta 1 is now released, we should test our code on it.
* We should drop 16.1 to conserve the number of jobs. 16.1 isn't
offering much coverage anyway since it has the same Swift minor version
(6.0) as Xcode 16.2.
### Modifications:
* Enable use of Xcode 26 beta 1 by default.
* Disable Xcode 16.1 jobs by default
### Result:
* This and downstream repos will run Xcode builds on Xcode 26 beta 1.
* Xcode 16.1 jobs won't run by default on this or downstream repos but
will run if explicitly requested.
An example of this working
https://github.com/apple/swift-nio/actions/runs/15614383580/job/43983277904?pr=3267
Motivation:
A setup command for 16.2 was added as a workaround for an infra issue.
This should now be resolved.
Modifications:
- Remove the default setup command
Result:
CI should still work.
### Motivation:
Building for visionOS no longer seems to be having issues on the
runners, we should enable it to increase our test coverage.
### Modifications:
Enable visionOS xcodebuilds by default in CI
### Result:
NIO and downstream repositories will see their *existing* macOS CI
workflows now build for visionOS.
They can be disabled if necessary by passing
`visionos_xcode_build_enabled: false`
See apple/swift-nio#3234, apple/swift-nio#3235
Add per-xcode setup command
### Motivation:
Sometimes individual Xcodes require different steps to fixup simulator
configuration.
### Modifications:
* Allow the config to define custom setup steps
* Add some `simctl` commands to Xcode 16.2 by default to workaround
issues
### Result:
Adopters can specify their own setup steps
Example of this working with a test shim in place
https://github.com/apple/swift-nio/actions/runs/14992683747/job/42119567309?pr=3236
### Motivation:
Building for visionOS no longer seems to be having issues on the
runners, we should enable it to increase our test coverage.
###Modifications:
Enable visionOS xcodebuilds by default in CI
### Result:
NIO and downstream repositories will see their *existing* macOS CI
workflows now build for visionOS.
They can be disabled if necessary by passing
`visionos_xcode_build_enabled: false`
### Motivation:
These don't work on all versions but we should allow people to opt-in if
they know they do work
### Modifications:
Uncomment the steps and make the step default to off
### Result:
People can choose to run visionOS builds and tests
### Motivation:
Xcode 16.3 has been released, we should cover it in CI
### Modifications:
* Add Xcode 16.3 runs by default
* Disable Xcode 16.0 runs by default (soft deprecation)
Note that the Xcode version offering is still a work in progress.
### Result:
macOS CI will test using Xcode 16.3
An example run with this working
https://github.com/apple/swift-nio/actions/runs/14220724296/job/39876502770?pr=3171
Add support for macOS CI runner pools
### Motivation:
With new runners coming online we are separating the runners into pools.
* "nightly" runners are to be targeted for asynchronous work which users
aren't waiting on such as overnight work.
* "general" runners can be used for either synchronoous or asynchronous
work.
* At the moment all runers are "general" runners, a subset are "nightly"
runners.
The aim here is to prioritize work which users are waiting for such as
on PRs. Asynchronous work prioritizing the "nightly" runners will likely
end up queuing for the contended runners but synchronous work will claim
any available node.
### Modifications:
* Add a `runner_pool` input for the macOS workflow
* Default the `runner_pool` to `nightly` since the vast majority of
existing workflows are specifying asynchronous work.
* Specify the runner pool in NIO's use of macOS CI.
### Result:
Support for runner pools.
An example of this in action:
https://github.com/apple/swift-nio/actions/runs/14188573697/job/39748250001
Separate build and test steps in `macos_tests.yml`. Test execution can
now also be disabled through an input. This is useful for clarity of
output and also in some cases where test execution may not be supported
yet.
### Motivation:
We are still exploring the shape of macOS CI and exploring the system's
capabilities.
### Modifications:
* Add visionOS jobs
* Remove Xcode 15.4 as it is no longer on the runners
* Add support for running tests targetting other platforms
* Enable test targeting other platforms on daily jobs to increase
coverage without bloating PR runtimes.
### Result:
More macOS CI coverage
CI run with this enabled
https://github.com/apple/swift-nio/actions/runs/13944231147/job/39027647470?pr=3150
- the iOS failure is unrelated to this change
Enable macOS CI
### Motivation:
To expand test coverage to the Darwin platforms.
### Modifications:
Create a new re-usable workflow `macos_tests.yml` which offers testing
and compilation checks for multiple Xcodes and simulator destinations.
The new workflow first performs `swift test` with configurable
parameters and then goes on to build the code targeting generic
destinations for:
* iOS
* macOS
* macOS Catalyst
* tvOS
* visionOS (temporarily disabled due to a possible runner issue)
* watchOS
At the moment this is workflow is enabled to run on the NIO repository:
* on each commit to a PR
* on each merge to `main`
* overnight on a timer
This will likely be revised due to capacity.
This functionality is implemented as a standalone workflow to preserve
flexibility as requirements and capacity change over time.
### Result:
Increased test coverage.