From 0f12c86ead7eb59550d5b1c9f6e5f53921135b58 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 27 Oct 2025 10:13:16 +0000 Subject: [PATCH] [iOS][CI] Bump Machines to macos-15 --- .github/actions/setup-xcode/action.yml | 22 ++++++++++++ .../actions/test-ios-helloworld/action.yml | 2 ++ .github/actions/test-ios-rntester/action.yml | 2 ++ .github/workflow-scripts/maestro-ios.js | 2 +- .github/workflows/bump-podfile-lock.yml | 2 +- .github/workflows/prebuild-ios-core.yml | 6 ++-- .../workflows/prebuild-ios-dependencies.yml | 36 ++++++++----------- .github/workflows/test-all.yml | 16 +++++---- 8 files changed, 56 insertions(+), 32 deletions(-) diff --git a/.github/actions/setup-xcode/action.yml b/.github/actions/setup-xcode/action.yml index c0ae6ceccea7..801c4750085a 100644 --- a/.github/actions/setup-xcode/action.yml +++ b/.github/actions/setup-xcode/action.yml @@ -5,6 +5,10 @@ inputs: description: 'The xcode version to use' required: false default: '16.2.0' + platform: + description: 'The platform to use. Valid values are: ios, ios-simulator, macos, mac-catalyst, tvos, tvos-simulator, xros, xros-simulator' + required: false + default: 'macos' runs: using: "composite" steps: @@ -12,3 +16,21 @@ runs: uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd with: xcode-version: ${{ inputs.xcode-version }} + - name: Setup Platform ${{ inputs.platform }} + if: ${{ inputs.platform != 'macos' && inputs.platform != 'mac-catalyst' }} + shell: bash + run: | + # https://github.com/actions/runner-images/issues/12541 + sudo xcodebuild -runFirstLaunch + sudo xcrun simctl list + + # Install platform based on the platform + if [[ "${{ inputs.platform }}" == "xros" || "${{ inputs.platform }}" == "xros-simulator" ]]; then + sudo xcodebuild -downloadPlatform visionOS + elif [[ "${{ inputs.platform }}" == "tvos" || "${{ inputs.platform }}" == "tvos-simulator" ]]; then + sudo xcodebuild -downloadPlatform tvOS + else + sudo xcodebuild -downloadPlatform iOS + fi + + sudo xcodebuild -runFirstLaunch diff --git a/.github/actions/test-ios-helloworld/action.yml b/.github/actions/test-ios-helloworld/action.yml index 0f9461013350..98bcc860f278 100644 --- a/.github/actions/test-ios-helloworld/action.yml +++ b/.github/actions/test-ios-helloworld/action.yml @@ -15,6 +15,8 @@ runs: steps: - name: Setup xcode uses: ./.github/actions/setup-xcode + with: + platform: ios - name: Setup node.js uses: ./.github/actions/setup-node - name: Run yarn install diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index 918504c6df0a..d014e428699d 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -23,6 +23,8 @@ runs: steps: - name: Setup xcode uses: ./.github/actions/setup-xcode + with: + platform: ios - name: Setup node.js uses: ./.github/actions/setup-node - name: Run yarn diff --git a/.github/workflow-scripts/maestro-ios.js b/.github/workflow-scripts/maestro-ios.js index ca9b546cd17b..bad5f8a35248 100644 --- a/.github/workflow-scripts/maestro-ios.js +++ b/.github/workflow-scripts/maestro-ios.js @@ -162,7 +162,7 @@ async function main() { console.info(`WORKING_DIRECTORY: ${WORKING_DIRECTORY}`); console.info('==============================\n'); - const simulatorName = 'iPhone 15 Pro'; + const simulatorName = 'iPhone 16 Pro'; launchSimulator(simulatorName); installAppOnSimulator(APP_PATH); const udid = extractSimulatorUDID(); diff --git a/.github/workflows/bump-podfile-lock.yml b/.github/workflows/bump-podfile-lock.yml index 80b726edfd53..8bd70421f273 100644 --- a/.github/workflows/bump-podfile-lock.yml +++ b/.github/workflows/bump-podfile-lock.yml @@ -21,7 +21,7 @@ jobs: - name: Setup xcode uses: ./.github/actions/setup-xcode with: - xcode-version: '16.2.0' + platform: 'ios' - name: Extract branch name run: | TAG="${{ github.ref_name }}"; diff --git a/.github/workflows/prebuild-ios-core.yml b/.github/workflows/prebuild-ios-core.yml index 340cd7098d11..5a1817608632 100644 --- a/.github/workflows/prebuild-ios-core.yml +++ b/.github/workflows/prebuild-ios-core.yml @@ -11,7 +11,7 @@ on: jobs: build-rn-slice: - runs-on: macos-14 + runs-on: macos-15 strategy: fail-fast: false matrix: @@ -37,7 +37,7 @@ jobs: if: steps.restore-ios-slice.outputs.cache-hit != 'true' uses: ./.github/actions/setup-xcode with: - xcode-version: '16.2.0' + platform: ${{ matrix.slice }} - name: Yarn Install if: steps.restore-ios-slice.outputs.cache-hit != 'true' uses: ./.github/actions/yarn-install @@ -109,7 +109,7 @@ jobs: packages/react-native/.build/headers compose-xcframework: - runs-on: macos-14 + runs-on: macos-15 needs: [build-rn-slice] strategy: fail-fast: false diff --git a/.github/workflows/prebuild-ios-dependencies.yml b/.github/workflows/prebuild-ios-dependencies.yml index 70ca3fe2a5c7..212c2a522df9 100644 --- a/.github/workflows/prebuild-ios-dependencies.yml +++ b/.github/workflows/prebuild-ios-dependencies.yml @@ -7,7 +7,7 @@ on: jobs: prepare_workspace: name: Prepare workspace - runs-on: macos-14 + runs-on: macos-15 steps: - name: Checkout uses: actions/checkout@v4 @@ -18,7 +18,7 @@ jobs: uses: actions/cache/restore@v4 with: path: packages/react-native/third-party/ - key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} enableCrossOsArchive: true - name: Yarn Install if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true' @@ -40,13 +40,13 @@ jobs: uses: actions/cache/save@v4 if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode with: - key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} enableCrossOsArchive: true path: packages/react-native/third-party/ build-apple-slices: name: Build Apple Slice - runs-on: macos-14 + runs-on: macos-15 needs: [prepare_workspace] strategy: fail-fast: false @@ -65,16 +65,17 @@ jobs: uses: actions/checkout@v4 - name: Setup node.js uses: ./.github/actions/setup-node - - name: Setup xcode - uses: ./.github/actions/setup-xcode - with: - xcode-version: '16.1' - name: Restore slice folder id: restore-slice-folder uses: actions/cache/restore@v4 with: path: packages/react-native/third-party/.build/Build/Products - key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + - name: Setup xcode + if: steps.restore-slice-folder.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-xcode + with: + platform: ${{ matrix.slice }} - name: Yarn Install if: steps.restore-slice-folder.outputs.cache-hit != 'true' uses: ./.github/actions/yarn-install @@ -85,15 +86,8 @@ jobs: name: ios-prebuilds-workspace path: packages/react-native/third-party/ - name: Print third-party folder structure + if: steps.restore-slice-folder.outputs.cache-hit != 'true' run: ls -lR packages/react-native/third-party - - name: Install VisionOS - if: ${{ steps.restore-slice-folder.outputs.cache-hit != 'true' && (matrix.slice == 'xros' || matrix.slice == 'xros-simulator') }} - run: | - # https://github.com/actions/runner-images/issues/10559 - sudo xcodebuild -runFirstLaunch - sudo xcrun simctl list - sudo xcodebuild -downloadPlatform visionOS - sudo xcodebuild -runFirstLaunch - name: Build slice ${{ matrix.slice }} for ${{ matrix.flavor }} if: steps.restore-slice-folder.outputs.cache-hit != 'true' run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }} @@ -107,14 +101,14 @@ jobs: uses: actions/cache/save@v4 if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode with: - key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} enableCrossOsArchive: true path: | packages/react-native/third-party/.build/Build/Products create-xcframework: name: Prepare XCFramework - runs-on: macos-14 + runs-on: macos-15 needs: [build-apple-slices] strategy: fail-fast: false @@ -138,7 +132,7 @@ jobs: with: path: | packages/react-native/third-party/ - key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + key: v3-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} # If cache hit, we already have our binary. We don't need to do anything. - name: Yarn Install if: steps.restore-xcframework.outputs.cache-hit != 'true' @@ -200,4 +194,4 @@ jobs: path: | packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz - key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} + key: v3-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }} diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index a8c33b3b5dc0..7114dbef8298 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -46,7 +46,7 @@ jobs: needs: [prebuild_apple_dependencies] test_ios_rntester_ruby_3_2_0: - runs-on: macos-14 + runs-on: macos-15 needs: [prebuild_apple_dependencies, prebuild_react_native_core] steps: @@ -59,7 +59,7 @@ jobs: flavor: Debug test_ios_rntester: - runs-on: macos-14-large + runs-on: macos-15-large needs: [prebuild_apple_dependencies, prebuild_react_native_core] continue-on-error: true @@ -78,7 +78,7 @@ jobs: flavor: ${{ matrix.flavor }} test_e2e_ios_rntester: - runs-on: macos-14-large + runs-on: macos-15-large needs: [test_ios_rntester] strategy: @@ -99,6 +99,8 @@ jobs: run: ls -lR /tmp/RNTesterBuild - name: Setup xcode uses: ./.github/actions/setup-xcode + with: + platform: ios - name: Run E2E Tests uses: ./.github/actions/maestro-ios with: @@ -108,7 +110,7 @@ jobs: flavor: ${{ matrix.flavor }} test_e2e_ios_templateapp: - runs-on: macos-14-large + runs-on: macos-15-large needs: [build_npm_package, prebuild_apple_dependencies] strategy: fail-fast: false @@ -119,6 +121,8 @@ jobs: uses: actions/checkout@v4 - name: Setup xcode uses: ./.github/actions/setup-xcode + with: + platform: ios - name: Setup node.js uses: ./.github/actions/setup-node - name: Run yarn @@ -418,7 +422,7 @@ jobs: compression-level: 0 test_ios_helloworld_with_ruby_3_2_0: - runs-on: macos-14 + runs-on: macos-15 needs: [prebuild_apple_dependencies, prebuild_react_native_core] env: PROJECT_NAME: iOSTemplateProject @@ -432,7 +436,7 @@ jobs: flavor: Debug test_ios_helloworld: - runs-on: macos-14 + runs-on: macos-15 needs: [prebuild_apple_dependencies, prebuild_react_native_core] strategy: matrix: