Skip to content

Commit 922d317

Browse files
authored
Increase CI reliability by downloading iOS sim (#350)
1 parent 6139be7 commit 922d317

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@ jobs:
3535
run: bundle install
3636
- name: Select Xcode Version
3737
run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
38+
- name: Download iOS
39+
if: matrix.platforms == 'iOS_18'
40+
run: |
41+
sudo xcodebuild -runFirstLaunch
42+
sudo xcrun simctl list
43+
sudo xcodebuild -downloadPlatform iOS -buildVersion 22E238
44+
- name: Download tvOS
45+
if: matrix.platforms == 'tvOS_18'
46+
run: |
47+
sudo xcodebuild -runFirstLaunch
48+
sudo xcrun simctl list
49+
sudo xcodebuild -downloadPlatform tvOS -buildVersion 22K154
50+
- name: Download watchOS
51+
if: matrix.platforms == 'watchOS_11'
52+
run: |
53+
sudo xcodebuild -runFirstLaunch
54+
sudo xcrun simctl list
55+
sudo xcodebuild -downloadPlatform watchOS -buildVersion 22S99
3856
- name: Build and Test Framework
3957
run: Scripts/build.swift ${{ matrix.platforms }} xcode
4058
- name: Upload Coverage Reports
@@ -94,6 +112,24 @@ jobs:
94112
run: bundle install
95113
- name: Select Xcode Version
96114
run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
115+
- name: Download iOS
116+
if: matrix.platforms == 'iOS_18'
117+
run: |
118+
sudo xcodebuild -runFirstLaunch
119+
sudo xcrun simctl list
120+
sudo xcodebuild -downloadPlatform iOS -buildVersion 22E238
121+
- name: Download tvOS
122+
if: matrix.platforms == 'tvOS_18'
123+
run: |
124+
sudo xcodebuild -runFirstLaunch
125+
sudo xcrun simctl list
126+
sudo xcodebuild -downloadPlatform tvOS -buildVersion 22K154
127+
- name: Download watchOS
128+
if: matrix.platforms == 'watchOS_11'
129+
run: |
130+
sudo xcodebuild -runFirstLaunch
131+
sudo xcrun simctl list
132+
sudo xcodebuild -downloadPlatform watchOS -buildVersion 22S99
97133
- name: Build Framework
98134
run: Scripts/build.swift ${{ matrix.platforms }} spm
99135
readme-validation:

Scripts/build.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum Platform: String, CustomStringConvertible {
2929
var destination: String {
3030
switch self {
3131
case .iOS_18:
32-
"platform=iOS Simulator,OS=18.4,name=iPad (10th generation)"
32+
"platform=iOS Simulator,OS=18.4,name=iPhone 16"
3333

3434
case .tvOS_18:
3535
"platform=tvOS Simulator,OS=18.2,name=Apple TV"

0 commit comments

Comments
 (0)