From ec040d941135234a8e67bd5e0582540ef25e1b30 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 12:46:08 -0500 Subject: [PATCH 01/37] Revert swift-tools-version support to 5.9 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 375317e6..85415080 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.10 +// swift-tools-version: 5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From 7c3bdac7c7dcbfd699ececd054227fbac8d94b95 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 12:46:48 -0500 Subject: [PATCH 02/37] Use a build matrix to validate on multiple versions of Xcode --- .buildkite/pipeline.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index dccdfdef..5c2a70db 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -26,6 +26,11 @@ steps: command: | validate_swift_package plugins: [$CI_TOOLKIT] + env: + IMAGE_ID: "{{matrix}}" + matrix: + - $IMAGE_ID + - "15.1" ################### # Validate Podspec From daefb4443619c96707d3d2bade321b8ef4d1f369 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 13:23:50 -0500 Subject: [PATCH 03/37] Specify the correct IMAGE_ID --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5c2a70db..f1249613 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -30,7 +30,7 @@ steps: IMAGE_ID: "{{matrix}}" matrix: - $IMAGE_ID - - "15.1" + - "xcode-15.1" ################### # Validate Podspec From c5f84a67a762e1808c3b10f9f86d70cfcf0e50ce Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 13:45:12 -0500 Subject: [PATCH 04/37] Try including a separate `Packages@swift-5.9.swift` --- Package.swift | 2 +- Package@swift-5.9.swift | 77 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 Package@swift-5.9.swift diff --git a/Package.swift b/Package.swift index 85415080..375317e6 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.9 +// swift-tools-version: 5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 00000000..85415080 --- /dev/null +++ b/Package@swift-5.9.swift @@ -0,0 +1,77 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Gravatar", + defaultLocalization: "en", + platforms: [ + // Platforms specifies os version minimums. It does not limit which platforms are supported. + .iOS(.v15), + .macOS(.v12) // The SDK does not support macOS, this satisfies SwiftLint requirements + ], + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "Gravatar", + targets: ["Gravatar"] + ), + .library( + name: "GravatarUI", + targets: ["GravatarUI"] + ), + ], + dependencies: [ + .package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.54.0"), + .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.8.1"), + .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", exact: "0.56.2"), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "Gravatar", + resources: [.process("Resources")], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ], + plugins: [.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")] + ), + .testTarget( + name: "GravatarTests", + dependencies: ["Gravatar", "TestHelpers"], + resources: [.process("Resources")], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ] + ), + .target( + name: "GravatarUI", + dependencies: ["Gravatar"], + resources: [.process("Resources")], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ], + plugins: [.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")] + ), + .testTarget( + name: "GravatarUITests", + dependencies: ["GravatarUI", "TestHelpers", + .product(name: "SnapshotTesting", package: "swift-snapshot-testing")], + resources: [.process("Resources"), + .process("__Snapshots__")], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ] + ), + .target( + name: "TestHelpers", + dependencies: ["Gravatar"], + resources: [.process("Resources")], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ] + ) + ] +) From 7d0a0e322ff9d0dada8a8e8911650e8717d629b9 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 13:47:16 -0500 Subject: [PATCH 05/37] Update "Build and Test" label to include matrix build name --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f1249613..2bd69940 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -21,7 +21,7 @@ steps: ################# # Build and Test ################# - - label: "📦 Build and Test Swift Package" + - label: "📦 Build and Test Swift Package ({{matrix}})" key: "test" command: | validate_swift_package From 4aeaf9324b0c23a751c08d4e8d6ffe697ed21b13 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 14:05:37 -0500 Subject: [PATCH 06/37] Revert "pins" version from 3 to 2 in Package.resolved --- Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.resolved b/Package.resolved index f1e5bd25..be720318 100644 --- a/Package.resolved +++ b/Package.resolved @@ -38,5 +38,5 @@ } } ], - "version" : 3 + "version" : 2 } From a2801087df3162e8dc0f6ec72bcfa15dbedc0b57 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 14:05:57 -0500 Subject: [PATCH 07/37] Revert "Try including a separate `Packages@swift-5.9.swift`" This reverts commit 7445b9bce9fc06889331118963d001090c302f05. --- Package.swift | 2 +- Package@swift-5.9.swift | 77 ----------------------------------------- 2 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 Package@swift-5.9.swift diff --git a/Package.swift b/Package.swift index 375317e6..85415080 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.10 +// swift-tools-version: 5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift deleted file mode 100644 index 85415080..00000000 --- a/Package@swift-5.9.swift +++ /dev/null @@ -1,77 +0,0 @@ -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "Gravatar", - defaultLocalization: "en", - platforms: [ - // Platforms specifies os version minimums. It does not limit which platforms are supported. - .iOS(.v15), - .macOS(.v12) // The SDK does not support macOS, this satisfies SwiftLint requirements - ], - products: [ - // Products define the executables and libraries a package produces, making them visible to other packages. - .library( - name: "Gravatar", - targets: ["Gravatar"] - ), - .library( - name: "GravatarUI", - targets: ["GravatarUI"] - ), - ], - dependencies: [ - .package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.54.0"), - .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.8.1"), - .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", exact: "0.56.2"), - ], - targets: [ - // Targets are the basic building blocks of a package, defining a module or a test suite. - // Targets can depend on other targets in this package and products from dependencies. - .target( - name: "Gravatar", - resources: [.process("Resources")], - swiftSettings: [ - .enableExperimentalFeature("StrictConcurrency") - ], - plugins: [.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")] - ), - .testTarget( - name: "GravatarTests", - dependencies: ["Gravatar", "TestHelpers"], - resources: [.process("Resources")], - swiftSettings: [ - .enableExperimentalFeature("StrictConcurrency") - ] - ), - .target( - name: "GravatarUI", - dependencies: ["Gravatar"], - resources: [.process("Resources")], - swiftSettings: [ - .enableExperimentalFeature("StrictConcurrency") - ], - plugins: [.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")] - ), - .testTarget( - name: "GravatarUITests", - dependencies: ["GravatarUI", "TestHelpers", - .product(name: "SnapshotTesting", package: "swift-snapshot-testing")], - resources: [.process("Resources"), - .process("__Snapshots__")], - swiftSettings: [ - .enableExperimentalFeature("StrictConcurrency") - ] - ), - .target( - name: "TestHelpers", - dependencies: ["Gravatar"], - resources: [.process("Resources")], - swiftSettings: [ - .enableExperimentalFeature("StrictConcurrency") - ] - ) - ] -) From 4260fb54f8508c7d0481104350b17b77f157fa8a Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 14:28:13 -0500 Subject: [PATCH 08/37] Refactor testing to support passing the device to the test --- .buildkite/pipeline.yml | 13 ++++++++++--- fastlane/Fastfile | 5 +++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 2bd69940..3610331f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -24,13 +24,20 @@ steps: - label: "📦 Build and Test Swift Package ({{matrix}})" key: "test" command: | - validate_swift_package + validate_swift_package device:"{{matrix.device}}" plugins: [$CI_TOOLKIT] env: IMAGE_ID: "{{matrix}}" matrix: - - $IMAGE_ID - - "xcode-15.1" + setup: + image: + - $IMAGE_ID + device: + - "iPhone SE (3rd generation) (17.5)" + adjustments: + - with: + image: "xcode-15.1" + device: "iPhone SE (3rd generation) (17.2)" ################### # Validate Podspec diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 94459d49..68afab68 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -50,12 +50,13 @@ end platform :ios do desc 'Builds the project and runs tests' - lane :test do + lane :test do |options| + iphone_device = options[:device] ? options[:device].freeze : IPHONE_DEVICE run_tests( package_path: '.', scheme: 'Gravatar-Package', xcargs: COMMON_XCARGS, - device: IPHONE_DEVICE, + device: iphone_device, prelaunch_simulator: true, clean: true, buildlog_path: LOGS_FOLDER, From 6d0dbe67c1c9f0bd5bcc65710b185ac4aedb99bc Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 14:31:38 -0500 Subject: [PATCH 09/37] Fix matrix setup, references --- .buildkite/pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 3610331f..08d308ea 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -21,23 +21,23 @@ steps: ################# # Build and Test ################# - - label: "📦 Build and Test Swift Package ({{matrix}})" + - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" key: "test" command: | validate_swift_package device:"{{matrix.device}}" plugins: [$CI_TOOLKIT] env: - IMAGE_ID: "{{matrix}}" + IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image: + image_id: - $IMAGE_ID device: - "iPhone SE (3rd generation) (17.5)" adjustments: - with: - image: "xcode-15.1" - device: "iPhone SE (3rd generation) (17.2)" + image_id: "xcode-15.1" + device: "iPhone SE (3rd generation) (17.2)" ################### # Validate Podspec From 495b8c1fdf083d147356b97bf9752b1f7619a674 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 17:41:04 -0500 Subject: [PATCH 10/37] Use env variables instead of passing parameters --- .buildkite/pipeline.yml | 3 ++- fastlane/Fastfile | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 08d308ea..22f9e3b5 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -24,10 +24,11 @@ steps: - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" key: "test" command: | - validate_swift_package device:"{{matrix.device}}" + validate_swift_package plugins: [$CI_TOOLKIT] env: IMAGE_ID: "{{matrix.image_id}}" + BUILDKITE_DEVICE: "{{matrix.device}}" matrix: setup: image_id: diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 68afab68..96144a89 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -50,8 +50,8 @@ end platform :ios do desc 'Builds the project and runs tests' - lane :test do |options| - iphone_device = options[:device] ? options[:device].freeze : IPHONE_DEVICE + lane :test do + iphone_device = ENV['BUILDKITE_DEVICE'] ? ENV['BUILDKITE_DEVICE'].freeze : IPHONE_DEVICE run_tests( package_path: '.', scheme: 'Gravatar-Package', From 7877527328f1dbaa29457f7bef547d5e6a3c207a Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 17:54:23 -0500 Subject: [PATCH 11/37] Attempt fix for Swift 5.9 build error /opt/ci/builds/builder/automattic/gravatar-sdk-ios/Sources/GravatarUI/Base/AssociatedObject.swift:5:47: variable '' captured by a closure before being initialized --- Sources/GravatarUI/Base/AssociatedObject.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/GravatarUI/Base/AssociatedObject.swift b/Sources/GravatarUI/Base/AssociatedObject.swift index 308e6cf2..e2af192a 100644 --- a/Sources/GravatarUI/Base/AssociatedObject.swift +++ b/Sources/GravatarUI/Base/AssociatedObject.swift @@ -2,9 +2,11 @@ import Foundation func getAssociatedObject(_ object: Any, _ key: UnsafeRawPointer) -> T? { if #available(iOS 14, *) { // swift 5.3 fixed this issue (https://github.com/apple/swift/issues/46456) - objc_getAssociatedObject(object, key) as? T + // swiftformat:disable:next --redundantReturn + return objc_getAssociatedObject(object, key) as? T } else { - objc_getAssociatedObject(object, key) as AnyObject as? T + // swiftformat:disable:next --redundantReturn + return objc_getAssociatedObject(object, key) as AnyObject as? T } } From 0f95d013445e973f09b0998634c7100efbea0ff0 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 17:55:55 -0500 Subject: [PATCH 12/37] Add support for validating podspecs for Swift 5.9 and Swift 5.10 --- .buildkite/pipeline.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 22f9e3b5..8c306d9b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -48,6 +48,19 @@ steps: command: | .buildkite/commands/validate-pods.sh plugins: [$CI_TOOLKIT] + env: + IMAGE_ID: "{{matrix.image_id}}" + BUILDKITE_DEVICE: "{{matrix.device}}" + matrix: + setup: + image_id: + - $IMAGE_ID + device: + - "iPhone SE (3rd generation) (17.5)" + adjustments: + - with: + image_id: "xcode-15.1" + device: "iPhone SE (3rd generation) (17.2)" ####################### # Publish the Podspecs (if we're building a tag) From 05025f3b4c7a590f974646988895d145bc9bf3e9 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Wed, 16 Oct 2024 22:32:19 -0500 Subject: [PATCH 13/37] Group matrix builds --- .buildkite/pipeline.yml | 76 ++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 8c306d9b..b8847efd 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -21,46 +21,50 @@ steps: ################# # Build and Test ################# - - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" - key: "test" - command: | - validate_swift_package - plugins: [$CI_TOOLKIT] - env: - IMAGE_ID: "{{matrix.image_id}}" - BUILDKITE_DEVICE: "{{matrix.device}}" - matrix: - setup: - image_id: - - $IMAGE_ID - device: - - "iPhone SE (3rd generation) (17.5)" - adjustments: - - with: - image_id: "xcode-15.1" - device: "iPhone SE (3rd generation) (17.2)" + - group: "📦 Build and Test Swift Package" + steps: + - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" + key: "test" + command: | + validate_swift_package + plugins: [$CI_TOOLKIT] + env: + IMAGE_ID: "{{matrix.image_id}}" + BUILDKITE_DEVICE: "{{matrix.device}}" + matrix: + setup: + image_id: + - $IMAGE_ID + device: + - "iPhone SE (3rd generation) (17.5)" + adjustments: + - with: + image_id: "xcode-15.1" + device: "iPhone SE (3rd generation) (17.2)" ################### # Validate Podspec ################### - - label: "🔬 Validate Podspecs" - key: "validate" - command: | - .buildkite/commands/validate-pods.sh - plugins: [$CI_TOOLKIT] - env: - IMAGE_ID: "{{matrix.image_id}}" - BUILDKITE_DEVICE: "{{matrix.device}}" - matrix: - setup: - image_id: - - $IMAGE_ID - device: - - "iPhone SE (3rd generation) (17.5)" - adjustments: - - with: - image_id: "xcode-15.1" - device: "iPhone SE (3rd generation) (17.2)" + - group: "🔬 Validate Podspecs" + steps: + - label: "🔬 Validate Podspecs ({{matrix.image_id}})" + key: "validate" + command: | + .buildkite/commands/validate-pods.sh + plugins: [$CI_TOOLKIT] + env: + IMAGE_ID: "{{matrix.image_id}}" + BUILDKITE_DEVICE: "{{matrix.device}}" + matrix: + setup: + image_id: + - $IMAGE_ID + device: + - "iPhone SE (3rd generation) (17.5)" + adjustments: + - with: + image_id: "xcode-15.1" + device: "iPhone SE (3rd generation) (17.2)" ####################### # Publish the Podspecs (if we're building a tag) From c51d45aa60042f680791e57f2a08d5070faeaa84 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:20:46 -0500 Subject: [PATCH 14/37] Pass the device as an argument instead of using ENV Remove unused ENV --- .buildkite/pipeline.yml | 4 +--- fastlane/Fastfile | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b8847efd..6f7b1c0d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -26,11 +26,10 @@ steps: - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" key: "test" command: | - validate_swift_package + validate_swift_package test device:"{{matrix.device}}" plugins: [$CI_TOOLKIT] env: IMAGE_ID: "{{matrix.image_id}}" - BUILDKITE_DEVICE: "{{matrix.device}}" matrix: setup: image_id: @@ -54,7 +53,6 @@ steps: plugins: [$CI_TOOLKIT] env: IMAGE_ID: "{{matrix.image_id}}" - BUILDKITE_DEVICE: "{{matrix.device}}" matrix: setup: image_id: diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 96144a89..be5d0c02 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -50,13 +50,12 @@ end platform :ios do desc 'Builds the project and runs tests' - lane :test do - iphone_device = ENV['BUILDKITE_DEVICE'] ? ENV['BUILDKITE_DEVICE'].freeze : IPHONE_DEVICE + lane :test do |device: IPHONE_DEVICE| run_tests( package_path: '.', scheme: 'Gravatar-Package', xcargs: COMMON_XCARGS, - device: iphone_device, + device: device, prelaunch_simulator: true, clean: true, buildlog_path: LOGS_FOLDER, From 9132be56dc6cec799a5886ea769eb6491109efa5 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:31:41 -0500 Subject: [PATCH 15/37] TRY: remove `matrix.setup` and specify all configs with `matrix.adjustments` --- .buildkite/pipeline.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6f7b1c0d..5bed71e1 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,12 +31,10 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: - image_id: - - $IMAGE_ID - device: - - "iPhone SE (3rd generation) (17.5)" adjustments: + - with: + image_id: $IMAGE_ID + device: "iPhone SE (3rd generation) (17.5)" - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" @@ -54,12 +52,10 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: - image_id: - - $IMAGE_ID - device: - - "iPhone SE (3rd generation) (17.5)" adjustments: + - with: + image_id: $IMAGE_ID + device: "iPhone SE (3rd generation) (17.5)" - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" From 5f8e661e4f9a0da3919020d7cc03f606da70c594 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:33:47 -0500 Subject: [PATCH 16/37] TRY: adding `matrix.setup` with empty values --- .buildkite/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5bed71e1..45194725 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,6 +31,9 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: + setup: + image_id: + device: adjustments: - with: image_id: $IMAGE_ID @@ -52,6 +55,9 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: + setup: + image_id: + device: adjustments: - with: image_id: $IMAGE_ID From a4acef4d2fb47adfa38d09cfdc5725fd8197e75e Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:37:20 -0500 Subject: [PATCH 17/37] TRY: setting null values in `matrix.setup` --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 45194725..d974928d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,8 +32,8 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image_id: - device: + image_id: null + device: null adjustments: - with: image_id: $IMAGE_ID From e34d6e0f475cad1bc9a353f96eb65a660d34e916 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:39:54 -0500 Subject: [PATCH 18/37] TRY: setting values to empty strings --- .buildkite/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d974928d..02fea742 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,8 +32,8 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image_id: null - device: null + image_id: "" + device: "" adjustments: - with: image_id: $IMAGE_ID @@ -56,8 +56,8 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image_id: - device: + image_id: "" + device: "" adjustments: - with: image_id: $IMAGE_ID From b2c7460bd41f3659e3808e1fc7b838b03c1a5154 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:42:18 -0500 Subject: [PATCH 19/37] Revert "TRY: setting values to empty strings" This reverts commit 890bf1a96f9afc5a20df85b7b2978113deb0378d. --- .buildkite/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 02fea742..d974928d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,8 +32,8 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image_id: "" - device: "" + image_id: null + device: null adjustments: - with: image_id: $IMAGE_ID @@ -56,8 +56,8 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image_id: "" - device: "" + image_id: + device: adjustments: - with: image_id: $IMAGE_ID From a90ec7738b86f45c76e60a0ee345cb21f98e3a9b Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:42:22 -0500 Subject: [PATCH 20/37] Revert "TRY: setting null values in `matrix.setup`" This reverts commit b8988a4215fa8f18991b671a3d47b996739c238d. --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d974928d..45194725 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,8 +32,8 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: - image_id: null - device: null + image_id: + device: adjustments: - with: image_id: $IMAGE_ID From c7d7437efedb96855fd76579083d1e802efd0111 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:42:27 -0500 Subject: [PATCH 21/37] Revert "TRY: adding `matrix.setup` with empty values" This reverts commit ea81781ebdbe44c7eea3f347483cde40cb600982. --- .buildkite/pipeline.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 45194725..5bed71e1 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,9 +31,6 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: - image_id: - device: adjustments: - with: image_id: $IMAGE_ID @@ -55,9 +52,6 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: - image_id: - device: adjustments: - with: image_id: $IMAGE_ID From fdd0a525dc14f8340f4ee6306d45b35e5bfdaebf Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:42:31 -0500 Subject: [PATCH 22/37] Revert "TRY: remove `matrix.setup` and specify all configs with `matrix.adjustments`" This reverts commit 51b530e5ae3663ecaa381cd04585cc7b7bef2b3e. --- .buildkite/pipeline.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5bed71e1..6f7b1c0d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,10 +31,12 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: + setup: + image_id: + - $IMAGE_ID + device: + - "iPhone SE (3rd generation) (17.5)" adjustments: - - with: - image_id: $IMAGE_ID - device: "iPhone SE (3rd generation) (17.5)" - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" @@ -52,10 +54,12 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: + setup: + image_id: + - $IMAGE_ID + device: + - "iPhone SE (3rd generation) (17.5)" adjustments: - - with: - image_id: $IMAGE_ID - device: "iPhone SE (3rd generation) (17.5)" - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" From c094892ad4532bcf5e8e239e3490846881247ed5 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:46:17 -0500 Subject: [PATCH 23/37] Clean up the `matrix.setup` instances, include clarifying comments --- .buildkite/pipeline.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6f7b1c0d..ee4cd5a7 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,12 +31,10 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: - image_id: - - $IMAGE_ID - device: - - "iPhone SE (3rd generation) (17.5)" - adjustments: + setup: # Specify the current version of Xcode and device + image_id: $IMAGE_ID + device: "iPhone SE (3rd generation) (17.5)" + adjustments: # Specify additional versions of Xcode and devices - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" @@ -54,12 +52,10 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: - image_id: - - $IMAGE_ID - device: - - "iPhone SE (3rd generation) (17.5)" - adjustments: + setup: # Specify the current version of Xcode and device + image_id: $IMAGE_ID + device: "iPhone SE (3rd generation) (17.5)" + adjustments: # Specify additional versions of Xcode and devices - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" From 5c7946ccae3657620afdbb2f26f9040df2f91eeb Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:52:06 -0500 Subject: [PATCH 24/37] TRY: setting a blank `matrix.setup` set to null --- .buildkite/pipeline.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ee4cd5a7..d294cdf6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,10 +31,11 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: # Specify the current version of Xcode and device - image_id: $IMAGE_ID - device: "iPhone SE (3rd generation) (17.5)" + setup: ~ adjustments: # Specify additional versions of Xcode and devices + - with: + image_id: $IMAGE_ID + device: "iPhone SE (3rd generation) (17.5)" - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" From d6eba0c4bfe4834e869f8ab3e136f079f7a35997 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:54:30 -0500 Subject: [PATCH 25/37] TRY: setting a blank `matrix.setup` by setting to `{}` --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d294cdf6..aecaa0da 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,7 +31,7 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: ~ + setup: {} adjustments: # Specify additional versions of Xcode and devices - with: image_id: $IMAGE_ID From 612b2817dc0d8710d20f89cfc3f5c66aef270a2a Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:55:40 -0500 Subject: [PATCH 26/37] Revert "TRY: setting a blank `matrix.setup` by setting to `{}`" This reverts commit ed5cb87569f717bdd2865319f43beb25ebc5f83f. --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index aecaa0da..d294cdf6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,7 +31,7 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: {} + setup: ~ adjustments: # Specify additional versions of Xcode and devices - with: image_id: $IMAGE_ID From 6b75175963cfe40333c92dec43a62c5e89ebaeee Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 12:55:44 -0500 Subject: [PATCH 27/37] Revert "TRY: setting a blank `matrix.setup` set to null" This reverts commit ef296d93bbd2401d4686bd4c962be97a5c94afc6. --- .buildkite/pipeline.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d294cdf6..ee4cd5a7 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,11 +31,10 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: ~ + setup: # Specify the current version of Xcode and device + image_id: $IMAGE_ID + device: "iPhone SE (3rd generation) (17.5)" adjustments: # Specify additional versions of Xcode and devices - - with: - image_id: $IMAGE_ID - device: "iPhone SE (3rd generation) (17.5)" - with: image_id: "xcode-15.1" device: "iPhone SE (3rd generation) (17.2)" From f14bc5bb9d648f763c59b66a11561c5e49322623 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 13:09:03 -0500 Subject: [PATCH 28/37] Refactor fastlane `test` to use defaults where possible --- .buildkite/pipeline.yml | 8 +++++--- fastlane/Fastfile | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ee4cd5a7..ee01a0ee 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -26,18 +26,20 @@ steps: - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" key: "test" command: | - validate_swift_package test device:"{{matrix.device}}" + validate_swift_package test device_name:"{{matrix.device_name}}" os:"{{matrix.device_os}}" plugins: [$CI_TOOLKIT] env: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: # Specify the current version of Xcode and device image_id: $IMAGE_ID - device: "iPhone SE (3rd generation) (17.5)" + device_name: "default" + device_os: "default" adjustments: # Specify additional versions of Xcode and devices - with: image_id: "xcode-15.1" - device: "iPhone SE (3rd generation) (17.2)" + device_name: "default" + device_os: "17.2" ################### # Validate Podspec diff --git a/fastlane/Fastfile b/fastlane/Fastfile index be5d0c02..2f66d58d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -50,12 +50,14 @@ end platform :ios do desc 'Builds the project and runs tests' - lane :test do |device: IPHONE_DEVICE| + lane :test do |device_name: "default", os: "default"| + device_name = IPHONE_DEVICE if device_name == "default" + os = OS if os == "default" run_tests( package_path: '.', scheme: 'Gravatar-Package', xcargs: COMMON_XCARGS, - device: device, + device: "#{device_name} (#{os})", prelaunch_simulator: true, clean: true, buildlog_path: LOGS_FOLDER, From 070180db0c44ff4f33629b5c95ad9e04c312890b Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 13:09:29 -0500 Subject: [PATCH 29/37] Remove unused properties in matrix for pod validation --- .buildkite/pipeline.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ee01a0ee..ee9c3a04 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -56,11 +56,9 @@ steps: matrix: setup: # Specify the current version of Xcode and device image_id: $IMAGE_ID - device: "iPhone SE (3rd generation) (17.5)" adjustments: # Specify additional versions of Xcode and devices - with: image_id: "xcode-15.1" - device: "iPhone SE (3rd generation) (17.2)" ####################### # Publish the Podspecs (if we're building a tag) From fb4efe82256d051762d8ecddef1c4134ca9ae097 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 13:21:45 -0500 Subject: [PATCH 30/37] Fix logic for generating the `device` string --- .buildkite/pipeline.yml | 6 +++--- fastlane/Fastfile | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ee9c3a04..8cdb9374 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -26,19 +26,19 @@ steps: - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" key: "test" command: | - validate_swift_package test device_name:"{{matrix.device_name}}" os:"{{matrix.device_os}}" + validate_swift_package test device_model:"{{matrix.device_model}}" os:"{{matrix.device_os}}" plugins: [$CI_TOOLKIT] env: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: # Specify the current version of Xcode and device image_id: $IMAGE_ID - device_name: "default" + device_model: "default" device_os: "default" adjustments: # Specify additional versions of Xcode and devices - with: image_id: "xcode-15.1" - device_name: "default" + device_model: "default" device_os: "17.2" ################### diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2f66d58d..f6ba2938 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -3,7 +3,8 @@ default_platform(:ios) OS = '17.5' -IPHONE_DEVICE = "iPhone SE (3rd generation) (#{OS})".freeze +IPHONE_MODEL = 'iPhone SE (3rd generation)' +IPHONE_DEVICE = "#{IPHONE_MODEL} (#{OS})".freeze PROJECT_ROOT_FOLDER = File.join(File.dirname(File.expand_path(__dir__)), 'Demo') BUILD_FOLDER = File.join(__dir__, '.build') @@ -50,14 +51,15 @@ end platform :ios do desc 'Builds the project and runs tests' - lane :test do |device_name: "default", os: "default"| - device_name = IPHONE_DEVICE if device_name == "default" + lane :test do |device_model: "default", os: "default"| + device_model = IPHONE_MODEL if device_model == "default" os = OS if os == "default" + run_tests( package_path: '.', scheme: 'Gravatar-Package', xcargs: COMMON_XCARGS, - device: "#{device_name} (#{os})", + device: "#{device_model} (#{os})", prelaunch_simulator: true, clean: true, buildlog_path: LOGS_FOLDER, From 98b21fa17632d7f3fd8b5879b0e989446cd2061f Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 17:04:22 -0500 Subject: [PATCH 31/37] Add support for testing Xcode 16.0 --- .buildkite/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 8cdb9374..11d7da46 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -40,6 +40,10 @@ steps: image_id: "xcode-15.1" device_model: "default" device_os: "17.2" + - with: + image_id: "xcode-16.0" + device_model: "default" + device_os: "18.0" ################### # Validate Podspec @@ -59,6 +63,8 @@ steps: adjustments: # Specify additional versions of Xcode and devices - with: image_id: "xcode-15.1" + - with: + image_id: "xcode-16.0" ####################### # Publish the Podspecs (if we're building a tag) From 541a4c40ed82c82b87c7cb5eea3b4b1c21b618a7 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Thu, 17 Oct 2024 17:06:33 -0500 Subject: [PATCH 32/37] Fix Xcode 16 string --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 11d7da46..f0e7eb30 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -41,7 +41,7 @@ steps: device_model: "default" device_os: "17.2" - with: - image_id: "xcode-16.0" + image_id: "xcode-16.0-v7" device_model: "default" device_os: "18.0" @@ -64,7 +64,7 @@ steps: - with: image_id: "xcode-15.1" - with: - image_id: "xcode-16.0" + image_id: "xcode-16.0-v7" ####################### # Publish the Podspecs (if we're building a tag) From 3388ffe58d984c6b9385d4b8cb39557003d4069a Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Fri, 18 Oct 2024 12:51:07 -0500 Subject: [PATCH 33/37] Use Xcode 15.2 instead of 15.1 for the Swift 5.9 checks --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f0e7eb30..3bb58570 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -37,7 +37,7 @@ steps: device_os: "default" adjustments: # Specify additional versions of Xcode and devices - with: - image_id: "xcode-15.1" + image_id: "xcode-15.2-xl" device_model: "default" device_os: "17.2" - with: @@ -62,7 +62,7 @@ steps: image_id: $IMAGE_ID adjustments: # Specify additional versions of Xcode and devices - with: - image_id: "xcode-15.1" + image_id: "xcode-15.2-xl" - with: image_id: "xcode-16.0-v7" From 15fbebf9c2580699f9a22a3d7b86d70ac4daffb3 Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Fri, 18 Oct 2024 13:00:05 -0500 Subject: [PATCH 34/37] Add swift version to matrix builds, use in label --- .buildkite/pipeline.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 3bb58570..6eed8bf8 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -23,7 +23,7 @@ steps: ################# - group: "📦 Build and Test Swift Package" steps: - - label: "📦 Build and Test Swift Package ({{matrix.image_id}})" + - label: "📦 Build and Test Swift Package (Swift {{matrix.swift_version}})" key: "test" command: | validate_swift_package test device_model:"{{matrix.device_model}}" os:"{{matrix.device_os}}" @@ -31,17 +31,20 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: # Specify the current version of Xcode and device + setup: # Specify the current version of Xcode, Swift, a device, and the required version of iOS image_id: $IMAGE_ID + swift_version: "5.10" device_model: "default" device_os: "default" - adjustments: # Specify additional versions of Xcode and devices + 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" @@ -50,7 +53,7 @@ steps: ################### - group: "🔬 Validate Podspecs" steps: - - label: "🔬 Validate Podspecs ({{matrix.image_id}})" + - label: "🔬 Validate Podspecs (Swift {{matrix.swift_version}})" key: "validate" command: | .buildkite/commands/validate-pods.sh @@ -58,13 +61,16 @@ steps: env: IMAGE_ID: "{{matrix.image_id}}" matrix: - setup: # Specify the current version of Xcode and device + setup: # Specify the current version of Xcode and Swift image_id: $IMAGE_ID - adjustments: # Specify additional versions of Xcode and devices + swift_version: "5.10" + adjustments: # Specify additional versions of Xcode and Swift - with: image_id: "xcode-15.2-xl" + swift_version: "5.9" - with: image_id: "xcode-16.0-v7" + swift_version: "6.0" ####################### # Publish the Podspecs (if we're building a tag) From b00cc5d8b5075a48fb7403fc4ebaad0b3d1e0f1c Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Fri, 18 Oct 2024 13:05:38 -0500 Subject: [PATCH 35/37] Move source of truth for Xcode version to `shared-pipeline-vars` --- .buildkite/pipeline.yml | 6 +++--- .buildkite/shared-pipeline-vars | 2 +- .xcode-version | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 .xcode-version diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6eed8bf8..358b087a 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -6,7 +6,7 @@ agents: queue: "mac" env: - IMAGE_ID: $IMAGE_ID + IMAGE_ID: $CURRENT_IMAGE_ID steps: ################# @@ -32,7 +32,7 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: # Specify the current version of Xcode, Swift, a device, and the required version of iOS - image_id: $IMAGE_ID + image_id: $CURRENT_IMAGE_ID swift_version: "5.10" device_model: "default" device_os: "default" @@ -62,7 +62,7 @@ steps: IMAGE_ID: "{{matrix.image_id}}" matrix: setup: # Specify the current version of Xcode and Swift - image_id: $IMAGE_ID + image_id: $CURRENT_IMAGE_ID swift_version: "5.10" adjustments: # Specify additional versions of Xcode and Swift - with: diff --git a/.buildkite/shared-pipeline-vars b/.buildkite/shared-pipeline-vars index c388d1a1..24eb8ae1 100644 --- a/.buildkite/shared-pipeline-vars +++ b/.buildkite/shared-pipeline-vars @@ -3,6 +3,6 @@ # 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 IMAGE_ID=$(echo "xcode-$(cat .xcode-version)") +export CURRENT_IMAGE_ID="xcode-15.4" export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.2.2" diff --git a/.xcode-version b/.xcode-version deleted file mode 100644 index 232a7fc1..00000000 --- a/.xcode-version +++ /dev/null @@ -1 +0,0 @@ -15.4 From 4482a62b37af138f8d72939a0e6b0ba42a7125bc Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Fri, 18 Oct 2024 13:21:10 -0500 Subject: [PATCH 36/37] 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 From abb0aec21aaabde9d184144acde2144238cb5edd Mon Sep 17 00:00:00 2001 From: Andrew Montgomery Date: Fri, 18 Oct 2024 13:49:53 -0500 Subject: [PATCH 37/37] Use '_' instead of '.' for strings that appear in step labels --- .buildkite/shared-pipeline-vars | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/shared-pipeline-vars b/.buildkite/shared-pipeline-vars index 179656a5..da2f5415 100644 --- a/.buildkite/shared-pipeline-vars +++ b/.buildkite/shared-pipeline-vars @@ -8,19 +8,19 @@ 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_VERSION="6_0" # Use `_` instead of `.` since these are used in labels 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_VERSION="5_10" # Use `_` instead of `.` since these are used in labels 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_VERSION="5_9" # Use `_` instead of `.` since these are used in labels export SWIFT_5_9_DEVICE="default" # Use the default value in Fastlane export SWIFT_5_9_OS="17.2"