Skip to content

Commit e362967

Browse files
kraenhansenclaude
andcommitted
ci: keep the raw xcodebuild log from the macOS test app build
When a script phase fails, xcbeautify prints the failure summary but not the phase's own output, and its stdout is block-buffered through the pipe, so the tail of the build never reaches the job log either. A failing archive then leaves nothing to diagnose. Tee the raw xcodebuild output to a file and upload it as an artifact when the job fails. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 8a15546 commit e362967

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/check.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,19 @@ jobs:
222222
run: npx react-native bundle --entry-file index.js --platform macos --dev false --minify false --bundle-output dist/main.macos.jsbundle --assets-dest dist/res
223223
working-directory: apps/macos-test-app
224224
- name: Build test app
225-
# pipefail so an xcodebuild failure is not masked by xcbeautify's exit code
226-
run: set -o pipefail && xcodebuild archive -workspace MacOSTestApp.xcworkspace -configuration Release -scheme MacOSTestApp-macOS -destination generic/platform="macOS" -archivePath ./build/macos-test-app.xcarchive | xcbeautify
225+
# pipefail so an xcodebuild failure is not masked by xcbeautify's exit code.
226+
# tee keeps the raw log: xcbeautify hides the output of failing script
227+
# phases (and its stdout is block-buffered through the pipe, so the tail
228+
# of the build gets lost when the job fails), which leaves a script phase
229+
# failure with nothing to diagnose.
230+
run: set -o pipefail && xcodebuild archive -workspace MacOSTestApp.xcworkspace -configuration Release -scheme MacOSTestApp-macOS -destination generic/platform="macOS" -archivePath ./build/macos-test-app.xcarchive | tee xcodebuild.log | xcbeautify
227231
working-directory: apps/macos-test-app/macos
232+
- name: Upload xcodebuild log
233+
if: failure()
234+
uses: actions/upload-artifact@v4
235+
with:
236+
name: macos-xcodebuild-log
237+
path: apps/macos-test-app/macos/xcodebuild.log
228238
- name: Run test app
229239
run: npx mocha-remote --exit-on-error -- macos/build/macos-test-app.xcarchive/Products/Applications/MacOSTestApp.app/Contents/MacOS/MacOSTestApp
230240
working-directory: apps/macos-test-app

0 commit comments

Comments
 (0)