You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release/10.0.1xx] [system-dependencies] Check if a universal simulator is needed, and if so delete any existing non-universal simulators. (#24087)
1. We run x64 test apps on all machines.
2. Arm64 machines need a universal simulator to run x64 apps.
3. So if we're on an arm64 bot, and we only have the arm64 simulator, delete it and re-install the universal simulator.
There are also a few other misc cleanups here as well.
Backport of #24030.
Copy file name to clipboardExpand all lines: system-dependencies.sh
+75-25Lines changed: 75 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -314,6 +314,23 @@ function install_mono () {
314
314
rm -f $MONO_PKG
315
315
}
316
316
317
+
SIMULATORS_WITHOUT_X64=()
318
+
SIMULATORS_WITHOUT_X64_COUNT=0
319
+
functionget_non_universal_simulator_runtimes ()
320
+
{
321
+
local TMPFILE
322
+
TMPFILE=$(mktemp)
323
+
324
+
xcrun simctl runtime list -j --json-output="$TMPFILE"
325
+
326
+
# this json query filters the json to simulator runtimes where iOS/tvOS >= 26.0 and where x64 is *not* supported (which we need to run x64 apps in the simulator on arm64)
"$XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild" -downloadPlatform tvOS $TVOS_BUILD_VERSION2>&1| sed 's/^/ /'
414
+
415
+
exit 0
352
416
}
353
417
354
418
functiondownload_xcode_platforms ()
@@ -377,38 +441,24 @@ function download_xcode_platforms ()
377
441
$SUDO pkill -9 -f "CoreSimulator.framework"||true
378
442
if! xcodebuild_download_selected_platforms;then
379
443
log "Executing '$XCODE_DEVELOPER_ROOT/usr/bin/simctl runtime list -v"
380
-
"$XCODE_DEVELOPER_ROOT/usr/bin/simctl" runtime list -v
444
+
"$XCODE_DEVELOPER_ROOT/usr/bin/simctl" runtime list -v2>&1| sed 's/^/ /'
381
445
# Don't exit here, just hope for the best instead.
382
-
set +x
383
-
echo"##vso[task.logissue type=warning;sourcepath=system-dependencies.sh]Failed to download all simulator platforms, this may result in problems executing tests in the simulator."
384
-
set -x
446
+
(
447
+
set +x
448
+
echo"##vso[task.logissue type=warning;sourcepath=system-dependencies.sh]Failed to download all simulator platforms, this may result in problems executing tests in the simulator."
449
+
set -x
450
+
)
385
451
else
386
452
log "Executing '$XCODE_DEVELOPER_ROOT/usr/bin/simctl runtime list -v"
387
-
"$XCODE_DEVELOPER_ROOT/usr/bin/simctl" runtime list -v
453
+
"$XCODE_DEVELOPER_ROOT/usr/bin/simctl" runtime list -v2>&1| sed 's/^/ /'
388
454
log "Executing '$XCODE_DEVELOPER_ROOT/usr/bin/simctl list -v"
389
-
"$XCODE_DEVELOPER_ROOT/usr/bin/simctl" list -v
455
+
"$XCODE_DEVELOPER_ROOT/usr/bin/simctl" list -v2>&1| sed 's/^/ /'
@@ -1020,7 +1070,7 @@ function check_old_simulators ()
1020
1070
$action"The $os$version simulator is not installed. Execute ${COLOR_MAGENTA}xcodebuild -downloadPlatform $os -buildVersion $version${COLOR_RESET} to install."
1021
1071
else
1022
1072
warn "The $os$version simulator is not installed. Now executing ${COLOR_BLUE}"$XCODE_DEVELOPER_ROOT/usr/bin/xcodebuild" -downloadPlatform $os -buildVersion $version${COLOR_RESET} to install..."
0 commit comments