Skip to content

Commit 799fad3

Browse files
committed
Updated GitHub CI
1 parent d12e3d3 commit 799fad3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ jobs:
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
@@ -95,6 +102,7 @@ jobs:
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,4 +174,5 @@ 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]}

0 commit comments

Comments
 (0)