From 2c338a719e1179ba656e114cdb5afacc0777739c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 2 Jan 2025 09:52:22 -0800 Subject: [PATCH] Build Release version for RNTester to speed-up E2E (#48443) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48443 This change makes sure we build the Release variant of RNTester so we can store the generated app as an artifact and forward it to the E2E tests. ## Context While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration. I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps: 1. make sure we build all the variants we need 2. store the .app file as an artifact 3. download the artifact and use it in the E2E tests ## Changelog: [Internal] - Build release variant for RNTester Reviewed By: cortinico Differential Revision: D67760372 fbshipit-source-id: 02cc9ec64d5a7b4fa2ad05bca6aa91a69b2b5907 --- .github/actions/test-ios-rntester/action.yml | 9 --------- .github/workflows/test-all.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index d11790ca3d3306..c500f0ef2cd729 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -118,16 +118,7 @@ runs: bundle install bundle exec pod install - name: Build RNTester - if: ${{ inputs.run-unit-tests != 'true' && inputs.run-e2e-tests == 'false' }} shell: bash - run: | - xcodebuild build \ - -workspace packages/rn-tester/RNTesterPods.xcworkspace \ - -scheme RNTester \ - -sdk iphonesimulator - - name: Build RNTester (E2E Tests) - shell: bash - if: ${{ inputs.run-e2e-tests == 'true' }} run: | xcodebuild \ -scheme "RNTester" \ diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 508865cc311b37..3a49ebea3a550b 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -169,6 +169,14 @@ jobs: matrix: jsengine: [Hermes, JSC] architecture: [NewArch, OldArch] + flavor: [Debug, Release] + exclude: # We don't want to test the Old Arch in Release for E2E + - jsengine: Hermes + architecture: OldArch + flavor: Release + - jsengine: JSC + architecture: OldArch + flavor: Release steps: - name: Checkout uses: actions/checkout@v4 @@ -181,6 +189,7 @@ jobs: use-frameworks: StaticLibraries hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + flavor: ${{ matrix.flavor }} test_e2e_ios_rntester: if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}