From 798531e667b611d05fe435aae151bc88d12e482a Mon Sep 17 00:00:00 2001 From: Dan Federman Date: Thu, 15 Jan 2026 23:01:08 -0800 Subject: [PATCH] Increase CI reliability by downloading iOS sim --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ Scripts/build.swift | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0750bef7..d8dd1f96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,24 @@ jobs: run: bundle install - name: Select Xcode Version run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer + - name: Download iOS + if: matrix.platforms == 'iOS_18' + run: | + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + sudo xcodebuild -downloadPlatform iOS -buildVersion 22E238 + - name: Download tvOS + if: matrix.platforms == 'tvOS_18' + run: | + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + sudo xcodebuild -downloadPlatform tvOS -buildVersion 22K154 + - name: Download watchOS + if: matrix.platforms == 'watchOS_11' + run: | + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + sudo xcodebuild -downloadPlatform watchOS -buildVersion 22S99 - name: Build and Test Framework run: Scripts/build.swift ${{ matrix.platforms }} xcode - name: Upload Coverage Reports @@ -94,6 +112,24 @@ jobs: run: bundle install - name: Select Xcode Version run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer + - name: Download iOS + if: matrix.platforms == 'iOS_18' + run: | + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + sudo xcodebuild -downloadPlatform iOS -buildVersion 22E238 + - name: Download tvOS + if: matrix.platforms == 'tvOS_18' + run: | + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + sudo xcodebuild -downloadPlatform tvOS -buildVersion 22K154 + - name: Download watchOS + if: matrix.platforms == 'watchOS_11' + run: | + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + sudo xcodebuild -downloadPlatform watchOS -buildVersion 22S99 - name: Build Framework run: Scripts/build.swift ${{ matrix.platforms }} spm readme-validation: diff --git a/Scripts/build.swift b/Scripts/build.swift index 4242d679..6a6894a4 100755 --- a/Scripts/build.swift +++ b/Scripts/build.swift @@ -29,7 +29,7 @@ enum Platform: String, CustomStringConvertible { var destination: String { switch self { case .iOS_18: - "platform=iOS Simulator,OS=18.4,name=iPad (10th generation)" + "platform=iOS Simulator,OS=18.4,name=iPhone 16" case .tvOS_18: "platform=tvOS Simulator,OS=18.2,name=Apple TV"