80
80
- name : Build
81
81
run : xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "generic/platform=iOS Simulator,name=Any iOS Device" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
82
82
- name : Prepare Destination Device Name
83
+ id : destnameprep
84
+ # As of GitHub's updates to the macOS-15 runner summer 2025, randomly Xcode may not list any simulators.
85
+ # No idea why. Seems like a bug or runner config issue. So to prevent false-positive job failures, we'll skip
86
+ # the unit tests if no devices are found, but mark the unit test step as cancelled. The job is still marked as
87
+ # passed (green), but the Unit Tests step will show cancelled. This is the best we can do, as there appears to
88
+ # be no way to "cancel" an individual job programmatically.
89
+ continue-on-error : true
83
90
shell : bash
84
91
run : |
85
92
xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" > destinations.txt
95
102
echo "Using device name \"$DESTNAME\""
96
103
echo "DESTNAME=$DESTNAME" >> "$GITHUB_ENV"
97
104
- name : Unit Tests
105
+ if : steps.destnameprep.outcome != 'failure'
98
106
run : xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "platform=iOS Simulator,name=$DESTNAME" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
99
107
100
108
tvOS :
@@ -108,6 +116,13 @@ jobs:
108
116
- name : Build
109
117
run : xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
110
118
- name : Prepare Destination Device Name
119
+ id : destnameprep
120
+ # As of GitHub's updates to the macOS-15 runner summer 2025, randomly Xcode may not list any simulators.
121
+ # No idea why. Seems like a bug or runner config issue. So to prevent false-positive job failures, we'll skip
122
+ # the unit tests if no devices are found, but mark the unit test step as cancelled. The job is still marked as
123
+ # passed (green), but the Unit Tests step will show cancelled. This is the best we can do, as there appears to
124
+ # be no way to "cancel" an individual job programmatically.
125
+ continue-on-error : true
111
126
shell : bash
112
127
run : |
113
128
xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" > destinations.txt
@@ -123,6 +138,7 @@ jobs:
123
138
echo "Using device name \"$DESTNAME\""
124
139
echo "DESTNAME=$DESTNAME" >> "$GITHUB_ENV"
125
140
- name : Unit Tests
141
+ if : steps.destnameprep.outcome != 'failure'
126
142
run : xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "platform=tvOS Simulator,name=$DESTNAME" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
127
143
128
144
watchOS :
@@ -136,6 +152,13 @@ jobs:
136
152
- name : Build
137
153
run : xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "generic/platform=watchOS Simulator,name=Any watchOS Simulator Device" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
138
154
- name : Prepare Destination Device Name
155
+ id : destnameprep
156
+ # As of GitHub's updates to the macOS-15 runner summer 2025, randomly Xcode may not list any simulators.
157
+ # No idea why. Seems like a bug or runner config issue. So to prevent false-positive job failures, we'll skip
158
+ # the unit tests if no devices are found, but mark the unit test step as cancelled. The job is still marked as
159
+ # passed (green), but the Unit Tests step will show cancelled. This is the best we can do, as there appears to
160
+ # be no way to "cancel" an individual job programmatically.
161
+ continue-on-error : true
139
162
shell : bash
140
163
run : |
141
164
xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" > destinations.txt
@@ -151,4 +174,5 @@ jobs:
151
174
echo "Using device name \"$DESTNAME\""
152
175
echo "DESTNAME=$DESTNAME" >> "$GITHUB_ENV"
153
176
- name : Unit Tests
177
+ if : steps.destnameprep.outcome != 'failure'
154
178
run : xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "platform=watchOS Simulator,name=$DESTNAME" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
0 commit comments