Skip to content

Commit ff1fe1d

Browse files
committed
Prefer private simulator boot in CI paths
1 parent 562cf6f commit ff1fe1d

3 files changed

Lines changed: 26 additions & 28 deletions

File tree

.github/workflows/simdeck-provider.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,6 @@ jobs:
178178
raise SystemExit("No available iOS simulator")
179179
')"
180180
181-
xcrun simctl boot "$ios_udid" || true
182-
if ! run_with_timeout 180 xcrun simctl bootstatus "$ios_udid" -b; then
183-
echo "simctl bootstatus timed out"
184-
xcrun simctl list devices "$ios_udid" || true
185-
exit 1
186-
fi
187-
188181
dump_logs() {
189182
echo "--- simdeck.log ---"
190183
cat simdeck.log || true
@@ -233,6 +226,12 @@ jobs:
233226
: > simdeck.log
234227
simdeck_pid=""
235228
start_simdeck_server
229+
./build/simdeck --server-url http://127.0.0.1:4310 boot "$ios_udid"
230+
if ! run_with_timeout 180 xcrun simctl bootstatus "$ios_udid" -b; then
231+
echo "simctl bootstatus timed out"
232+
xcrun simctl list devices "$ios_udid" || true
233+
exit 1
234+
fi
236235
echo "Skipping private stream prewarm; the first browser WebRTC connection will attach the stream."
237236
238237
provider_base_url="$SIMDECK_CLOUD_URL/simulator/$PREVIEW_ID"

cli/XCWPrivateSimulatorBooter.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ + (BOOL)bootDeviceWithUDID:(NSString *)udid error:(NSError * _Nullable __autorel
219219
booted = ((BOOL(*)(id, SEL, id, NSError **))objc_msgSend)(
220220
targetDevice,
221221
bootWithOptionsSelector,
222-
@{ @"persist": @YES },
222+
// Keep the boot session owned by SimDeck's daemon instead of asking
223+
// CoreSimulator for a persistent GUI-visible session.
224+
@{ @"persist": @NO },
223225
&bootError
224226
);
225227
} else {

scripts/integration/js-api.mjs

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,25 @@ async function main() {
9191
`created ${simulatorUDID} (${deviceType.name}, ${runtime.version}; iphonesimulator SDK ${sdkVersion})`,
9292
);
9393

94+
session = await measuredStep(
95+
"simdeck/test isolated connect",
96+
() =>
97+
connect({
98+
cliPath: simdeck,
99+
projectRoot: root,
100+
isolated: true,
101+
videoCodec: "software",
102+
}),
103+
{ phase: phaseSetup },
104+
);
105+
console.log(`daemon ${session.endpoint}`);
106+
94107
await measuredStep(
95-
"boot simulator",
108+
"JS boot simulator",
96109
() =>
97-
retrySync(
98-
() =>
99-
runText("xcrun", ["simctl", "boot", simulatorUDID], {
100-
timeoutMs: 180_000,
101-
}),
102-
"boot simulator",
110+
retryAsync(
111+
() => session.boot(simulatorUDID),
112+
"JS boot simulator",
103113
3,
104114
3_000,
105115
),
@@ -123,19 +133,6 @@ async function main() {
123133
{ phase: phaseSetup },
124134
);
125135

126-
session = await measuredStep(
127-
"simdeck/test isolated connect",
128-
() =>
129-
connect({
130-
cliPath: simdeck,
131-
projectRoot: root,
132-
isolated: true,
133-
videoCodec: "software",
134-
}),
135-
{ phase: phaseSetup },
136-
);
137-
console.log(`daemon ${session.endpoint}`);
138-
139136
await measuredStep(
140137
"JS install fixture",
141138
async () => {

0 commit comments

Comments
 (0)