Files
swift-nio/.github/workflows/macos_tests.yml
T
dependabot[bot] fa87cfba3d Bump actions/checkout from 6.0.2 to 7.0.0 (#3633)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2
to 7.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>block checking out fork pr for pull_request_target and workflow_run
by <a href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li>
<li>Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the
minor-actions-dependencies group across 1 directory by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2458">actions/checkout#2458</a></li>
<li>Bump flatted from 3.3.1 to 3.4.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2460">actions/checkout#2460</a></li>
<li>Bump js-yaml from 4.1.0 to 4.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2461">actions/checkout#2461</a></li>
<li>Bump <code>@​actions/core</code> and
<code>@​actions/tool-cache</code> and Remove uuid by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2459">actions/checkout#2459</a></li>
<li>upgrade module to esm and update dependencies by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2463">actions/checkout#2463</a></li>
<li>Bump the minor-npm-dependencies group across 1 directory with 3
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2462">actions/checkout#2462</a></li>
<li>getting ready for checkout v7 release by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2464">actions/checkout#2464</a></li>
<li>update error wording by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2467">actions/checkout#2467</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v6.0.3...v7.0.0">https://github.com/actions/checkout/compare/v6.0.3...v7.0.0</a></p>
<h2>v6.0.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Update changelog by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2357">actions/checkout#2357</a></li>
<li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
<li>Fix checkout init for SHA-256 repositories by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li>
<li>Update changelog for v6.0.3 by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2446">actions/checkout#2446</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/yaananth"><code>@​yaananth</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v6...v6.0.3">https://github.com/actions/checkout/compare/v6...v6.0.3</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v7.0.0</h2>
<ul>
<li>Block checking out fork PR for pull_request_target and workflow_run
by <a href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2454">actions/checkout#2454</a></li>
<li>Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the
minor-actions-dependencies group across 1 directory by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2458">actions/checkout#2458</a></li>
<li>Bump flatted from 3.3.1 to 3.4.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2460">actions/checkout#2460</a></li>
<li>Bump js-yaml from 4.1.0 to 4.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2461">actions/checkout#2461</a></li>
<li>Bump <code>@​actions/core</code> and
<code>@​actions/tool-cache</code> and Remove uuid by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2459">actions/checkout#2459</a></li>
<li>upgrade module to esm and update dependencies by <a
href="https://github.com/aiqiaoy"><code>@​aiqiaoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2463">actions/checkout#2463</a></li>
<li>Bump the minor-npm-dependencies group across 1 directory with 3
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/checkout/pull/2462">actions/checkout#2462</a></li>
</ul>
<h2>v6.0.3</h2>
<ul>
<li>Fix checkout init for SHA-256 repositories by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2439">actions/checkout#2439</a></li>
<li>fix: expand merge commit SHA regex and add SHA-256 test cases by <a
href="https://github.com/yaananth"><code>@​yaananth</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2414">actions/checkout#2414</a></li>
</ul>
<h2>v6.0.2</h2>
<ul>
<li>Fix tag handling: preserve annotations and explicit fetch-tags by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2356">actions/checkout#2356</a></li>
</ul>
<h2>v6.0.1</h2>
<ul>
<li>Add worktree support for persist-credentials includeIf by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2327">actions/checkout#2327</a></li>
</ul>
<h2>v6.0.0</h2>
<ul>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
</ul>
<h2>v5.0.1</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<h2>v5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>v4.3.1</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<h2>v4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0"><code>9c091bb</code></a>
update error wording (<a
href="https://redirect.github.com/actions/checkout/issues/2467">#2467</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/1044a6dea927916f2c38ba5aeffbc0a847b1221a"><code>1044a6d</code></a>
getting ready for checkout v7 release (<a
href="https://redirect.github.com/actions/checkout/issues/2464">#2464</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/f0282184c7ce73ab54c7e4ab5a617122602e575f"><code>f028218</code></a>
Bump the minor-npm-dependencies group across 1 directory with 3 updates
(<a
href="https://redirect.github.com/actions/checkout/issues/2462">#2462</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/d914b262ffc244530a203ab40decab34c3abf34d"><code>d914b26</code></a>
upgrade module to esm and update dependencies (<a
href="https://redirect.github.com/actions/checkout/issues/2463">#2463</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/537c7ef99cef6e5ddb5e7ff5d16d14510503801d"><code>537c7ef</code></a>
Bump <code>@​actions/core</code> and <code>@​actions/tool-cache</code>
and Remove uuid (<a
href="https://redirect.github.com/actions/checkout/issues/2459">#2459</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/130a169078a413d3a5246a393625e8e742f387f6"><code>130a169</code></a>
Bump js-yaml from 4.1.0 to 4.2.0 (<a
href="https://redirect.github.com/actions/checkout/issues/2461">#2461</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/7d09575332117a40b46e5e020664df234cd416f3"><code>7d09575</code></a>
Bump flatted from 3.3.1 to 3.4.2 (<a
href="https://redirect.github.com/actions/checkout/issues/2460">#2460</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/0f9f3aa320cb53abeb534aeb54048075d9697a0e"><code>0f9f3aa</code></a>
Bump actions/publish-immutable-action (<a
href="https://redirect.github.com/actions/checkout/issues/2458">#2458</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/f9e715a95fcd1f9253f77dd28f11e88d2d6460c7"><code>f9e715a</code></a>
block checking out fork pr for pull_request_target and workflow_run (<a
href="https://redirect.github.com/actions/checkout/issues/2454">#2454</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/df4cb1c069e1874edd31b4311f1884172cec0e10"><code>df4cb1c</code></a>
Update changelog for v6.0.3 (<a
href="https://redirect.github.com/actions/checkout/issues/2446">#2446</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/checkout/compare/de0fac2e4500dabe0009e67214ff5f5447ce83dd...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=6.0.2&new-version=7.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 07:32:55 +00:00

445 lines
21 KiB
YAML

name: macOS tests
permissions:
contents: read
on:
workflow_call:
inputs:
xcode_16_3_enabled:
type: boolean
description: "⚠️ Deprecated, has no effect. This Xcode version is no longer installed on the runners."
default: false
xcode_16_3_build_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_16_3_test_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_16_3_setup_command:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_16_4_enabled:
type: boolean
description: "⚠️ Deprecated, has no effect. This Xcode version is no longer installed on the runners."
default: false
xcode_16_4_build_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_16_4_test_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_16_4_setup_command:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_0_enabled:
type: boolean
description: "⚠️ Deprecated, has no effect. This Xcode version is no longer installed on the runners."
default: false
xcode_26_0_build_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_0_test_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_0_setup_command:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_1_enabled:
type: boolean
description: "⚠️ Deprecated, has no effect. This Xcode version is no longer installed on the runners."
default: false
xcode_26_1_build_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_1_test_arguments_override:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_1_setup_command:
type: string
description: "⚠️ Deprecated, has no effect."
default: ""
xcode_26_2_enabled:
type: boolean
description: "⚠️ Jobs with this version of Xcode are deprecated."
default: false
xcode_26_2_build_arguments_override:
type: string
description: "⚠️ Deprecated."
default: ""
xcode_26_2_test_arguments_override:
type: string
description: "⚠️ Deprecated."
default: ""
xcode_26_2_setup_command:
type: string
description: "⚠️ Deprecated."
default: ""
xcode_latest_beta_enabled:
type: boolean
description: "Boolean to enable the Xcode beta jobs (uses latest beta if one currently exists). Defaults to true."
default: true
xcode_latest_beta_build_arguments_override:
type: string
description: "The arguments passed to swift build in the Xcode beta job."
default: ""
xcode_latest_beta_test_arguments_override:
type: string
description: "The arguments passed to swift test in the Xcode beta job."
default: ""
xcode_latest_beta_setup_command:
type: string
description: "The command(s) to be executed before all other work."
default: ""
swift_6_1_enabled:
type: boolean
description: "Boolean to enable the Swift 6.1 jobs. Defaults to true."
default: true
swift_6_1_build_arguments_override:
type: string
description: "The arguments passed to swift build in the Swift 6.1 job."
default: ""
swift_6_1_test_arguments_override:
type: string
description: "The arguments passed to swift test in the Swift 6.1 job."
default: ""
swift_6_1_setup_command:
type: string
description: "The command(s) to be executed before all other work."
default: ""
swift_6_2_enabled:
type: boolean
description: "Boolean to enable the Swift 6.2 jobs. Defaults to true."
default: true
swift_6_2_build_arguments_override:
type: string
description: "The arguments passed to swift build in the Swift 6.2 job."
default: ""
swift_6_2_test_arguments_override:
type: string
description: "The arguments passed to swift test in the Swift 6.2 job."
default: ""
swift_6_2_setup_command:
type: string
description: "The command(s) to be executed before all other work."
default: ""
swift_6_3_enabled:
type: boolean
description: "Boolean to enable the Swift 6.3 jobs. Defaults to true."
default: true
swift_6_3_build_arguments_override:
type: string
description: "The arguments passed to swift build in the Swift 6.3 job."
default: ""
swift_6_3_test_arguments_override:
type: string
description: "The arguments passed to swift test in the Swift 6.3 job."
default: ""
swift_6_3_setup_command:
type: string
description: "The command(s) to be executed before all other work."
default: ""
build_scheme:
type: string
description: "The build scheme used in the Xcode builds."
swift_test_enabled:
type: boolean
description: "Boolean to enable test execution with `swift test`. Defaults to true."
default: true
macos_xcode_build_enabled:
type: boolean
description: "Boolean to enable the Xcode build targeting macOS. Defaults to true."
default: true
macos_xcode_test_enabled:
type: boolean
description: "Boolean to enable the Xcode test targeting macOS. Defaults to false."
default: false
ios_xcode_build_enabled:
type: boolean
description: "Boolean to enable the Xcode build targeting iOS. Defaults to true."
default: true
ios_xcode_test_enabled:
type: boolean
description: "Boolean to enable the Xcode test targeting iOS. Defaults to false."
default: false
watchos_xcode_build_enabled:
type: boolean
description: "Boolean to enable the Xcode build targeting watchOS. Defaults to true."
default: true
watchos_xcode_test_enabled:
type: boolean
description: "Boolean to enable the Xcode test targeting watchOS. Defaults to false."
default: false
tvos_xcode_build_enabled:
type: boolean
description: "Boolean to enable the Xcode build targeting tvOS. Defaults to true."
default: true
tvos_xcode_test_enabled:
type: boolean
description: "Boolean to enable the Xcode test targeting tvOS. Defaults to false."
default: false
visionos_xcode_build_enabled:
type: boolean
description: "Boolean to enable the Xcode build targeting visionOS. Defaults to true."
default: true
visionos_xcode_test_enabled:
type: boolean
description: "Boolean to enable the Xcode test targeting visionOS. Defaults to false."
default: false
runner_pool:
type: string
description: "The runner pool which will be requested."
default: "nightly"
debug_output_enabled:
type: boolean
description: "Boolean to enable debug output from xcodebuild by eliding -quiet. Defaults to false."
default: false
env_vars:
type: string
description: "Environment variables for jobs as JSON (e.g., '{\"DEBUG\":\"1\",\"LOG_LEVEL\":\"info\"}')."
default: "{}"
jobs:
construct-matrix:
name: Construct Darwin matrix
runs-on: ubuntu-latest
outputs:
darwin-matrix: '${{ steps.generate-matrix.outputs.darwin-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- id: generate-matrix
run: |
# Validate and use JSON environment variables directly
env_vars_json="$INPUT_ENV_VARS"
# Validate JSON format
if ! echo "$env_vars_json" | jq empty 2>/dev/null; then
echo "Error: env_vars is not valid JSON"
exit 1
fi
cat >> "$GITHUB_OUTPUT" << EOM
darwin-matrix=$(
runner_pool="${MATRIX_RUNNER_POOL:="nightly"}"
xcode_26_2_enabled="${MATRIX_MACOS_26_2_ENABLED:=true}"
xcode_26_2_build_arguments_override="${MATRIX_MACOS_26_2_BUILD_ARGUMENTS_OVERRIDE:=""}"
xcode_26_2_test_arguments_override="${MATRIX_MACOS_26_2_TEST_ARGUMENTS_OVERRIDE:=""}"
xcode_26_2_setup_command="${MATRIX_MACOS_26_2_SETUP_COMMAND:=""}"
xcode_latest_beta_enabled="${MATRIX_MACOS_LATEST_BETA_ENABLED:=true}"
xcode_latest_beta_build_arguments_override="${MATRIX_MACOS_LATEST_BETA_BUILD_ARGUMENTS_OVERRIDE:=""}"
xcode_latest_beta_test_arguments_override="${MATRIX_MACOS_LATEST_BETA_TEST_ARGUMENTS_OVERRIDE:=""}"
xcode_latest_beta_setup_command="${MATRIX_MACOS_LATEST_BETA_SETUP_COMMAND:=""}"
swift_6_1_enabled="${MATRIX_SWIFT_6_1_ENABLED:=true}"
swift_6_1_build_arguments_override="${MATRIX_SWIFT_6_1_BUILD_ARGUMENTS_OVERRIDE:=""}"
swift_6_1_test_arguments_override="${MATRIX_SWIFT_6_1_TEST_ARGUMENTS_OVERRIDE:=""}"
swift_6_1_setup_command="${MATRIX_SWIFT_6_1_SETUP_COMMAND:=""}"
swift_6_2_enabled="${MATRIX_SWIFT_6_2_ENABLED:=true}"
swift_6_2_build_arguments_override="${MATRIX_SWIFT_6_2_BUILD_ARGUMENTS_OVERRIDE:=""}"
swift_6_2_test_arguments_override="${MATRIX_SWIFT_6_2_TEST_ARGUMENTS_OVERRIDE:=""}"
swift_6_2_setup_command="${MATRIX_SWIFT_6_2_SETUP_COMMAND:=""}"
swift_6_3_enabled="${MATRIX_SWIFT_6_3_ENABLED:=true}"
swift_6_3_build_arguments_override="${MATRIX_SWIFT_6_3_BUILD_ARGUMENTS_OVERRIDE:=""}"
swift_6_3_test_arguments_override="${MATRIX_SWIFT_6_3_TEST_ARGUMENTS_OVERRIDE:=""}"
swift_6_3_setup_command="${MATRIX_SWIFT_6_3_SETUP_COMMAND:=""}"
# Create matrix from inputs
matrix='{"config": []}'
if [[ "$xcode_26_2_enabled" == "true" ]]; then
matrix=$(echo "$matrix" | jq -c \
--arg setup_command "$xcode_26_2_setup_command" \
--arg build_arguments_override "$xcode_26_2_build_arguments_override" \
--arg test_arguments_override "$xcode_26_2_test_arguments_override" \
--arg runner_pool "$runner_pool" \
--argjson env_vars "$env_vars_json" \
'.config[.config| length] |= . + { "name": "Xcode 26.2", "xcode_version": "26.2", "xcode_app": "Xcode_26.2.app", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "tahoe", "arch": "ARM64", "pool": $runner_pool, "env": $env_vars }')
fi
if [[ "$xcode_latest_beta_enabled" == "true" ]]; then
matrix=$(echo "$matrix" | jq -c \
--arg setup_command "$xcode_latest_beta_setup_command" \
--arg build_arguments_override "$xcode_latest_beta_build_arguments_override" \
--arg test_arguments_override "$xcode_latest_beta_test_arguments_override" \
--arg runner_pool "$runner_pool" \
--argjson env_vars "$env_vars_json" \
'.config[.config| length] |= . + { "name": "Xcode latest beta", "xcode_version": "latest beta", "xcode_app": "Xcode-latest.app", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "tahoe", "arch": "ARM64", "pool": $runner_pool, "env": $env_vars }')
fi
if [[ "$swift_6_1_enabled" == "true" ]]; then
matrix=$(echo "$matrix" | jq -c \
--arg setup_command "$swift_6_1_setup_command" \
--arg build_arguments_override "$swift_6_1_build_arguments_override" \
--arg test_arguments_override "$swift_6_1_test_arguments_override" \
--arg runner_pool "$runner_pool" \
--argjson env_vars "$env_vars_json" \
'.config[.config| length] |= . + { "name": "Swift 6.1", "xcode_version": "swift 6.1", "xcode_app": "Xcode_swift_6.1.app", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "tahoe", "arch": "ARM64", "pool": $runner_pool, "env": $env_vars }')
fi
if [[ "$swift_6_2_enabled" == "true" ]]; then
matrix=$(echo "$matrix" | jq -c \
--arg setup_command "$swift_6_2_setup_command" \
--arg build_arguments_override "$swift_6_2_build_arguments_override" \
--arg test_arguments_override "$swift_6_2_test_arguments_override" \
--arg runner_pool "$runner_pool" \
--argjson env_vars "$env_vars_json" \
'.config[.config| length] |= . + { "name": "Swift 6.2", "xcode_version": "swift 6.2", "xcode_app": "Xcode_swift_6.2.app", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "tahoe", "arch": "ARM64", "pool": $runner_pool, "env": $env_vars }')
fi
if [[ "$swift_6_3_enabled" == "true" ]]; then
matrix=$(echo "$matrix" | jq -c \
--arg setup_command "$swift_6_3_setup_command" \
--arg build_arguments_override "$swift_6_3_build_arguments_override" \
--arg test_arguments_override "$swift_6_3_test_arguments_override" \
--arg runner_pool "$runner_pool" \
--argjson env_vars "$env_vars_json" \
'.config[.config| length] |= . + { "name": "Swift 6.3", "xcode_version": "swift 6.3", "xcode_app": "Xcode_swift_6.3.app", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "tahoe", "arch": "ARM64", "pool": $runner_pool, "env": $env_vars }')
fi
echo "$matrix" | jq -c
)"
EOM
env:
INPUT_ENV_VARS: ${{ inputs.env_vars }}
MATRIX_RUNNER_POOL: ${{ inputs.runner_pool }}
MATRIX_MACOS_26_2_ENABLED: ${{ inputs.xcode_26_2_enabled }}
MATRIX_MACOS_26_2_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_26_2_build_arguments_override }}
MATRIX_MACOS_26_2_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_26_2_test_arguments_override }}
MATRIX_MACOS_26_2_SETUP_COMMAND: ${{ inputs.xcode_26_2_setup_command }}
MATRIX_MACOS_LATEST_BETA_ENABLED: ${{ inputs.xcode_latest_beta_enabled }}
MATRIX_MACOS_LATEST_BETA_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_latest_beta_build_arguments_override }}
MATRIX_MACOS_LATEST_BETA_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_latest_beta_test_arguments_override }}
MATRIX_MACOS_LATEST_BETA_SETUP_COMMAND: ${{ inputs.xcode_latest_beta_setup_command }}
MATRIX_SWIFT_6_1_ENABLED: ${{ inputs.swift_6_1_enabled }}
MATRIX_SWIFT_6_1_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.swift_6_1_build_arguments_override }}
MATRIX_SWIFT_6_1_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.swift_6_1_test_arguments_override }}
MATRIX_SWIFT_6_1_SETUP_COMMAND: ${{ inputs.swift_6_1_setup_command }}
MATRIX_SWIFT_6_2_ENABLED: ${{ inputs.swift_6_2_enabled }}
MATRIX_SWIFT_6_2_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.swift_6_2_build_arguments_override }}
MATRIX_SWIFT_6_2_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.swift_6_2_test_arguments_override }}
MATRIX_SWIFT_6_2_SETUP_COMMAND: ${{ inputs.swift_6_2_setup_command }}
MATRIX_SWIFT_6_3_ENABLED: ${{ inputs.swift_6_3_enabled }}
MATRIX_SWIFT_6_3_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.swift_6_3_build_arguments_override }}
MATRIX_SWIFT_6_3_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.swift_6_3_test_arguments_override }}
MATRIX_SWIFT_6_3_SETUP_COMMAND: ${{ inputs.swift_6_3_setup_command }}
darwin-job:
name: ${{ matrix.config.name }}
needs: construct-matrix
if: github.repository_owner == 'apple'
runs-on: [self-hosted, macos, "${{ matrix.config.os }}", "${{ matrix.config.arch }}", "${{ matrix.config.pool }}"]
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.construct-matrix.outputs.darwin-matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
submodules: true
- name: Export environment variables
if: ${{ matrix.config.env != '' && matrix.config.env != '{}'}}
run: |
echo "Exporting environment variables from matrix configuration..."
echo "$MATRIX_ENV_JSON" | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> $GITHUB_ENV
echo "$MATRIX_ENV_JSON" | jq -r 'to_entries[] | "exporting \(.key)=\(.value)"'
env:
MATRIX_ENV_JSON: ${{ toJSON(matrix.config.env) }}
- name: Emit diagnostics
run: |
swift --version
/usr/bin/xcodebuild -version
- name: Setup command
if: ${{ matrix.config.setup_command != '' }}
run: bash -c "$MATRIX_SETUP_COMMAND"
env:
MATRIX_SETUP_COMMAND: ${{ matrix.config.setup_command }}
- name: Swift build
run: |
if [ -n "$MATRIX_BUILD_ARGUMENTS_OVERRIDE" ]; then
swift build $MATRIX_BUILD_ARGUMENTS_OVERRIDE
else
swift build --build-tests
fi
env:
MATRIX_BUILD_ARGUMENTS_OVERRIDE: ${{ matrix.config.build_arguments_override }}
- name: Swift test
if: 'inputs.swift_test_enabled'
run: |
if [ -n "$MATRIX_TEST_ARGUMENTS_OVERRIDE" ]; then
swift test $MATRIX_TEST_ARGUMENTS_OVERRIDE
else
swift test
fi
env:
MATRIX_TEST_ARGUMENTS_OVERRIDE: ${{ matrix.config.test_arguments_override }}
# see `xcodebuild -list` for schemes, `simctl list` for destinations
- name: macOS build
if: '!cancelled() && inputs.macos_xcode_build_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "generic/platform=macos,variant=macos" build
- name: macOS test
if: '!cancelled() && inputs.macos_xcode_test_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "name=My Mac,variant=macos" test
- name: macOS Catalyst build
if: '!cancelled() && inputs.macos_xcode_build_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "generic/platform=macos,variant=Mac Catalyst" build
- name: macOS Catalyst test
if: '!cancelled() && inputs.macos_xcode_test_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "name=My Mac,variant=Mac Catalyst" test
- name: iOS build
if: '!cancelled() && inputs.ios_xcode_build_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "generic/platform=ios" build
- name: iOS test
if: '!cancelled() && inputs.ios_xcode_test_enabled'
run: |
/usr/bin/xcrun simctl shutdown all
/usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "name=iPhone Air" test
- name: watchOS build
if: '!cancelled() && inputs.watchos_xcode_build_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "generic/platform=watchos" build
- name: watchOS test
if: '!cancelled() && inputs.watchos_xcode_test_enabled'
run: |
/usr/bin/xcrun simctl shutdown all
/usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "name=Apple Watch Ultra 3 (49mm)" test
- name: tvOS build
if: '!cancelled() && inputs.tvos_xcode_build_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "generic/platform=tvos" build
- name: tvOS test
if: '!cancelled() && inputs.tvos_xcode_test_enabled'
run: |
/usr/bin/xcrun simctl shutdown all
/usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "name=Apple TV 4K (3rd generation)" test
- name: visionOS build # arm only
if: '!cancelled() && inputs.visionos_xcode_build_enabled'
run: /usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "generic/platform=visionos" build
- name: visionOS test # arm only
if: '!cancelled() && inputs.visionos_xcode_test_enabled'
run: |
/usr/bin/xcrun simctl shutdown all
/usr/bin/xcodebuild ${QUIET_ARG} -scheme ${BUILD_SCHEME} -destination "name=Apple Vision Pro" test
env:
XCODE_VERSION: ${{ matrix.config.xcode_version }}
DEVELOPER_DIR: "/Applications/${{ matrix.config.xcode_app }}"
BUILD_SCHEME: ${{ inputs.build_scheme }}
QUIET_ARG: ${{ inputs.debug_output_enabled && ' ' || '-quiet' }}