Skip to content

Commit 0f12c86

Browse files
committed
[iOS][CI] Bump Machines to macos-15
1 parent 59affc3 commit 0f12c86

File tree

8 files changed

+56
-32
lines changed

8 files changed

+56
-32
lines changed

.github/actions/setup-xcode/action.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,32 @@ inputs:
55
description: 'The xcode version to use'
66
required: false
77
default: '16.2.0'
8+
platform:
9+
description: 'The platform to use. Valid values are: ios, ios-simulator, macos, mac-catalyst, tvos, tvos-simulator, xros, xros-simulator'
10+
required: false
11+
default: 'macos'
812
runs:
913
using: "composite"
1014
steps:
1115
- name: Setup xcode
1216
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
1317
with:
1418
xcode-version: ${{ inputs.xcode-version }}
19+
- name: Setup Platform ${{ inputs.platform }}
20+
if: ${{ inputs.platform != 'macos' && inputs.platform != 'mac-catalyst' }}
21+
shell: bash
22+
run: |
23+
# https://github.com/actions/runner-images/issues/12541
24+
sudo xcodebuild -runFirstLaunch
25+
sudo xcrun simctl list
26+
27+
# Install platform based on the platform
28+
if [[ "${{ inputs.platform }}" == "xros" || "${{ inputs.platform }}" == "xros-simulator" ]]; then
29+
sudo xcodebuild -downloadPlatform visionOS
30+
elif [[ "${{ inputs.platform }}" == "tvos" || "${{ inputs.platform }}" == "tvos-simulator" ]]; then
31+
sudo xcodebuild -downloadPlatform tvOS
32+
else
33+
sudo xcodebuild -downloadPlatform iOS
34+
fi
35+
36+
sudo xcodebuild -runFirstLaunch

.github/actions/test-ios-helloworld/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ runs:
1515
steps:
1616
- name: Setup xcode
1717
uses: ./.github/actions/setup-xcode
18+
with:
19+
platform: ios
1820
- name: Setup node.js
1921
uses: ./.github/actions/setup-node
2022
- name: Run yarn install

.github/actions/test-ios-rntester/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ runs:
2323
steps:
2424
- name: Setup xcode
2525
uses: ./.github/actions/setup-xcode
26+
with:
27+
platform: ios
2628
- name: Setup node.js
2729
uses: ./.github/actions/setup-node
2830
- name: Run yarn

.github/workflow-scripts/maestro-ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async function main() {
162162
console.info(`WORKING_DIRECTORY: ${WORKING_DIRECTORY}`);
163163
console.info('==============================\n');
164164

165-
const simulatorName = 'iPhone 15 Pro';
165+
const simulatorName = 'iPhone 16 Pro';
166166
launchSimulator(simulatorName);
167167
installAppOnSimulator(APP_PATH);
168168
const udid = extractSimulatorUDID();

.github/workflows/bump-podfile-lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup xcode
2222
uses: ./.github/actions/setup-xcode
2323
with:
24-
xcode-version: '16.2.0'
24+
platform: 'ios'
2525
- name: Extract branch name
2626
run: |
2727
TAG="${{ github.ref_name }}";

.github/workflows/prebuild-ios-core.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build-rn-slice:
14-
runs-on: macos-14
14+
runs-on: macos-15
1515
strategy:
1616
fail-fast: false
1717
matrix:
@@ -37,7 +37,7 @@ jobs:
3737
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
3838
uses: ./.github/actions/setup-xcode
3939
with:
40-
xcode-version: '16.2.0'
40+
platform: ${{ matrix.slice }}
4141
- name: Yarn Install
4242
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
4343
uses: ./.github/actions/yarn-install
@@ -109,7 +109,7 @@ jobs:
109109
packages/react-native/.build/headers
110110
111111
compose-xcframework:
112-
runs-on: macos-14
112+
runs-on: macos-15
113113
needs: [build-rn-slice]
114114
strategy:
115115
fail-fast: false

.github/workflows/prebuild-ios-dependencies.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
prepare_workspace:
99
name: Prepare workspace
10-
runs-on: macos-14
10+
runs-on: macos-15
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/cache/restore@v4
1919
with:
2020
path: packages/react-native/third-party/
21-
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
21+
key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
2222
enableCrossOsArchive: true
2323
- name: Yarn Install
2424
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
@@ -40,13 +40,13 @@ jobs:
4040
uses: actions/cache/save@v4
4141
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
4242
with:
43-
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
43+
key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
4444
enableCrossOsArchive: true
4545
path: packages/react-native/third-party/
4646

4747
build-apple-slices:
4848
name: Build Apple Slice
49-
runs-on: macos-14
49+
runs-on: macos-15
5050
needs: [prepare_workspace]
5151
strategy:
5252
fail-fast: false
@@ -65,16 +65,17 @@ jobs:
6565
uses: actions/checkout@v4
6666
- name: Setup node.js
6767
uses: ./.github/actions/setup-node
68-
- name: Setup xcode
69-
uses: ./.github/actions/setup-xcode
70-
with:
71-
xcode-version: '16.1'
7268
- name: Restore slice folder
7369
id: restore-slice-folder
7470
uses: actions/cache/restore@v4
7571
with:
7672
path: packages/react-native/third-party/.build/Build/Products
77-
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
73+
key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
74+
- name: Setup xcode
75+
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
76+
uses: ./.github/actions/setup-xcode
77+
with:
78+
platform: ${{ matrix.slice }}
7879
- name: Yarn Install
7980
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
8081
uses: ./.github/actions/yarn-install
@@ -85,15 +86,8 @@ jobs:
8586
name: ios-prebuilds-workspace
8687
path: packages/react-native/third-party/
8788
- name: Print third-party folder structure
89+
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
8890
run: ls -lR packages/react-native/third-party
89-
- name: Install VisionOS
90-
if: ${{ steps.restore-slice-folder.outputs.cache-hit != 'true' && (matrix.slice == 'xros' || matrix.slice == 'xros-simulator') }}
91-
run: |
92-
# https://github.com/actions/runner-images/issues/10559
93-
sudo xcodebuild -runFirstLaunch
94-
sudo xcrun simctl list
95-
sudo xcodebuild -downloadPlatform visionOS
96-
sudo xcodebuild -runFirstLaunch
9791
- name: Build slice ${{ matrix.slice }} for ${{ matrix.flavor }}
9892
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
9993
run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }}
@@ -107,14 +101,14 @@ jobs:
107101
uses: actions/cache/save@v4
108102
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
109103
with:
110-
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
104+
key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
111105
enableCrossOsArchive: true
112106
path: |
113107
packages/react-native/third-party/.build/Build/Products
114108
115109
create-xcframework:
116110
name: Prepare XCFramework
117-
runs-on: macos-14
111+
runs-on: macos-15
118112
needs: [build-apple-slices]
119113
strategy:
120114
fail-fast: false
@@ -138,7 +132,7 @@ jobs:
138132
with:
139133
path: |
140134
packages/react-native/third-party/
141-
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
135+
key: v3-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
142136
# If cache hit, we already have our binary. We don't need to do anything.
143137
- name: Yarn Install
144138
if: steps.restore-xcframework.outputs.cache-hit != 'true'
@@ -200,4 +194,4 @@ jobs:
200194
path: |
201195
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
202196
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
203-
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
197+
key: v3-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}

