Skip to content

Commit e1d26ff

Browse files
Extract Swift versions into shared-pipeline-vars
1 parent 480e545 commit e1d26ff

File tree

2 files changed

+43
-20
lines changed

2 files changed

+43
-20
lines changed

.buildkite/pipeline.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ steps:
3333
matrix:
3434
setup: # Specify the current version of Xcode, Swift, a device, and the required version of iOS
3535
image_id: $CURRENT_IMAGE_ID
36-
swift_version: "5.10"
37-
device_model: "default"
38-
device_os: "default"
36+
swift_version: $CURRENT_SWIFT_VERSION
37+
device_model: $CURRENT_DEVICE
38+
device_os: $CURRENT_OS
3939
adjustments: # Specify additional versions of Xcode, Swift, a device, and the required version of iOS
40-
- with:
41-
image_id: "xcode-15.2-xl"
42-
swift_version: "5.9"
43-
device_model: "default"
44-
device_os: "17.2"
45-
- with:
46-
image_id: "xcode-16.0-v7"
47-
swift_version: "6.0"
48-
device_model: "default"
49-
device_os: "18.0"
40+
- with: # Swift 5.9
41+
image_id: $SWIFT_5_9_IMAGE_ID
42+
swift_version: $SWIFT_5_9_VERSION
43+
device_model: $SWIFT_5_9_DEVICE
44+
device_os: $SWIFT_5_9_OS
45+
- with: # Swift 6.0
46+
image_id: $SWIFT_6_0_IMAGE_ID
47+
swift_version: $SWIFT_6_0_VERSION
48+
device_model: $SWIFT_6_0_DEVICE
49+
device_os: $SWIFT_6_0_OS
5050

5151
###################
5252
# Validate Podspec
@@ -63,14 +63,14 @@ steps:
6363
matrix:
6464
setup: # Specify the current version of Xcode and Swift
6565
image_id: $CURRENT_IMAGE_ID
66-
swift_version: "5.10"
66+
swift_version: $CURRENT_SWIFT_VERSION
6767
adjustments: # Specify additional versions of Xcode and Swift
6868
- with:
69-
image_id: "xcode-15.2-xl"
70-
swift_version: "5.9"
69+
image_id: $SWIFT_5_9_IMAGE_ID
70+
swift_version: $SWIFT_5_9_VERSION
7171
- with:
72-
image_id: "xcode-16.0-v7"
73-
swift_version: "6.0"
72+
image_id: $SWIFT_6_0_IMAGE_ID
73+
swift_version: $SWIFT_6_0_VERSION
7474

7575
#######################
7676
# Publish the Podspecs (if we're building a tag)

.buildkite/shared-pipeline-vars

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@
33
# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
44
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.
55

6-
export CURRENT_IMAGE_ID="xcode-15.4"
7-
86
export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.2.2"
7+
8+
## Supported versions of Swift
9+
# Swift 6.0
10+
export SWIFT_6_0_IMAGE_ID="xcode-16.0-v7"
11+
export SWIFT_6_0_VERSION="6.0"
12+
export SWIFT_6_0_DEVICE="default" # Use the default value in Fastlane
13+
export SWIFT_6_0_OS="18.0"
14+
15+
# Swift 5.10
16+
export SWIFT_5_10_IMAGE_ID="xcode-15.4"
17+
export SWIFT_5_10_VERSION="5.10"
18+
export SWIFT_5_10_DEVICE="default"
19+
export SWIFT_5_10_OS="17.5"
20+
21+
# Swift 5.9
22+
export SWIFT_5_9_IMAGE_ID="xcode-15.2-xl"
23+
export SWIFT_5_9_VERSION="5.9"
24+
export SWIFT_5_9_DEVICE="default" # Use the default value in Fastlane
25+
export SWIFT_5_9_OS="17.2"
26+
27+
# Current Development Environment
28+
export CURRENT_IMAGE_ID=$SWIFT_5_10_IMAGE_ID
29+
export CURRENT_SWIFT_VERSION=$SWIFT_5_10_VERSION
30+
export CURRENT_DEVICE=$SWIFT_5_10_DEVICE
31+
export CURRENT_OS="default" # Use the default value in Fastlane

0 commit comments

Comments
 (0)