8080 - name : Build
8181 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]}
8282 - 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
8390 shell : bash
8491 run : |
8592 xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" > destinations.txt
95102 echo "Using device name \"$DESTNAME\""
96103 echo "DESTNAME=$DESTNAME" >> "$GITHUB_ENV"
97104 - name : Unit Tests
105+ if : steps.destnameprep.outcome != 'failure'
98106 run : xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "platform=iOS Simulator,name=$DESTNAME" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
99107
100108 tvOS :
@@ -108,6 +116,13 @@ jobs:
108116 - name : Build
109117 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]}
110118 - 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
111126 shell : bash
112127 run : |
113128 xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" > destinations.txt
@@ -123,6 +138,7 @@ jobs:
123138 echo "Using device name \"$DESTNAME\""
124139 echo "DESTNAME=$DESTNAME" >> "$GITHUB_ENV"
125140 - name : Unit Tests
141+ if : steps.destnameprep.outcome != 'failure'
126142 run : xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "platform=tvOS Simulator,name=$DESTNAME" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
127143
128144 watchOS :
@@ -136,6 +152,13 @@ jobs:
136152 - name : Build
137153 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]}
138154 - 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
139162 shell : bash
140163 run : |
141164 xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" > destinations.txt
@@ -151,6 +174,7 @@ jobs:
151174 echo "Using device name \"$DESTNAME\""
152175 echo "DESTNAME=$DESTNAME" >> "$GITHUB_ENV"
153176 - name : Unit Tests
177+ if : steps.destnameprep.outcome != 'failure'
154178 run : xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "$SCHEME" -destination "platform=watchOS Simulator,name=$DESTNAME" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
155179
156180 examples :
0 commit comments