.github/workflows/test-all.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
needs: [prebuild_apple_dependencies]
4747

4848
test_ios_rntester_ruby_3_2_0:
49-
runs-on: macos-14
49+
runs-on: macos-15
5050
needs:
5151
[prebuild_apple_dependencies, prebuild_react_native_core]
5252
steps:
@@ -59,7 +59,7 @@ jobs:
5959
flavor: Debug
6060

6161
test_ios_rntester:
62-
runs-on: macos-14-large
62+
runs-on: macos-15-large
6363
needs:
6464
[prebuild_apple_dependencies, prebuild_react_native_core]
6565
continue-on-error: true
@@ -78,7 +78,7 @@ jobs:
7878
flavor: ${{ matrix.flavor }}
7979

8080
test_e2e_ios_rntester:
81-
runs-on: macos-14-large
81+
runs-on: macos-15-large
8282
needs:
8383
[test_ios_rntester]
8484
strategy:
@@ -99,6 +99,8 @@ jobs:
9999
run: ls -lR /tmp/RNTesterBuild
100100
- name: Setup xcode
101101
uses: ./.github/actions/setup-xcode
102+
with:
103+
platform: ios
102104
- name: Run E2E Tests
103105
uses: ./.github/actions/maestro-ios
104106
with:
@@ -108,7 +110,7 @@ jobs:
108110
flavor: ${{ matrix.flavor }}
109111

110112
test_e2e_ios_templateapp:
111-
runs-on: macos-14-large
113+
runs-on: macos-15-large
112114
needs: [build_npm_package, prebuild_apple_dependencies]
113115
strategy:
114116
fail-fast: false
@@ -119,6 +121,8 @@ jobs:
119121
uses: actions/checkout@v4
120122
- name: Setup xcode
121123
uses: ./.github/actions/setup-xcode
124+
with:
125+
platform: ios
122126
- name: Setup node.js
123127
uses: ./.github/actions/setup-node
124128
- name: Run yarn
@@ -418,7 +422,7 @@ jobs:
418422
compression-level: 0
419423

420424
test_ios_helloworld_with_ruby_3_2_0:
421-
runs-on: macos-14
425+
runs-on: macos-15
422426
needs: [prebuild_apple_dependencies, prebuild_react_native_core]
423427
env:
424428
PROJECT_NAME: iOSTemplateProject
@@ -432,7 +436,7 @@ jobs:
432436
flavor: Debug
433437

434438
test_ios_helloworld:
435-
runs-on: macos-14
439+
runs-on: macos-15
436440
needs: [prebuild_apple_dependencies, prebuild_react_native_core]
437441
strategy:
438442
matrix:

0 commit comments

Comments
 (0)