Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,27 @@ steps:
xcrun xcode-select --print-path
xcodebuild -version
sudo xcodebuild -license accept
sudo xcodebuild -downloadPlatform iOS
# if we're using Xcode 26.0[.?], then explicitly install the iOS 26.0 simulator (the iOS 26.0.1 simulator doesn't work for us)
# also install the universal simulator version, so that this bot can run x64 apps in the simulator.
if [[ "$(REQUIRED_XCODE)" =~ ^26[.]0.*$ ]]; then
if ! sudo xcodebuild -downloadPlatform iOS -architectureVariant universal -buildVersion 26.0; then
echo "Failed to install simulator runtime, deleting all simulator runtimes and trying again..."
sudo xcrun simctl runtime delete all
# simulator runtimes are deleted asynchronously, so wait until they're all gone (but max 60 seconds)
for i in $(seq 1 60); do
sleep 1
C=$(xcrun simctl runtime list -j | jq '. | length')
if [[ $C == 0 ]]; then
echo " still $C simulators left..."
break
Comment on lines +100 to +101

Copilot AI Oct 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition logic is inverted. The message 'still $C simulators left...' is printed when C equals 0 (no simulators remaining), but it should be printed when C is greater than 0. The break statement should execute when C equals 0, and the echo should execute when C is greater than 0.

Suggested change
echo " still $C simulators left..."
break
break
else
echo " still $C simulators left..."

Copilot uses AI. Check for mistakes.
fi
done
echo "Re-trying simulator runtime installation"
sudo xcodebuild -downloadPlatform iOS -architectureVariant universal -buildVersion 26.0
fi
else
sudo xcodebuild -downloadPlatform iOS -architectureVariant universal
fi
sudo xcodebuild -runFirstLaunch
displayName: Select Xcode Version
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
Expand Down