From 1a48d371839047797736dd649b8b3dd0ea849da5 Mon Sep 17 00:00:00 2001 From: Tom Van Laerhoven Date: Mon, 18 Nov 2024 11:33:27 +0100 Subject: [PATCH] Enable e2e pipeline for newArch --- .github/workflows/pr_android.yml | 10 +++++++++- .github/workflows/pr_ios.yml | 21 +++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_android.yml b/.github/workflows/pr_android.yml index 3b9ab26b8..5a27d57b1 100644 --- a/.github/workflows/pr_android.yml +++ b/.github/workflows/pr_android.yml @@ -2,7 +2,7 @@ name: Build Android on PRs on: workflow_dispatch: pull_request: - types: [opened, reopened, synchronize] + types: [ opened, reopened, synchronize ] jobs: build: @@ -10,6 +10,7 @@ jobs: strategy: matrix: api-level: [ 34 ] + newArchEnabled: [ false, true ] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -69,6 +70,13 @@ jobs: disable-animations: true script: echo "Generated AVD snapshot for caching." + - name: Modify gradle.properties for newArchEnabled + working-directory: e2e/android + run: | + # Modify or add the newArchEnabled property in gradle.properties + echo "newArchEnabled=${{ matrix.newArchEnabled }}" >> ./gradle.properties + cat ./gradle.properties + - name: Run e2e tests uses: reactivecircus/android-emulator-runner@v2 with: diff --git a/.github/workflows/pr_ios.yml b/.github/workflows/pr_ios.yml index c4cc5d867..2667da71e 100644 --- a/.github/workflows/pr_ios.yml +++ b/.github/workflows/pr_ios.yml @@ -2,14 +2,15 @@ name: Build iOS on PRs on: workflow_dispatch: pull_request: - types: [opened, reopened, synchronize] + types: [ opened, reopened, synchronize ] jobs: build: + runs-on: macos-latest strategy: matrix: xcode_version: [ '15.4.0' ] - runs-on: macos-latest + newArchEnabled: [ 0, 1 ] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -25,11 +26,19 @@ jobs: node-version: '18' cache: 'npm' + - name: Cache Ruby Gems + uses: actions/cache@v4 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Cache CocoaPods uses: actions/cache@v4 with: path: e2e/ios/Pods - key: pods-${{ runner.os }}-${{ hashFiles('Podfile.lock') }} + key: pods-${{ runner.os }}-${{ hashFiles('Podfile.lock') }}-${{ matrix.newArchEnabled }} restore-keys: | pods-${{ runner.os }}- @@ -44,10 +53,13 @@ jobs: cd e2e npm ci + - name: Install Ruby dependencies + run: bundle install + - name: Run pod install & update dependencies working-directory: e2e/ios run: | - pod update + RCT_NEW_ARCH_ENABLED=${{ matrix.newArchEnabled }} bundle exec pod update - name: Start iOS simulator uses: futureware-tech/simulator-action@v4 @@ -61,4 +73,5 @@ jobs: - name: Summarize results working-directory: e2e + if: always() run: cat cavy_results.md >> $GITHUB_STEP_SUMMARY