From 2d3285ab603878ad46a288627027802ef7ed8ebd Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 30 Apr 2025 09:49:42 -0700 Subject: [PATCH] Bump Xcode to version 16.2 (#51014) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51014 Starting from the [24th of April](https://developer.apple.com/news/upcoming-requirements/?id=02212025a), Apple only accepts app built with Xcode 16.0 or greater This change bumps our CI to ensure that everything works with Xcode 16. ## Changelog: [Internal] - Bump CI to Xcode 16.2 Reviewed By: javache Differential Revision: D73924819 fbshipit-source-id: 82cdca5e12cee505de6e97513c07678776642d88 --- .../actions/build-hermesc-apple/action.yml | 2 ++ .github/actions/setup-xcode/action.yml | 2 +- .../actions/test-ios-helloworld/action.yml | 2 +- .github/actions/test-ios-rntester/action.yml | 2 +- .../test-library-on-nightly/action.yml | 6 +++++ .github/workflows/nightly.yml | 4 ++-- .github/workflows/publish-release.yml | 4 ++-- .github/workflows/test-all.yml | 22 ++++++++++--------- .../workflows/test-libraries-on-nightlies.yml | 2 +- 9 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/actions/build-hermesc-apple/action.yml b/.github/actions/build-hermesc-apple/action.yml index dba2cb37c1b..c4fefdce9e1 100644 --- a/.github/actions/build-hermesc-apple/action.yml +++ b/.github/actions/build-hermesc-apple/action.yml @@ -10,6 +10,8 @@ inputs: runs: using: composite steps: + - name: Setup xcode + uses: ./.github/actions/setup-xcode - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - name: Hermes apple cache diff --git a/.github/actions/setup-xcode/action.yml b/.github/actions/setup-xcode/action.yml index fea6d764701..c0ae6ceccea 100644 --- a/.github/actions/setup-xcode/action.yml +++ b/.github/actions/setup-xcode/action.yml @@ -4,7 +4,7 @@ inputs: xcode-version: description: 'The xcode version to use' required: false - default: '15.2' + default: '16.2.0' runs: using: "composite" steps: diff --git a/.github/actions/test-ios-helloworld/action.yml b/.github/actions/test-ios-helloworld/action.yml index 092c741898c..f0738b2735b 100644 --- a/.github/actions/test-ios-helloworld/action.yml +++ b/.github/actions/test-ios-helloworld/action.yml @@ -43,7 +43,7 @@ runs: - name: Run yarn uses: ./.github/actions/yarn-install - name: Setup ruby - uses: ruby/setup-ruby@v1.170.0 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ inputs.ruby-version }} - name: Download ReactNativeDependencies diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index 80123a9275d..4cb56919915 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -48,7 +48,7 @@ runs: name: hermes-darwin-bin-${{ inputs.flavor }} path: ${{ inputs.hermes-tarball-artifacts-dir }} - name: Setup ruby - uses: ruby/setup-ruby@v1.170.0 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ inputs.ruby-version }} - name: Prepare IOS Tests diff --git a/.github/actions/test-library-on-nightly/action.yml b/.github/actions/test-library-on-nightly/action.yml index f6fdaa21446..5310dae7059 100644 --- a/.github/actions/test-library-on-nightly/action.yml +++ b/.github/actions/test-library-on-nightly/action.yml @@ -21,6 +21,10 @@ runs: cd /tmp/RNApp yarn add ${{ inputs.library-npm-package }} + # iOS + - name: Setup xcode + if: ${{ inputs.platform == 'ios' }} + uses: ./.github/actions/setup-xcode - name: Build iOS shell: bash if: ${{ inputs.platform == 'ios' }} @@ -32,6 +36,8 @@ runs: -workspace RNApp.xcworkspace \ -scheme RNApp \ -sdk iphonesimulator + + # Android - name: Setup Java for Android if: ${{ inputs.platform == 'android' }} uses: actions/setup-java@v2 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b42951e258a..b52fc162169 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -40,7 +40,7 @@ jobs: hermes-version-file: ${{ env.HERMES_VERSION_FILE }} build_hermesc_apple: - runs-on: macos-13 + runs-on: macos-14 needs: prepare_hermes_workspace env: HERMES_WS_DIR: /tmp/hermes @@ -80,7 +80,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_hermes_macos: - runs-on: macos-13 + runs-on: macos-14 needs: [build_apple_slices_hermes, prepare_hermes_workspace] env: HERMES_WS_DIR: /tmp/hermes diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index be8c89f779c..2b52c3494db 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -38,7 +38,7 @@ jobs: hermes-version-file: ${{ env.HERMES_VERSION_FILE }} build_hermesc_apple: - runs-on: macos-13 + runs-on: macos-14 needs: prepare_hermes_workspace env: HERMES_WS_DIR: /tmp/hermes @@ -77,7 +77,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_hermes_macos: - runs-on: macos-13 + runs-on: macos-14 needs: [build_apple_slices_hermes, prepare_hermes_workspace] env: HERMES_WS_DIR: /tmp/hermes diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 0eb5bc98566..ae8cc58ce07 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -56,7 +56,7 @@ jobs: hermes-version-file: ${{ env.HERMES_VERSION_FILE }} build_hermesc_apple: - runs-on: macos-13 + runs-on: macos-14 needs: prepare_hermes_workspace env: HERMES_WS_DIR: /tmp/hermes @@ -96,7 +96,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_hermes_macos: - runs-on: macos-13 + runs-on: macos-14 needs: [build_apple_slices_hermes, prepare_hermes_workspace] env: HERMES_WS_DIR: /tmp/hermes @@ -121,7 +121,7 @@ jobs: secrets: inherit test_ios_rntester_ruby_3_2_0: - runs-on: macos-13 + runs-on: macos-14 needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] env: @@ -138,7 +138,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_rntester_dynamic_frameworks: - runs-on: macos-13 + runs-on: macos-14 needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] env: @@ -161,7 +161,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_rntester: - runs-on: macos-13-large + runs-on: macos-14-large needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] env: @@ -197,7 +197,7 @@ jobs: test_e2e_ios_rntester: if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }} - runs-on: macos-13-large + runs-on: macos-14-large needs: [test_ios_rntester] env: @@ -220,6 +220,8 @@ jobs: path: /tmp/RNTesterBuild/RNTester.app - name: Check downloaded folder content run: ls -lR /tmp/RNTesterBuild + - name: Setup xcode + uses: ./.github/actions/setup-xcode - name: Run E2E Tests uses: ./.github/actions/maestro-ios with: @@ -231,7 +233,7 @@ jobs: test_e2e_ios_templateapp: if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }} - runs-on: macos-13-large + runs-on: macos-14-large needs: [build_npm_package, prebuild_apple_dependencies] env: HERMES_WS_DIR: /tmp/hermes @@ -253,7 +255,7 @@ jobs: - name: Run yarn uses: ./.github/actions/yarn-install - name: Setup ruby - uses: ruby/setup-ruby@v1.170.0 + uses: ruby/setup-ruby@v1 with: ruby-version: 2.6.10 - name: Download Hermes @@ -589,7 +591,7 @@ jobs: compression-level: 0 test_ios_helloworld_with_ruby_3_2_0: - runs-on: macos-13 + runs-on: macos-14 needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs env: PROJECT_NAME: iOSTemplateProject @@ -607,7 +609,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_helloworld: - runs-on: macos-13 + runs-on: macos-14 needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs strategy: matrix: diff --git a/.github/workflows/test-libraries-on-nightlies.yml b/.github/workflows/test-libraries-on-nightlies.yml index 930fb7388ee..db008588ac9 100644 --- a/.github/workflows/test-libraries-on-nightlies.yml +++ b/.github/workflows/test-libraries-on-nightlies.yml @@ -13,7 +13,7 @@ jobs: runner-setup: runs-on: ubuntu-latest outputs: - runners: '{"ios":"macos-13-large", "android": "ubuntu-latest"}' + runners: '{"ios":"macos-14-large", "android": "ubuntu-latest"}' steps: - run: echo no-op