Skip to content

Commit 1542a60

Browse files
chore(ci): Add ios beauty build logs for ci builds (#2827)
1 parent 9a3ca65 commit 1542a60

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

.github/workflows/e2e.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
java-version: '11'
4242
distribution: 'adopt'
4343

44+
- name: Install Global Dependencies
45+
run: brew install xcbeautify
46+
4447
- name: NPM cache
4548
uses: actions/cache@v3
4649
id: deps-cache
@@ -94,21 +97,32 @@ jobs:
9497
'-derivedDataPath' $(cd "DerivedData" ; pwd -P)
9598
)
9699
echo "buildArgs = ${buildArgs[@]}"
97-
xcodebuild \
100+
set -o pipefail && xcodebuild \
98101
-workspace sample.xcworkspace \
99102
-configuration Release \
100103
-scheme sample \
101104
"${buildArgs[@]}" \
102-
build
103-
xcodebuild \
105+
build \
106+
| tee sample-xcodebuild.log \
107+
| xcbeautify --quieter --is-ci --disable-colored-output
108+
set -o pipefail && xcodebuild \
104109
-project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \
105110
-scheme WebDriverAgentRunner \
106111
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
107112
COMPILER_INDEX_STORE_ENABLE=NO \
108113
"${buildArgs[@]}" \
109-
build
114+
build \
115+
| tee webdriveragent-xcodebuild.log \
116+
| xcbeautify --quieter --is-ci --disable-colored-output
110117
fi
111118
119+
- name: Upload logs
120+
if: ${{ always() }}
121+
uses: actions/upload-artifact@v3
122+
with:
123+
name: ${{ matrix.platform }}-logs
124+
path: ./sample/ios/*.log
125+
112126
metrics:
113127
runs-on: macos-latest
114128
strategy:
@@ -255,8 +269,10 @@ jobs:
255269
java-version: '11'
256270
distribution: 'adopt'
257271

258-
- name: Setup JS Tools
259-
run: yarn global add yalc semver
272+
- name: Setup Global Tools
273+
run: |
274+
yarn global add yalc semver
275+
brew install xcbeautify
260276
261277
- name: NPM cache SDK
262278
uses: actions/cache@v3
@@ -358,14 +374,16 @@ jobs:
358374
echo "Building $CONFIG"
359375
mkdir -p "DerivedData"
360376
derivedData="$(cd "DerivedData" ; pwd -P)"
361-
xcodebuild \
377+
set -o pipefail && xcodebuild \
362378
-workspace RnDiffApp.xcworkspace \
363379
-configuration "$CONFIG" \
364380
-scheme RnDiffApp \
365381
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
366382
ONLY_ACTIVE_ARCH=yes \
367383
-derivedDataPath "$derivedData" \
368-
build
384+
build \
385+
| tee xcodebuild.log \
386+
| xcbeautify --quieter --is-ci --disable-colored-output
369387
370388
- name: Archive Android APK
371389
if: matrix.platform == 'android' && matrix.build-type == 'production'
@@ -397,6 +415,13 @@ jobs:
397415
path: app.tar
398416
retention-days: 1
399417

418+
- name: Upload logs
419+
if: ${{ always() }}
420+
uses: actions/upload-artifact@v3
421+
with:
422+
name: rn-build-logs-${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.platform }}-${{ matrix.build-type }}
423+
path: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios/*.log
424+
400425
react-native-test:
401426
name: Test RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }}
402427
needs: react-native-build
@@ -422,6 +447,9 @@ jobs:
422447
steps:
423448
- uses: actions/checkout@v3
424449

450+
- name: Setup Global Tools
451+
run: brew install xcbeautify
452+
425453
- name: Download App Package
426454
if: matrix.build-type == 'production'
427455
uses: actions/download-artifact@v3
@@ -456,15 +484,17 @@ jobs:
456484
run: |
457485
mkdir -p "DerivedData"
458486
derivedData="$(cd "DerivedData" ; pwd -P)"
459-
xcodebuild \
487+
set -o pipefail && xcodebuild \
460488
-project node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \
461489
-scheme WebDriverAgentRunner \
462490
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
463491
COMPILER_INDEX_STORE_ENABLE=NO \
464492
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
465493
ONLY_ACTIVE_ARCH=yes \
466494
-derivedDataPath "$derivedData" \
467-
build
495+
build \
496+
| tee xcodebuild.log \
497+
| xcbeautify --quieter --is-ci --disable-colored-output
468498
469499
- name: Start Appium Server
470500
working-directory: test/e2e

0 commit comments

Comments
 (0)