|
| 1 | +name: Test Hermes V1 with nightly on iOS |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + retry-count: |
| 7 | + description: 'Number of times to retry the build on failure' |
| 8 | + required: false |
| 9 | + type: number |
| 10 | + default: 3 |
| 11 | + |
| 12 | +jobs: |
| 13 | + test-hermes-v1-ios: |
| 14 | + name: Test Hermes V1 on iOS |
| 15 | + runs-on: macos-15-large |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + flavor: [debug, release] |
| 19 | + steps: |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Setup node.js |
| 24 | + uses: actions/setup-node@v4 |
| 25 | + with: |
| 26 | + node-version: '22.14.0' |
| 27 | + cache: yarn |
| 28 | + |
| 29 | + - name: Prepare capitalized flavor |
| 30 | + id: prepare-flavor |
| 31 | + shell: bash |
| 32 | + run: | |
| 33 | + CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}') |
| 34 | + echo "capitalized_flavor=$CAPITALIZED_FLAVOR" >> $GITHUB_OUTPUT |
| 35 | +
|
| 36 | + - name: Prepare the app with Hermes V1 |
| 37 | + uses: ./.github/actions/prepare-hermes-v1-app |
| 38 | + with: |
| 39 | + retry-count: ${{ inputs.retry-count }} |
| 40 | + |
| 41 | + - name: Setup xcode |
| 42 | + uses: maxim-lobanov/setup-xcode@v1 |
| 43 | + with: |
| 44 | + xcode-version: 16.4.0 |
| 45 | + |
| 46 | + - name: Build iOS with retry |
| 47 | + uses: nick-fields/retry@v3 |
| 48 | + with: |
| 49 | + timeout_minutes: 45 |
| 50 | + max_attempts: ${{ inputs.retry-count }} |
| 51 | + retry_wait_seconds: 30 |
| 52 | + shell: bash |
| 53 | + command: | |
| 54 | + cd /tmp/RNApp/ios |
| 55 | + bundle install |
| 56 | + RCT_HERMES_V1_ENABLED=1 bundle exec pod install |
| 57 | + xcodebuild build \ |
| 58 | + -workspace "RNApp.xcworkspace" \ |
| 59 | + -scheme "RNApp" \ |
| 60 | + -configuration "${{ steps.prepare-flavor.outputs.capitalized_flavor }}" \ |
| 61 | + -sdk "iphonesimulator" \ |
| 62 | + -destination "generic/platform=iOS Simulator" \ |
| 63 | + -derivedDataPath "/tmp/RNApp" \ |
| 64 | + -quiet |
| 65 | + on_retry_command: | |
| 66 | + echo "Cleaning up for iOS retry..." |
| 67 | + cd /tmp/RNApp/ios |
| 68 | + rm -rf Pods Podfile.lock build |
| 69 | + rm -rf ~/Library/Developer/Xcode/DerivedData/* || true |
| 70 | +
|
| 71 | + - name: Run E2E Tests |
| 72 | + uses: ./.github/actions/maestro-ios |
| 73 | + with: |
| 74 | + app-path: "/tmp/RNApp/Build/Products/${{ steps.prepare-flavor.outputs.capitalized_flavor }}-iphonesimulator/RNApp.app" |
| 75 | + app-id: org.reactjs.native.example.RNApp |
| 76 | + maestro-flow: ./scripts/e2e/.maestro/ |
| 77 | + flavor: ${{ steps.prepare-flavor.outputs.capitalized_flavor }} |
| 78 | + working-directory: /tmp/RNApp |
0 commit comments