Skip to content

Commit

Permalink
chore(ci): Add ios beauty build logs for ci builds (#2827)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Feb 27, 2023
1 parent 9a3ca65 commit 1542a60
Showing 1 changed file with 40 additions and 10 deletions.
50 changes: 40 additions & 10 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
java-version: '11'
distribution: 'adopt'

- name: Install Global Dependencies
run: brew install xcbeautify

- name: NPM cache
uses: actions/cache@v3
id: deps-cache
Expand Down Expand Up @@ -94,21 +97,32 @@ jobs:
'-derivedDataPath' $(cd "DerivedData" ; pwd -P)
)
echo "buildArgs = ${buildArgs[@]}"
xcodebuild \
set -o pipefail && xcodebuild \
-workspace sample.xcworkspace \
-configuration Release \
-scheme sample \
"${buildArgs[@]}" \
build
xcodebuild \
build \
| tee sample-xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
set -o pipefail && xcodebuild \
-project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
COMPILER_INDEX_STORE_ENABLE=NO \
"${buildArgs[@]}" \
build
build \
| tee webdriveragent-xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
fi
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-logs
path: ./sample/ios/*.log

metrics:
runs-on: macos-latest
strategy:
Expand Down Expand Up @@ -255,8 +269,10 @@ jobs:
java-version: '11'
distribution: 'adopt'

- name: Setup JS Tools
run: yarn global add yalc semver
- name: Setup Global Tools
run: |
yarn global add yalc semver
brew install xcbeautify
- name: NPM cache SDK
uses: actions/cache@v3
Expand Down Expand Up @@ -358,14 +374,16 @@ jobs:
echo "Building $CONFIG"
mkdir -p "DerivedData"
derivedData="$(cd "DerivedData" ; pwd -P)"
xcodebuild \
set -o pipefail && xcodebuild \
-workspace RnDiffApp.xcworkspace \
-configuration "$CONFIG" \
-scheme RnDiffApp \
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
ONLY_ACTIVE_ARCH=yes \
-derivedDataPath "$derivedData" \
build
build \
| tee xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
- name: Archive Android APK
if: matrix.platform == 'android' && matrix.build-type == 'production'
Expand Down Expand Up @@ -397,6 +415,13 @@ jobs:
path: app.tar
retention-days: 1

- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: rn-build-logs-${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.platform }}-${{ matrix.build-type }}
path: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios/*.log

react-native-test:
name: Test RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }}
needs: react-native-build
Expand All @@ -422,6 +447,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Global Tools
run: brew install xcbeautify

- name: Download App Package
if: matrix.build-type == 'production'
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -456,15 +484,17 @@ jobs:
run: |
mkdir -p "DerivedData"
derivedData="$(cd "DerivedData" ; pwd -P)"
xcodebuild \
set -o pipefail && xcodebuild \
-project node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
COMPILER_INDEX_STORE_ENABLE=NO \
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
ONLY_ACTIVE_ARCH=yes \
-derivedDataPath "$derivedData" \
build
build \
| tee xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
- name: Start Appium Server
working-directory: test/e2e
Expand Down

0 comments on commit 1542a60

Please sign in to comment.