From 4482a62b37af138f8d72939a0e6b0ba42a7125bc Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Fri, 18 Oct 2024 13:21:10 -0500 Subject: [PATCH] Extract Swift versions into `shared-pipeline-vars` --- .buildkite/pipeline.yml | 36 ++++++++++++++++----------------- .buildkite/shared-pipeline-vars | 27 +++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 20 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 358b087a..07a49a13 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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 @@ -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) diff --git a/.buildkite/shared-pipeline-vars b/.buildkite/shared-pipeline-vars index 24eb8ae1..179656a5 100644 --- a/.buildkite/shared-pipeline-vars +++ b/.buildkite/shared-pipeline-vars @@ -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