Skip to content

Commit d24d9ab

Browse files
authored
Add Xcode 26 beta 1 to macOS CI (#3267)
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
1 parent 37094b1 commit d24d9ab

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

.github/workflows/macos_tests.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ on:
2929
default: ""
3030
xcode_16_1_enabled:
3131
type: boolean
32-
description: "Boolean to enable the Xcode version 16.1 jobs. Defaults to true."
33-
default: true
32+
description: "Boolean to enable the Xcode version 16.1 jobs. Defaults to false."
33+
default: false
3434
xcode_16_1_build_arguments_override:
3535
type: string
3636
description: "The arguments passed to swift build in the Xcode version 16.1 job."
@@ -75,6 +75,22 @@ on:
7575
type: string
7676
description: "The command(s) to be executed before all other work."
7777
default: ""
78+
xcode_26_beta_enabled:
79+
type: boolean
80+
description: "Boolean to enable the Xcode version 26 beta 1 jobs. Defaults to true."
81+
default: true
82+
xcode_26_beta_1_build_arguments_override:
83+
type: string
84+
description: "The arguments passed to swift build in the Xcode version 26 beta 1 job."
85+
default: ""
86+
xcode_26_beta_1_test_arguments_override:
87+
type: string
88+
description: "The arguments passed to swift test in the Xcode version 26 beta 1 job."
89+
default: ""
90+
xcode_26_beta_1_setup_command:
91+
type: string
92+
description: "The command(s) to be executed before all other work."
93+
default: ""
7894

7995
build_scheme:
8096
type: string
@@ -165,6 +181,10 @@ jobs:
165181
xcode_16_3_build_arguments_override="${MATRIX_MACOS_16_3_BUILD_ARGUMENTS_OVERRIDE:=""}"
166182
xcode_16_3_test_arguments_override="${MATRIX_MACOS_16_3_TEST_ARGUMENTS_OVERRIDE:=""}"
167183
xcode_16_3_setup_command="${MATRIX_MACOS_16_3_SETUP_COMMAND:=""}"
184+
xcode_26_beta_1_enabled="${MATRIX_MACOS_26_BETA_1_ENABLED:=true}"
185+
xcode_26_beta_1_build_arguments_override="${MATRIX_MACOS_26_BETA_1_BUILD_ARGUMENTS_OVERRIDE:=""}"
186+
xcode_26_beta_1_test_arguments_override="${MATRIX_MACOS_26_BETA_1_TEST_ARGUMENTS_OVERRIDE:=""}"
187+
xcode_26_beta_1_setup_command="${MATRIX_MACOS_26_BETA_1_SETUP_COMMAND:=""}"
168188
169189
# Create matrix from inputs
170190
matrix='{"config": []}'
@@ -214,6 +234,15 @@ jobs:
214234
'.config[.config| length] |= . + { "name": "Xcode 16.3", "xcode_version": "16.3", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "sequoia", "arch": "ARM64", "pool": $runner_pool }')
215235
fi
216236
237+
if [[ "$xcode_26_beta_1_enabled" == "true" ]]; then
238+
matrix=$(echo "$matrix" | jq -c \
239+
--arg setup_command "$xcode_26_beta_1_setup_command" \
240+
--arg build_arguments_override "$xcode_26_beta_1_build_arguments_override" \
241+
--arg test_arguments_override "$xcode_26_beta_1_test_arguments_override" \
242+
--arg runner_pool "$runner_pool" \
243+
'.config[.config| length] |= . + { "name": "Xcode 26 beta 1", "xcode_version": "26.b1", "setup_command": $setup_command, "build_arguments_override": $build_arguments_override, "test_arguments_override": $test_arguments_override, "os": "sequoia", "arch": "ARM64", "pool": $runner_pool }')
244+
fi
245+
217246
echo "$matrix" | jq -c
218247
)"
219248
EOM
@@ -239,6 +268,10 @@ jobs:
239268
MATRIX_MACOS_16_3_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_16_3_build_arguments_override }}
240269
MATRIX_MACOS_16_3_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_16_3_test_arguments_override }}
241270
MATRIX_MACOS_16_3_SETUP_COMMAND: ${{ inputs.xcode_16_3_setup_command }}
271+
MATRIX_MACOS_26_BETA_1_ENABLED: ${{ inputs.xcode_26_beta_1_enabled }}
272+
MATRIX_MACOS_26_BETA_1_BUILD_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_26_beta_1_build_arguments_override }}
273+
MATRIX_MACOS_26_BETA_1_TEST_ARGUMENTS_OVERRIDE: ${{ inputs.xcode_26_beta_1_test_arguments_override }}
274+
MATRIX_MACOS_26_BETA_1_SETUP_COMMAND: ${{ inputs.xcode_26_beta_1_setup_command }}
242275

243276
darwin-job:
244277
name: ${{ matrix.config.name }}

0 commit comments

Comments
 (0)