Skip to content
Latchkey

How to Run xcbeautify on xcodebuild Output in GitHub Actions

Pipe xcodebuild through xcbeautify for readable CI logs, and set pipefail so the build status is not lost to the pipe.

xcbeautify formats raw xcodebuild output into clean, annotated logs. Pipe with set -o pipefail so a build failure still fails the step instead of being masked by xcbeautify exiting 0.

Steps

  • Install xcbeautify with brew install xcbeautify.
  • Run xcodebuild with set -o pipefail and pipe into xcbeautify.
  • Add --renderer github-actions for inline annotations.

Workflow

.github/workflows/ci.yml
jobs:
  test:
    runs-on: macos-latest
    env:
      HOMEBREW_NO_AUTO_UPDATE: '1'
    steps:
      - uses: actions/checkout@v4
      - run: brew install xcbeautify
      - name: Test
        run: |
          set -o pipefail
          xcodebuild test \
            -scheme MyApp \
            -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
            | xcbeautify --renderer github-actions

Gotchas

  • Without set -o pipefail, the step exit code is xcbeautify's (0), so failed builds look green.
  • xcbeautify reads xcodebuild text output; it does not parse the result bundle, so combine it with -resultBundlePath if you need the raw data too.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →