mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
[macOS] Add toolcache to the macOS 14 (#9274)
This commit is contained in:
@@ -216,7 +216,7 @@ $java = $installedSoftware.AddHeader("Java")
|
||||
$java.AddTable($(Get-JavaVersions))
|
||||
|
||||
# Toolcache
|
||||
if (-not $os.IsSonoma) {
|
||||
|
||||
$toolcache = $installedSoftware.AddHeader("Cached Tools")
|
||||
$toolcache.AddNodes($(Build-ToolcacheSection))
|
||||
|
||||
@@ -228,7 +228,7 @@ if (-not $os.IsSonoma) {
|
||||
$rust.AddToolVersion("Rustup", $(Get-RustupVersion))
|
||||
|
||||
$rustPackages = $rust.AddHeader("Packages")
|
||||
if (-not $os.IsVentura) {
|
||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||
$rustPackages.AddToolVersion("Bindgen", $(Get-Bindgen))
|
||||
$rustPackages.AddToolVersion("Cargo-audit", $(Get-Cargoaudit))
|
||||
$rustPackages.AddToolVersion("Cargo-outdated", $(Get-Cargooutdated))
|
||||
@@ -236,7 +236,6 @@ if (-not $os.IsSonoma) {
|
||||
}
|
||||
$rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion))
|
||||
$rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
|
||||
}
|
||||
|
||||
# PowerShell
|
||||
$powerShell = $installedSoftware.AddHeader("PowerShell Tools")
|
||||
|
||||
@@ -37,10 +37,14 @@ function Build-ToolcacheSection {
|
||||
|
||||
$nodes = @()
|
||||
|
||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) {
|
||||
$nodes += @(
|
||||
[ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List")
|
||||
)
|
||||
}
|
||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||
$nodes += @(
|
||||
[ToolVersionsListNode]::new("Ruby", $(Get-ToolcacheRubyVersions), '^\d+\.\d+', "List"),
|
||||
[ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List")
|
||||
[ToolVersionsListNode]::new("Ruby", $(Get-ToolcacheRubyVersions), '^\d+\.\d+', "List")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ Describe "Toolcache" {
|
||||
}
|
||||
}
|
||||
}
|
||||
Context "PyPy" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
|
||||
Context "PyPy" -Skip:($os.IsVenturaArm64 -or $os.IsSonoma) {
|
||||
$pypyDirectory = Join-Path $toolcacheDirectory "PyPy"
|
||||
$pypyPackage = $packages | Where-Object { $_.ToolName -eq "pypy" } | Select-Object -First 1
|
||||
$testCase = @{ PypyDirectory = $pypyDirectory }
|
||||
|
||||
@@ -228,6 +228,15 @@ build {
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
|
||||
scripts = [
|
||||
"${path.root}/../scripts/build/Install-Toolset.ps1",
|
||||
"${path.root}/../scripts/build/Configure-Toolset.ps1"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
|
||||
script = "${path.root}/../scripts/build/configure-xcode-simulators.rb"
|
||||
@@ -237,7 +246,8 @@ build {
|
||||
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
|
||||
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
|
||||
inline = [
|
||||
"pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}"
|
||||
"pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}",
|
||||
"pwsh -File \"${local.image_folder}/tests/RunAll-Tests.ps1\""
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -223,6 +223,15 @@ build {
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
|
||||
scripts = [
|
||||
"${path.root}/../scripts/build/Install-Toolset.ps1",
|
||||
"${path.root}/../scripts/build/Configure-Toolset.ps1"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
|
||||
script = "${path.root}/../scripts/build/configure-xcode-simulators.rb"
|
||||
@@ -232,7 +241,8 @@ build {
|
||||
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
|
||||
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
|
||||
inline = [
|
||||
"pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}"
|
||||
"pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}",
|
||||
"pwsh -File \"${local.image_folder}/tests/RunAll-Tests.ps1\""
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,78 @@
|
||||
"fastlane"
|
||||
]
|
||||
},
|
||||
"toolcache": [
|
||||
{
|
||||
"name": "Python",
|
||||
"url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json",
|
||||
"platform" : "darwin",
|
||||
"arch": {
|
||||
"x64": {
|
||||
"versions": [
|
||||
"3.11.*",
|
||||
"3.12.*"
|
||||
]
|
||||
},
|
||||
"arm64": {
|
||||
"versions": [
|
||||
"3.11.*",
|
||||
"3.12.*"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Node",
|
||||
"url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json",
|
||||
"platform" : "darwin",
|
||||
"arch": {
|
||||
"x64": {
|
||||
"versions": [
|
||||
"18.*",
|
||||
"20.*"
|
||||
]
|
||||
},
|
||||
"arm64": {
|
||||
"versions": [
|
||||
"18.*",
|
||||
"20.*"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Go",
|
||||
"url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json",
|
||||
"platform" : "darwin",
|
||||
"arch": {
|
||||
"x64": {
|
||||
"variable_template" : "GOROOT_{0}_{1}_X64",
|
||||
"versions": [
|
||||
"1.20.*",
|
||||
"1.21.*"
|
||||
]
|
||||
},
|
||||
"arm64": {
|
||||
"variable_template" : "GOROOT_{0}_{1}_ARM64",
|
||||
"versions": [
|
||||
"1.20.*",
|
||||
"1.21.*"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Ruby",
|
||||
"arch": {
|
||||
"x64": {
|
||||
"versions": [
|
||||
"3.0.*",
|
||||
"3.1.*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"go": {
|
||||
"default": "1.20"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user