From ada9839508f54be67428ef2cdb95783a7bc14228 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 20 May 2025 15:02:34 +0100 Subject: [PATCH] [RN][CI] Stop testing JSC --- .github/actions/build-android/action.yml | 18 +------- .github/actions/maestro-android/action.yml | 7 +-- .github/actions/maestro-ios/action.yml | 19 ++++---- .../setup-xcode-build-cache/action.yml | 7 +-- .../actions/test-ios-helloworld/action.yml | 41 +++++++---------- .github/actions/test-ios-rntester/action.yml | 12 +---- .github/workflows/test-all.yml | 45 ++++--------------- 7 files changed, 41 insertions(+), 108 deletions(-) diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 91019234adc..3daff2b4bf4 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -86,27 +86,13 @@ runs: if: ${{ always() }} uses: actions/upload-artifact@v4.3.4 with: - name: rntester-hermes-debug + name: rntester-debug path: packages/rn-tester/android/app/build/outputs/apk/hermes/debug/ compression-level: 0 - name: Upload RNTester APK - hermes-release if: ${{ always() }} uses: actions/upload-artifact@v4.3.4 with: - name: rntester-hermes-release + name: rntester-release path: packages/rn-tester/android/app/build/outputs/apk/hermes/release/ compression-level: 0 - - name: Upload RNTester APK - jsc-debug - if: ${{ always() }} - uses: actions/upload-artifact@v4.3.4 - with: - name: rntester-jsc-debug - path: packages/rn-tester/android/app/build/outputs/apk/jsc/debug/ - compression-level: 0 - - name: Upload RNTester APK - jsc-release - if: ${{ always() }} - uses: actions/upload-artifact@v4.3.4 - with: - name: rntester-jsc-release - path: packages/rn-tester/android/app/build/outputs/apk/jsc/release/ - compression-level: 0 diff --git a/.github/actions/maestro-android/action.yml b/.github/actions/maestro-android/action.yml index 5bf764f3582..c45adeea600 100644 --- a/.github/actions/maestro-android/action.yml +++ b/.github/actions/maestro-android/action.yml @@ -7,9 +7,6 @@ inputs: app-id: required: true description: The id of the app to test - jsengine: - required: true - description: The js engine we are using maestro-flow: required: true description: the folder that contains the maestro tests @@ -79,7 +76,7 @@ runs: 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 }}_${{ inputs.architecture }} + name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.flavor }}_${{ inputs.architecture }} path: | report.xml screen.mp4 @@ -87,5 +84,5 @@ runs: 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 }}-${{ inputs.architecture }} + name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.flavor }}-${{ inputs.architecture }} path: /tmp/MaestroLogs diff --git a/.github/actions/maestro-ios/action.yml b/.github/actions/maestro-ios/action.yml index e2acc0e40fe..ce595dcb158 100644 --- a/.github/actions/maestro-ios/action.yml +++ b/.github/actions/maestro-ios/action.yml @@ -7,9 +7,6 @@ inputs: app-id: required: true description: The id of the app to test - jsengine: - required: true - description: The js engine we are using maestro-flow: required: true description: the folder that contains the maestro tests @@ -66,24 +63,24 @@ runs: "${{ inputs.app-path }}" \ "${{ inputs.app-id }}" \ "${{ inputs.maestro-flow }}" \ - "${{ inputs.jsengine }}" \ + "Hermes" \ "${{ inputs.flavor }}" \ "${{ inputs.working-directory }}" - name: Store video record if: always() uses: actions/upload-artifact@v4.3.4 with: - name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }} + name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.flavor }}_${{ inputs.architecture }} path: | - video_record_${{ inputs.jsengine }}_1.mov - video_record_${{ inputs.jsengine }}_2.mov - video_record_${{ inputs.jsengine }}_3.mov - video_record_${{ inputs.jsengine }}_4.mov - video_record_${{ inputs.jsengine }}_5.mov + video_record_1.mov + video_record_2.mov + video_record_3.mov + video_record_4.mov + video_record_5.mov report.xml - name: Store Logs 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 }}-${{ inputs.architecture }} + name: maestro-logs-${{ inputs.app-id }}-${{ inputs.flavor }}-${{ inputs.architecture }} path: /tmp/MaestroLogs diff --git a/.github/actions/setup-xcode-build-cache/action.yml b/.github/actions/setup-xcode-build-cache/action.yml index bfeed95d5a9..2f8932e6db4 100644 --- a/.github/actions/setup-xcode-build-cache/action.yml +++ b/.github/actions/setup-xcode-build-cache/action.yml @@ -4,9 +4,6 @@ inputs: hermes-version: description: The version of hermes required: true - jsengine: - dscription: The js engine in use - default: Hermes flavor: description: The flavor that is going to be built default: Debug @@ -30,9 +27,9 @@ runs: uses: actions/cache@v4 with: path: packages/rn-tester/Podfile.lock - key: v13-podfilelock-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }} + key: v13-podfilelock-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }} - name: Cache cocoapods uses: actions/cache@v4 with: path: packages/rn-tester/Pods - key: v15-cocoapods-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}} + key: v15-cocoapods-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}} diff --git a/.github/actions/test-ios-helloworld/action.yml b/.github/actions/test-ios-helloworld/action.yml index f0738b2735b..6a7c7367e29 100644 --- a/.github/actions/test-ios-helloworld/action.yml +++ b/.github/actions/test-ios-helloworld/action.yml @@ -1,9 +1,6 @@ name: test-ios-helloworld description: Test iOS Hello World inputs: - jsengine: - description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". - default: Hermes use-frameworks: description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" default: StaticLibraries @@ -54,7 +51,7 @@ runs: - name: Print third-party folder shell: bash run: ls -lR /tmp/third-party - - name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }} + - name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }} shell: bash run: | cd packages/helloworld @@ -68,28 +65,24 @@ runs: args+=(--frameworks dynamic) fi - if [[ ${{ inputs.jsengine }} == "JSC" ]]; then - args+=(--jsvm jsc) - yarn bootstrap ios "${args[@]}" | cat - else - # Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased. - # Let's ensure that the tarballs have the right names + # Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased. + # Let's ensure that the tarballs have the right names - if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then - mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" - fi - - if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then - mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" - fi - - BUILD_TYPE="${{ inputs.flavor }}" - TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE") - export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME" - export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz" - - yarn bootstrap ios "${args[@]}" | cat + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" fi + + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" + fi + + BUILD_TYPE="${{ inputs.flavor }}" + TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE") + export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME" + export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz" + + yarn bootstrap ios "${args[@]}" | cat + - name: Build HelloWorld project shell: bash run: | diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index 4cb56919915..2344c7bc619 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -1,9 +1,6 @@ name: test-ios-rntester description: Test iOS RNTester inputs: - jsengine: - description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". - default: Hermes use-frameworks: description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" default: StaticLibraries @@ -104,7 +101,6 @@ runs: uses: ./.github/actions/setup-xcode-build-cache with: hermes-version: ${{ inputs.hermes-version }} - jsengine: ${{ inputs.jsengine }} architecture: ${{ inputs.architecture }} use-frameworks: ${{ inputs.use-frameworks }} flavor: ${{ inputs.flavor }} @@ -112,11 +108,7 @@ runs: - name: Install CocoaPods dependencies shell: bash run: | - if [[ ${{ inputs.jsengine }} == "JSC" ]]; then - export USE_HERMES=0 - else - export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH - fi + export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then export USE_FRAMEWORKS=dynamic @@ -170,7 +162,7 @@ runs: if: ${{ inputs.use-frameworks == 'StaticLibraries' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts uses: actions/upload-artifact@v4.3.4 with: - name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }} + name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.flavor }} path: ${{ env.app-path }} - name: Store test results if: ${{ inputs.run-unit-tests == 'true' }} diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index ae8cc58ce07..f9961812958 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -147,15 +147,12 @@ jobs: continue-on-error: true strategy: fail-fast: false - matrix: - jsengine: [Hermes, JSC] steps: - name: Checkout uses: actions/checkout@v4 - name: Run it uses: ./.github/actions/test-ios-rntester with: - jsengine: ${{ matrix.jsengine }} use-frameworks: DynamicFrameworks hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} @@ -171,15 +168,10 @@ jobs: strategy: fail-fast: false 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 + - architecture: OldArch flavor: Release steps: - name: Checkout @@ -187,7 +179,6 @@ jobs: - name: Run it uses: ./.github/actions/test-ios-rntester with: - jsengine: ${{ matrix.jsengine }} architecture: ${{ matrix.architecture }} run-unit-tests: "false" use-frameworks: StaticLibraries @@ -207,7 +198,6 @@ jobs: strategy: fail-fast: false matrix: - jsengine: [Hermes, JSC] architecture: [NewArch] flavor: [Debug, Release] steps: @@ -216,7 +206,7 @@ jobs: - name: Download App uses: actions/download-artifact@v4 with: - name: RNTesterApp-${{ matrix.architecture }}-${{ matrix.jsengine }}-${{ matrix.flavor }} + name: RNTesterApp-${{ matrix.architecture }}-${{ matrix.flavor }} path: /tmp/RNTesterBuild/RNTester.app - name: Check downloaded folder content run: ls -lR /tmp/RNTesterBuild @@ -227,7 +217,6 @@ jobs: with: app-path: "/tmp/RNTesterBuild/RNTester.app" app-id: com.meta.RNTester.localDevelopment - jsengine: ${{ matrix.jsengine }} maestro-flow: ./packages/rn-tester/.maestro/ flavor: ${{ matrix.flavor }} @@ -242,7 +231,6 @@ jobs: strategy: fail-fast: false matrix: - jsengine: [Hermes, JSC] flavor: [Debug, Release] architecture: [OldArch, NewArch] steps: @@ -318,7 +306,6 @@ jobs: with: app-path: "/tmp/RNTestProject/Build/Products/${{ matrix.flavor }}-iphonesimulator/RNTestProject.app" app-id: org.reactjs.native.example.RNTestProject - jsengine: ${{ matrix.jsengine }} maestro-flow: ./scripts/e2e/.maestro/ flavor: ${{ matrix.flavor }} working-directory: /tmp/RNTestProject @@ -332,7 +319,6 @@ jobs: strategy: fail-fast: false matrix: - jsengine: [Hermes, JSC] flavor: [debug, release] architecture: [OldArch, NewArch] steps: @@ -385,11 +371,6 @@ jobs: sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties fi - if [[ ${{matrix.jsengine}} == "JSC" ]]; then - echo "Using JSC instead of Hermes" - sed -i 's/hermesEnabled=true/hermesEnabled=false/' android/gradle.properties - fi - # Build cd android CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}') @@ -401,7 +382,6 @@ jobs: with: app-path: /tmp/RNTestProject/android/app/build/outputs/apk/${{ matrix.flavor }}/app-${{ matrix.flavor }}.apk app-id: com.rntestproject - jsengine: ${{ matrix.jsengine }} maestro-flow: ./scripts/e2e/.maestro/ install-java: 'false' flavor: ${{ matrix.flavor }} @@ -469,7 +449,6 @@ jobs: strategy: fail-fast: false matrix: - jsengine: [hermes, jsc] flavor: [debug, release] steps: - name: Checkout @@ -481,17 +460,16 @@ jobs: - name: Download APK uses: actions/download-artifact@v4 with: - name: rntester-${{ matrix.jsengine }}-${{ matrix.flavor }} - path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.jsengine }}/${{ matrix.flavor }}/ + name: rntester-${{ matrix.flavor }} + path: ./packages/rn-tester/android/app/build/outputs/apk/hermes/${{ matrix.flavor }}/ - name: Print folder structure - run: ls -lR ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.jsengine }}/${{ matrix.flavor }}/ + run: ls -lR ./packages/rn-tester/android/app/build/outputs/apk/hermes/${{ matrix.flavor }}/ - name: Run E2E Tests uses: ./.github/actions/maestro-android timeout-minutes: 60 with: - app-path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.jsengine }}/${{ matrix.flavor }}/app-${{ matrix.jsengine }}-x86-${{ matrix.flavor }}.apk + app-path: ./packages/rn-tester/android/app/build/outputs/apk/hermes/${{ matrix.flavor }}/app-hermes-x86-${{ matrix.flavor }}.apk app-id: com.facebook.react.uiapp - jsengine: ${{ matrix.jsengine }} maestro-flow: ./packages/rn-tester/.maestro flavor: ${{ matrix.flavor }} @@ -543,7 +521,6 @@ jobs: matrix: flavor: [Debug, Release] architecture: [NewArch, OldArch] - jsengine: [Hermes, JSC] steps: - name: Checkout uses: actions/checkout@v4 @@ -568,7 +545,7 @@ jobs: - name: Prepare the Helloworld application shell: bash run: node ./scripts/e2e/init-project-e2e.js --useHelloWorld --pathToLocalReactNative "$GITHUB_WORKSPACE/build/$(cat build/react-native-package-version)" - - name: Build the Helloworld application for ${{ matrix.flavor }} with Architecture set to ${{ matrix.architecture }}, and using the ${{ matrix.jsengine }} JS engine. + - name: Build the Helloworld application for ${{ matrix.flavor }} with Architecture set to ${{ matrix.architecture }}. shell: bash run: | cd packages/helloworld/android @@ -576,9 +553,6 @@ jobs: if [[ ${{ matrix.architecture }} == "OldArch" ]]; then args+=(--arch old) fi - if [[ ${{ matrix.jsengine }} == "JSC" ]]; then - args+=(--jsvm jsc) - fi if [[ ${{ matrix.flavor }} == "Release" ]]; then args+=(--prod) fi @@ -586,7 +560,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4.3.4 with: - name: helloworld-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }} + name: helloworld-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-hermes path: ./packages/helloworld/android/app/build/outputs/apk/ compression-level: 0 @@ -614,12 +588,10 @@ jobs: strategy: matrix: flavor: [Debug, Release] - jsengine: [Hermes, JSC] use_frameworks: [StaticLibraries, DynamicFrameworks] exclude: # This config is tested with Ruby 3.2.0. Let's not double test it. - flavor: Debug - jsengine: Hermes use_frameworks: StaticLibraries env: PROJECT_NAME: iOSTemplateProject @@ -631,7 +603,6 @@ jobs: - uses: ./.github/actions/test-ios-helloworld with: flavor: ${{ matrix.flavor }} - jsengine: ${{ matrix.jsengine }} use-frameworks: ${{ matrix.use_frameworks }} hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}