mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
Fix Xcode simulator naming at the end of image generation (#7181)
This commit is contained in:
@@ -151,4 +151,158 @@ function Invoke-XCVersion {
|
||||
if ($result.ExitCode -ne 0) {
|
||||
throw "Command [$Command] has finished with non-zero exit code."
|
||||
}
|
||||
}
|
||||
|
||||
function Get-BrokenXcodeSimulatorsList {
|
||||
return @(
|
||||
# tvOS Simulators
|
||||
@{
|
||||
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-15-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-15-2";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-15-4";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-16-0";
|
||||
XcodeVersion = "14.2"
|
||||
},
|
||||
# watchOS-8-0 Simulators
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 5 - 40mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 5 - 44mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 6 - 40mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-40mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 6 - 44mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-44mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 7 - 41mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-41mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 7 - 45mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-45mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
|
||||
XcodeVersion = "13.1"
|
||||
},
|
||||
# watchOS-8-3 Simulators
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 5 - 40mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 5 - 44mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 6 - 40mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-40mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 6 - 44mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-44mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 7 - 41mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-41mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 7 - 45mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-45mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
|
||||
XcodeVersion = "13.2.1"
|
||||
},
|
||||
# watchOS-8-5 Simulators
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 5 - 40mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 5 - 44mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 6 - 40mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-40mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 6 - 44mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-44mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 7 - 41mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-41mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch Series 7 - 45mm"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-45mm";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
|
||||
XcodeVersion = "13.4.1"
|
||||
},
|
||||
# watchOS-9-0 Simulators
|
||||
@{
|
||||
SimulatorName = "Apple Watch SE (40mm) (2nd generation)"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-SE-40mm-2nd-generation";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-9-0";
|
||||
XcodeVersion = "14.2"
|
||||
},
|
||||
@{
|
||||
SimulatorName = "Apple Watch SE (44mm) (2nd generation)"
|
||||
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-SE-44mm-2nd-generation";
|
||||
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-9-0";
|
||||
XcodeVersion = "14.2"
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -160,6 +160,22 @@ function Invoke-XcodeRunFirstLaunch {
|
||||
Invoke-ValidateCommand "sudo $xcodeRootPath -runFirstLaunch"
|
||||
}
|
||||
|
||||
function Install-AdditionalSimulatorRuntimes {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$Version
|
||||
)
|
||||
|
||||
if (-not $Version.StartsWith("14.")) {
|
||||
# Additional simulator runtimes are included by default for Xcode < 14
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Installing Simulator Runtimes for Xcode $($_.link) ..."
|
||||
$xcodebuildPath = Get-XcodeToolPath -Version $Version -ToolName "xcodebuild"
|
||||
Invoke-ValidateCommand "$xcodebuildPath -downloadAllPlatforms"
|
||||
}
|
||||
|
||||
function Build-XcodeSymlinks {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
|
||||
Reference in New Issue
Block a user