Skip to content

Commit f9fcf9c

Browse files
committed
Use xcpretty to produce easier to read build logs
1 parent d18dc3a commit f9fcf9c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/checks.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ jobs:
3333
git diff --exit-code Support/Carthage/Readium.xcodeproj
3434
- name: Build
3535
run: |
36-
xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device"
36+
set -eo pipefail
37+
xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
3738
- name: Test
3839
run: |
39-
xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device"
40+
set -eo pipefail
41+
xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
4042
4143
lint:
4244
name: Lint
@@ -91,7 +93,8 @@ jobs:
9193
run: make dev lcp=${{ secrets.LCP_URL_SPM }}
9294
- name: Build
9395
run: |
94-
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
96+
set -eo pipefail
97+
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
9598
9699
int-spm:
97100
name: Integration (Swift Package Manager)
@@ -118,7 +121,8 @@ jobs:
118121
run: make spm lcp=${{ secrets.LCP_URL_SPM }} commit=$commit_sha
119122
- name: Build
120123
run: |
121-
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
124+
set -eo pipefail
125+
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
122126
123127
int-carthage:
124128
name: Integration (Carthage)
@@ -145,7 +149,8 @@ jobs:
145149
run: make carthage lcp=${{ secrets.LCP_URL_CARTHAGE }} commit=$commit_sha
146150
- name: Build
147151
run: |
148-
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
152+
set -eo pipefail
153+
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
149154
150155
# Warning: This job cannot actually test the state of the current commit,
151156
# but will check that the latest branch/tag set in the Podspecs are valid.
@@ -168,4 +173,5 @@ jobs:
168173
run: make cocoapods lcp=${{ secrets.LCP_URL_COCOAPODS }} commit=$commit_sha
169174
- name: Build
170175
run: |
171-
xcodebuild build -workspace TestApp.xcworkspace -scheme TestApp -destination "platform=$platform,name=$device"
176+
set -eo pipefail
177+
xcodebuild build -workspace TestApp.xcworkspace -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi

0 commit comments

Comments
 (0)