diff --git a/.github/actions/maestro-android/action.yml b/.github/actions/maestro-android/action.yml index c8882c023b279f..99a8c0733098af 100644 --- a/.github/actions/maestro-android/action.yml +++ b/.github/actions/maestro-android/action.yml @@ -25,6 +25,10 @@ inputs: required: false default: "." description: The directory from which metro should be started + architecture: + required: false + default: "NewArch" + description: The react native architecture to test runs: using: composite @@ -52,6 +56,7 @@ runs: if: ${{ inputs.flavor == 'debug' }} run: ./packages/react-native-codegen/scripts/oss/build.sh - name: Run e2e tests + id: run-tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: 24 @@ -69,16 +74,16 @@ runs: NORM_APP_ID=$(echo "${{ inputs.app-id }}" | tr '.' '-') echo "app-id=$NORM_APP_ID" >> $GITHUB_OUTPUT - name: Store tests result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.3.4 if: always() with: - name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }} + name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }} path: | report.xml screen.mp4 - name: Store Logs - if: failure() && steps.run-tests.outcome == 'failure' + if: steps.run-tests.outcome == 'failure' uses: actions/upload-artifact@v4.3.4 with: - name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }} + name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }} path: /tmp/MaestroLogs diff --git a/.github/actions/maestro-ios/action.yml b/.github/actions/maestro-ios/action.yml index 34586168369690..e5dd927bec32ed 100644 --- a/.github/actions/maestro-ios/action.yml +++ b/.github/actions/maestro-ios/action.yml @@ -21,6 +21,10 @@ inputs: required: false default: "." description: The directory from which metro should be started + architecture: + required: false + default: "NewArch" + description: The react native architecture to test runs: using: composite @@ -86,8 +90,6 @@ runs: CURR_ATTEMPT=$((CURR_ATTEMPT+1)) echo "Attempt number $CURR_ATTEMPT" - - echo "Start video record using pid: video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid" xcrun simctl io booted recordVideo video_record_$CURR_ATTEMPT.mov & echo $! > video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid @@ -105,7 +107,7 @@ runs: if: always() uses: actions/upload-artifact@v4.3.4 with: - name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }} + name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }} path: | video_record_1.mov video_record_2.mov @@ -117,5 +119,5 @@ runs: if: failure() && steps.run-tests.outcome == 'failure' uses: actions/upload-artifact@v4.3.4 with: - name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }} + name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }} path: /tmp/MaestroLogs diff --git a/.github/workflow-scripts/maestro-android.js b/.github/workflow-scripts/maestro-android.js index 462ce25ae42007..f6533bd0933cdc 100644 --- a/.github/workflow-scripts/maestro-android.js +++ b/.github/workflow-scripts/maestro-android.js @@ -55,6 +55,7 @@ async function main() { stdio: 'ignore', detached: true, }); + metroProcess.unref(); console.info(`- Metro PID: ${metroProcess.pid}`); } @@ -88,15 +89,15 @@ async function main() { if (IS_DEBUG && metroProcess != null) { const pid = metroProcess.pid; console.info(`Kill Metro. PID: ${pid}`); - process.kill(-pid); + process.kill(pid); console.info(`Metro Killed`); - process.exit(); } } if (error) { throw error; } + process.exit(); } function sleep(ms) { diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 6511d7dab53ccc..b10d34c232315a 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -233,6 +233,7 @@ jobs: matrix: jsengine: [Hermes, JSC] flavor: [Debug, Release] + architecture: [OldArch, NewArch] steps: - name: Checkout uses: actions/checkout@v4 @@ -277,7 +278,12 @@ jobs: cd /tmp/RNTestProject/ios bundle install - HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH bundle exec pod install + NEW_ARCH_ENABLED=1 + if [[ ${{ matrix.architecture }} == "OldArch" ]]; then + echo "Disable the New Architecture" + NEW_ARCH_ENABLED=0 + fi + HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install xcodebuild \ -scheme "RNTestProject" \ @@ -295,6 +301,7 @@ jobs: maestro-flow: ./scripts/e2e/.maestro/ flavor: ${{ matrix.flavor }} working-directory: /tmp/RNTestProject + architecture: ${{ matrix.architecture }} test_e2e_android_templateapp: if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }} @@ -306,6 +313,7 @@ jobs: matrix: jsengine: [Hermes, JSC] flavor: [debug, release] + architecture: [OldArch, NewArch] steps: - name: Checkout uses: actions/checkout@v4 @@ -351,6 +359,11 @@ jobs: cd /tmp/RNTestProject echo "react.internal.mavenLocalRepo=$MAVEN_LOCAL" >> android/gradle.properties + if [[ ${{matrix.architecture}} == "OldArch" ]]; then + echo "Disabling the New Architecture" + sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties + fi + # Build cd android CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}') @@ -366,6 +379,7 @@ jobs: install-java: 'false' flavor: ${{ matrix.flavor }} working-directory: /tmp/RNTestProject + architecture: ${{ matrix.architecture }} build_hermesc_linux: runs-on: ubuntu-latest diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 53dd474502eced..e750e9682ba25a 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1870,8 +1870,8 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90 - DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb + boost: 1dca942403ed9342f98334bf4c3621f011aa7946 + DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 FBLazyVector: ec2eda6b55fa0e3d32b9f8bd1e6190e95c3189a4 fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd @@ -1948,4 +1948,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 8591f96a513620a2a83a0b9a125ad3fa32ea1369 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2