Skip to content

Commit a20d93d

Browse files
abueideclaude
andcommitted
fix(ci): pin Xcode 26.2 and iOS runtime 26.2 for stable CI
The macos-26 runner's Xcode_26.4.0.app is a beta build whose name doesn't contain "beta", so the previous grep-based selection picked it. Pin to Xcode 26.2 (stable, default on runner) with pre-installed iOS 26.2 runtime. Also adds IOS_DEVICES=max to PR checks to avoid syncing min device (iOS 15.4) on macos-26, and fixes stderr capture in ios_ensure_device_from_definition that silently swallowed runtime download attempts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a82a7c4 commit a20d93d

9 files changed

Lines changed: 68 additions & 47 deletions

File tree

.github/workflows/e2e-full.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@ jobs:
9494
steps:
9595
- uses: actions/checkout@v6
9696

97+
- name: Select pinned Xcode (max only)
98+
if: matrix.device == 'max'
99+
run: |
100+
# Pin to stable Xcode version (26.2 = default on macos-26 runner)
101+
XCODE_VERSION="26.2"
102+
XCODE_APP=$(ls -d /Applications/Xcode_${XCODE_VERSION}*.app 2>/dev/null | head -1)
103+
if [ -z "$XCODE_APP" ]; then
104+
XCODE_APP="/Applications/Xcode.app"
105+
fi
106+
echo "Selecting: $XCODE_APP"
107+
sudo xcode-select -s "$XCODE_APP/Contents/Developer"
108+
xcodebuild -version
109+
xcrun simctl list runtimes | grep -i ios
110+
97111
- name: Setup CocoaPods cache
98112
uses: actions/cache@v4
99113
with:
@@ -175,6 +189,20 @@ jobs:
175189
cache: 'npm'
176190
cache-dependency-path: examples/react-native/package-lock.json
177191

192+
- name: Select pinned Xcode (iOS max only)
193+
if: matrix.platform == 'ios' && matrix.device == 'max'
194+
run: |
195+
# Pin to stable Xcode version (26.2 = default on macos-26 runner)
196+
XCODE_VERSION="26.2"
197+
XCODE_APP=$(ls -d /Applications/Xcode_${XCODE_VERSION}*.app 2>/dev/null | head -1)
198+
if [ -z "$XCODE_APP" ]; then
199+
XCODE_APP="/Applications/Xcode.app"
200+
fi
201+
echo "Selecting: $XCODE_APP"
202+
sudo xcode-select -s "$XCODE_APP/Contents/Developer"
203+
xcodebuild -version
204+
xcrun simctl list runtimes | grep -i ios
205+
178206
- name: Enable KVM (Android only)
179207
if: matrix.platform == 'android'
180208
run: |

.github/workflows/pr-checks.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,18 @@ jobs:
103103
steps:
104104
- uses: actions/checkout@v6
105105

106-
- name: Select stable Xcode
106+
- name: Select pinned Xcode
107107
run: |
108-
STABLE=$(ls -d /Applications/Xcode_*.app 2>/dev/null | grep -v beta | sort -V | tail -1)
109-
if [ -z "$STABLE" ]; then
110-
STABLE=$(ls -d /Applications/Xcode.app 2>/dev/null || true)
111-
fi
112-
if [ -n "$STABLE" ]; then
113-
echo "Selecting: $STABLE"
114-
sudo xcode-select -s "$STABLE/Contents/Developer"
108+
# Pin to stable Xcode version (26.2 = default on macos-26 runner)
109+
XCODE_VERSION="26.2"
110+
XCODE_APP=$(ls -d /Applications/Xcode_${XCODE_VERSION}*.app 2>/dev/null | head -1)
111+
if [ -z "$XCODE_APP" ]; then
112+
XCODE_APP="/Applications/Xcode.app"
115113
fi
114+
echo "Selecting: $XCODE_APP"
115+
sudo xcode-select -s "$XCODE_APP/Contents/Developer"
116116
xcodebuild -version
117-
xcrun --sdk iphonesimulator --show-sdk-version
117+
xcrun simctl list runtimes | grep -i ios
118118
119119
- name: Setup CocoaPods cache
120120
uses: actions/cache@v4
@@ -147,7 +147,7 @@ jobs:
147147
TEST_TIMEOUT: 300
148148
IOS_DEFAULT_DEVICE: max
149149
TEST_TUI: false
150-
run: devbox run --pure -e SIM_HEADLESS=1 test:e2e
150+
run: devbox run --pure -e SIM_HEADLESS=1 -e IOS_DEVICES=max test:e2e
151151

