Skip to content

Commit

Permalink
Extract Swift versions into shared-pipeline-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdmontgomery committed Oct 18, 2024
1 parent b00cc5d commit 4482a62
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 20 deletions.
36 changes: 18 additions & 18 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ steps:
matrix:
setup: # Specify the current version of Xcode, Swift, a device, and the required version of iOS
image_id: $CURRENT_IMAGE_ID
swift_version: "5.10"
device_model: "default"
device_os: "default"
swift_version: $CURRENT_SWIFT_VERSION
device_model: $CURRENT_DEVICE
device_os: $CURRENT_OS
adjustments: # Specify additional versions of Xcode, Swift, a device, and the required version of iOS
- with:
image_id: "xcode-15.2-xl"
swift_version: "5.9"
device_model: "default"
device_os: "17.2"
- with:
image_id: "xcode-16.0-v7"
swift_version: "6.0"
device_model: "default"
device_os: "18.0"
- with: # Swift 5.9
image_id: $SWIFT_5_9_IMAGE_ID
swift_version: $SWIFT_5_9_VERSION
device_model: $SWIFT_5_9_DEVICE
device_os: $SWIFT_5_9_OS
- with: # Swift 6.0
image_id: $SWIFT_6_0_IMAGE_ID
swift_version: $SWIFT_6_0_VERSION
device_model: $SWIFT_6_0_DEVICE
device_os: $SWIFT_6_0_OS

###################
# Validate Podspec
Expand All @@ -63,14 +63,14 @@ steps:
matrix:
setup: # Specify the current version of Xcode and Swift
image_id: $CURRENT_IMAGE_ID
swift_version: "5.10"
swift_version: $CURRENT_SWIFT_VERSION
adjustments: # Specify additional versions of Xcode and Swift
- with:
image_id: "xcode-15.2-xl"
swift_version: "5.9"
image_id: $SWIFT_5_9_IMAGE_ID
swift_version: $SWIFT_5_9_VERSION
- with:
image_id: "xcode-16.0-v7"
swift_version: "6.0"
image_id: $SWIFT_6_0_IMAGE_ID
swift_version: $SWIFT_6_0_VERSION

#######################
# Publish the Podspecs (if we're building a tag)
Expand Down
27 changes: 25 additions & 2 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.

export CURRENT_IMAGE_ID="xcode-15.4"

export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.2.2"

## Supported versions of Swift
# Swift 6.0
export SWIFT_6_0_IMAGE_ID="xcode-16.0-v7"
export SWIFT_6_0_VERSION="6.0"
export SWIFT_6_0_DEVICE="default" # Use the default value in Fastlane
export SWIFT_6_0_OS="18.0"

# Swift 5.10
export SWIFT_5_10_IMAGE_ID="xcode-15.4"
export SWIFT_5_10_VERSION="5.10"
export SWIFT_5_10_DEVICE="default"
export SWIFT_5_10_OS="17.5"

# Swift 5.9
export SWIFT_5_9_IMAGE_ID="xcode-15.2-xl"
export SWIFT_5_9_VERSION="5.9"
export SWIFT_5_9_DEVICE="default" # Use the default value in Fastlane
export SWIFT_5_9_OS="17.2"

# Current Development Environment
export CURRENT_IMAGE_ID=$SWIFT_5_10_IMAGE_ID
export CURRENT_SWIFT_VERSION=$SWIFT_5_10_VERSION
export CURRENT_DEVICE=$SWIFT_5_10_DEVICE
export CURRENT_OS="default" # Use the default value in Fastlane

0 comments on commit 4482a62

Please sign in to comment.