name: Test Hermes V1 with nightly on Android on: workflow_call: inputs: retry-count: description: 'Number of times to retry the build on failure' required: false type: number default: 3 jobs: test-hermes-v1-android: name: Test Hermes V1 on Android runs-on: 4-core-ubuntu strategy: matrix: flavor: [debug, release] steps: - name: Checkout uses: actions/checkout@v6 - name: Setup node.js uses: actions/setup-node@v6 with: node-version: '22.14.0' cache: yarn - name: Set up JDK 17 uses: actions/setup-java@v5 with: java-version: '17' distribution: 'zulu' - name: Prepare the app with Hermes V1 uses: ./.github/actions/prepare-hermes-v1-app with: retry-count: ${{ inputs.retry-count }} - name: Build Android with retry uses: nick-fields/retry@v3 env: CMAKE_VERSION: 3.31.5 ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64 with: timeout_minutes: 45 max_attempts: ${{ inputs.retry-count }} retry_wait_seconds: 30 shell: bash command: | cd /tmp/RNApp/android CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}') ./gradlew assemble${CAPITALIZED_FLAVOR} -PhermesV1Enabled=true on_retry_command: | echo "Cleaning up for Android retry..." cd /tmp/RNApp/android ./gradlew clean || true rm -rf build app/build .gradle || true - name: Run E2E Tests uses: ./.github/actions/maestro-android timeout-minutes: 60 with: app-path: /tmp/RNApp/android/app/build/outputs/apk/${{ matrix.flavor }}/app-${{ matrix.flavor }}.apk app-id: com.rnapp maestro-flow: ./scripts/e2e/.maestro/ install-java: 'false' flavor: ${{ matrix.flavor }} working-directory: /tmp/RNApp emulator-arch: x86_64