152152
- name: Upload reports and logs
153153
if: always()
@@ -206,19 +206,19 @@ jobs:
206206
restore-keys: |
207207
${{ runner.os }}-gradle-
208208
209-
- name: Select stable Xcode (iOS only)
209+
- name: Select pinned Xcode (iOS only)
210210
if: matrix.platform == 'ios'
211211
run: |
212-
STABLE=$(ls -d /Applications/Xcode_*.app 2>/dev/null | grep -v beta | sort -V | tail -1)
213-
if [ -z "$STABLE" ]; then
214-
STABLE=$(ls -d /Applications/Xcode.app 2>/dev/null || true)
215-
fi
216-
if [ -n "$STABLE" ]; then
217-
echo "Selecting: $STABLE"
218-
sudo xcode-select -s "$STABLE/Contents/Developer"
212+
# Pin to stable Xcode version (26.2 = default on macos-26 runner)
213+
XCODE_VERSION="26.2"
214+
XCODE_APP=$(ls -d /Applications/Xcode_${XCODE_VERSION}*.app 2>/dev/null | head -1)
215+
if [ -z "$XCODE_APP" ]; then
216+
XCODE_APP="/Applications/Xcode.app"
219217
fi
218+
echo "Selecting: $XCODE_APP"
219+
sudo xcode-select -s "$XCODE_APP/Contents/Developer"
220220
xcodebuild -version
221-
xcrun --sdk iphonesimulator --show-sdk-version
221+
xcrun simctl list runtimes | grep -i ios
222222
223223
- name: Setup CocoaPods cache (iOS only)
224224
if: matrix.platform == 'ios'
@@ -261,7 +261,7 @@ jobs:
261261
if [ "${{ matrix.platform }}" = "android" ]; then
262262
devbox run --pure -e IOS_SKIP_SETUP=1 -e EMU_HEADLESS=1 -e ANDROID_DEVICES=max test:e2e:android
263263
elif [ "${{ matrix.platform }}" = "ios" ]; then
264-
devbox run --pure -e ANDROID_SKIP_SETUP=1 -e SIM_HEADLESS=1 test:e2e:ios
264+
devbox run --pure -e ANDROID_SKIP_SETUP=1 -e SIM_HEADLESS=1 -e IOS_DEVICES=max test:e2e:ios
265265
elif [ "${{ matrix.platform }}" = "web" ]; then
266266
devbox run --pure -e ANDROID_SKIP_SETUP=1 -e IOS_SKIP_SETUP=1 test:e2e:web
267267
fi
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"devices": [
33
{
4-
"name": "iPhone 13",
5-
"runtime": "15.4"
4+
"name": "iPhone 17",
5+
"runtime": "26.2"
66
},
77
{
8-
"name": "iPhone 17",
9-
"runtime": "26.3"
8+
"name": "iPhone 13",
9+
"runtime": "15.4"
1010
}
1111
],
12-
"checksum": "54ab6a585049437d6dc6dc378751ae46e406ce2e5c147452b7f52cfe0910bc4f"
12+
"checksum": "4d5276f203d7ad62860bfc067f76194df53be449d4aa8a3b2d069855ec1f3232"
1313
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "iPhone 17",
3-
"runtime": "26.3"
3+
"runtime": "26.2"
44
}

examples/react-native/devbox.d/android/devices/devices.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"devices": [
3-
{
4-
"name": "pixel_api21",
5-
"api": 21,
6-
"device": "pixel",
7-
"tag": "google_apis"
8-
},
93
{
104
"name": "medium_phone_api35",
115
"api": 35,
126
"device": "medium_phone",
137
"tag": "google_apis"
8+
},
9+
{
10+
"name": "pixel_api21",
11+
"api": 21,
12+
"device": "pixel",
13+
"tag": "google_apis"
1414
}
1515
],
1616
"checksum": "f5bfab3fdcbe8a23858954c18b1fa86d28a3316e801523aa6d4aa72ca9cf5ab7"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"devices": [
33
{
4-
"name": "iPhone 13",
5-
"runtime": "15.4"
4+
"name": "iPhone 17",
5+
"runtime": "26.2"
66
},
77
{
8-
"name": "iPhone 17",
9-
"runtime": "26.3"
8+
"name": "iPhone 13",
9+
"runtime": "15.4"
1010
}
1111
],
12-
"checksum": "54ab6a585049437d6dc6dc378751ae46e406ce2e5c147452b7f52cfe0910bc4f"
12+
"checksum": "4d5276f203d7ad62860bfc067f76194df53be449d4aa8a3b2d069855ec1f3232"
1313
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "iPhone 17",
3-
"runtime": "26.3"
3+
"runtime": "26.2"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "iPhone 17",
3-
"runtime": "26.3"
3+
"runtime": "26.2"
44
}

plugins/ios/virtenv/scripts/domain/device_manager.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,7 @@ ios_ensure_device_from_definition() {
231231
fi
232232

233233
# Resolve runtime strictly (don't fallback)
234-
choice="$(resolve_runtime_strict "$runtime" 2>&1 || true)"
235-
if [ -z "$choice" ]; then
236-
echo " ⚠ Runtime iOS $runtime not available, skipping $name"
237-
return 3
238-
fi
239-
240-
# Check if choice contains error message (resolve_runtime_strict failed)
241-
if echo "$choice" | grep -q "not found"; then
234+
if ! choice="$(resolve_runtime_strict "$runtime")"; then
242235
echo " ⚠ Runtime iOS $runtime not available, skipping $name"
243236
return 3
244237
fi

0 commit comments

Comments
 (0)