mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 17:18:52 +08:00
[macOS] Introduce macOS-26 base code (#13007)
This commit is contained in:
@@ -48,8 +48,8 @@ systemValuesArray=(
|
||||
"'kTCCServiceSystemPolicyNetworkVolumes','com.apple.Terminal',0,2,4,1,X'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e5465726d696e616c000000000003',NULL,0,'UNUSED',NULL,0,1678990068"
|
||||
)
|
||||
for values in "${systemValuesArray[@]}"; do
|
||||
if is_Sonoma || is_Sequoia; then
|
||||
# TCC access table in Sonoma has extra 4 columns: pid, pid_version, boot_uuid, last_reminded
|
||||
if ! is_Ventura; then
|
||||
# TCC access table in Sonoma and later has extra 4 columns: pid, pid_version, boot_uuid, last_reminded
|
||||
configure_system_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||
else
|
||||
configure_system_tccdb "$values"
|
||||
@@ -98,8 +98,8 @@ userValuesArray=(
|
||||
"'kTCCServiceUbiquity','com.apple.mail',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1551941469"
|
||||
)
|
||||
for values in "${userValuesArray[@]}"; do
|
||||
if is_Sonoma || is_Sequoia; then
|
||||
# TCC access table in Sonoma has extra 4 columns: pid, pid_version, boot_uuid, last_reminded
|
||||
if ! is_Ventura; then
|
||||
# TCC access table in Sonoma and later has extra 4 columns: pid, pid_version, boot_uuid, last_reminded
|
||||
configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||
else
|
||||
configure_user_tccdb "$values"
|
||||
|
||||
@@ -61,6 +61,7 @@ if is_SonomaX64 || is_VenturaX64 || is_SequoiaX64; then
|
||||
if is_SonomaX64; then
|
||||
osascript $HOME/utils/confirm-identified-developers-macos14.scpt $USER_PASSWORD
|
||||
fi
|
||||
|
||||
if is_SequoiaX64; then
|
||||
osascript $HOME/utils/confirm-identified-developers-macos15.scpt $USER_PASSWORD
|
||||
fi
|
||||
|
||||
@@ -37,12 +37,12 @@ $languageAndRuntime.AddNodes($(Get-ClangLLVMVersions))
|
||||
$languageAndRuntime.AddNodes($(Get-GccVersions))
|
||||
$languageAndRuntime.AddNodes($(Get-FortranVersions))
|
||||
$languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion))
|
||||
if ((-not $os.IsSequoia)) {
|
||||
if (($os.IsVentura -or $os.IsSonoma)) {
|
||||
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
|
||||
}
|
||||
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
|
||||
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
|
||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSequoiaArm64)) {
|
||||
if ((-not $os.IsArm64)) {
|
||||
$languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion))
|
||||
}
|
||||
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
|
||||
@@ -53,12 +53,12 @@ $packageManagement = $installedSoftware.AddHeader("Package Management")
|
||||
$packageManagement.AddToolVersion("Bundler", $(Get-BundlerVersion))
|
||||
$packageManagement.AddToolVersion("Carthage", $(Get-CarthageVersion))
|
||||
$packageManagement.AddToolVersion("CocoaPods", $(Get-CocoaPodsVersion))
|
||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSequoiaArm64)) {
|
||||
if ((-not $os.IsArm64)) {
|
||||
$packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion))
|
||||
}
|
||||
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
|
||||
$packageManagement.AddToolVersion("NPM", $(Get-NPMVersion))
|
||||
if ((-not $os.IsSequoia)) {
|
||||
if (($os.IsVentura -or $os.IsSonoma)) {
|
||||
$packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion))
|
||||
}
|
||||
$packageManagement.AddToolVersion("Pip3", $(Get-Pip3Version))
|
||||
@@ -116,8 +116,8 @@ $tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVer
|
||||
$tools.AddToolVersion("Xcodes", $(Get-XcodesVersion))
|
||||
|
||||
# Linters
|
||||
$linters = $installedSoftware.AddHeader("Linters")
|
||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSequoiaArm64)) {
|
||||
if ((-not $os.IsArm64)) {
|
||||
$linters = $installedSoftware.AddHeader("Linters")
|
||||
$linters.AddToolVersion("SwiftLint", $(Get-SwiftLintVersion))
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ $android.AddTable($androidTable)
|
||||
$androidEnv = $android.AddHeader("Environment variables")
|
||||
$androidEnv.AddTable($(Build-AndroidEnvironmentTable))
|
||||
|
||||
if ($os.IsSonoma -or $os.IsVentura -or $os.IsSequoiaX64) {
|
||||
if ($os.IsSonoma -or $os.IsVentura -or (-not $os.IsArm64)) {
|
||||
$miscellaneous = $installedSoftware.AddHeader("Miscellaneous")
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ if ($os.IsSonoma -or $os.IsVentura) {
|
||||
$miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion))
|
||||
}
|
||||
|
||||
if ($os.IsSonomaX64 -or $os.IsVenturaX64 -or $os.IsSequoiaX64) {
|
||||
if ((-not $os.IsArm64)) {
|
||||
|
||||
Write-Host "Adding environment variables for parallels"
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ function Get-GeckodriverVersion {
|
||||
|
||||
function Get-SeleniumVersion {
|
||||
$os = Get-OSVersion
|
||||
if ($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
if ($os.IsArm64) {
|
||||
$cellarPath = "/opt/homebrew/Cellar"
|
||||
} else {
|
||||
$cellarPath = "/usr/local/Cellar"
|
||||
|
||||
@@ -2,7 +2,7 @@ function Get-JavaVersions {
|
||||
$defaultJavaPath = (Get-Item env:JAVA_HOME).value
|
||||
|
||||
$os = Get-OSVersion
|
||||
if ($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
if ($os.IsArm64) {
|
||||
$javaVersions = Get-Item env:JAVA_HOME_*_arm64
|
||||
} else {
|
||||
$javaVersions = Get-Item env:JAVA_HOME_*_X64
|
||||
|
||||
@@ -37,7 +37,7 @@ function Build-ToolcacheSection {
|
||||
|
||||
$nodes = @()
|
||||
|
||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
|
||||
if ($os.IsVenturaX64) {
|
||||
$nodes += @(
|
||||
[ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List")
|
||||
)
|
||||
|
||||
@@ -35,9 +35,10 @@ function Get-OSVersion {
|
||||
IsSonoma = $($osVersion.Version.Major -eq "14")
|
||||
IsSonomaArm64 = $($osVersion.Version.Major -eq "14" -and $processorArchitecture -eq "arm64")
|
||||
IsSonomaX64 = $($osVersion.Version.Major -eq "14" -and $processorArchitecture -ne "arm64")
|
||||
IsSequoia = $($osVersion.Version.Major -eq "15")
|
||||
IsSequoiaArm64 = $($osVersion.Version.Major -eq "15" -and $processorArchitecture -eq "arm64")
|
||||
IsSequoiaX64 = $($osVersion.Version.Major -eq "15" -and $processorArchitecture -ne "arm64")
|
||||
IsSequoia = $($osVersion.Version.Major -eq "15")
|
||||
IsSequoiaArm64 = $($osVersion.Version.Major -eq "15" -and $processorArchitecture -eq "arm64")
|
||||
IsSequoiaX64 = $($osVersion.Version.Major -eq "15" -and $processorArchitecture -ne "arm64")
|
||||
IsTahoe = $($osVersion.Version.Major -eq "26")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,10 @@ is_Arm64() {
|
||||
[ "$(arch)" = "arm64" ]
|
||||
}
|
||||
|
||||
is_Tahoe() {
|
||||
[ "$OSTYPE" = "darwin25" ]
|
||||
}
|
||||
|
||||
is_Sequoia() {
|
||||
[ "$OSTYPE" = "darwin24" ]
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ Describe "Perl" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Tcl/Tk" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoia) {
|
||||
Describe "Tcl/Tk" -Skip:(-not ($os.IsVenturaX64 -or $os.IsSonomaX64)) {
|
||||
It "libtcl" {
|
||||
Test-Path "/usr/local/lib/libtcl8.6.dylib" | Should -BeTrue
|
||||
Test-Path "/usr/local/lib/libtk8.6.dylib" | Should -BeTrue
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "mongo" }
|
||||
@{ ToolName = "mongod" }
|
||||
) {
|
||||
$toolsetVersion = (Get-ToolsetContent).mongodb.version
|
||||
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
|
||||
}
|
||||
}
|
||||
|
||||
Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "PostgreSQL version should correspond to the version in the toolset" {
|
||||
$toolsetVersion = (Get-ToolsetContent).postgresql.version
|
||||
# Client version
|
||||
(psql --version).split()[-2] | Should -BeLike "$toolsetVersion*"
|
||||
# Server version
|
||||
(pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
|
||||
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "SwiftLint" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
Describe "SwiftLint" -Skip:($os.IsArm64) {
|
||||
It "SwiftLint" {
|
||||
"swiftlint version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "OpenSSL" {
|
||||
Context "OpenSSL Version" {
|
||||
It "OpenSSL is available" {
|
||||
@@ -7,17 +9,31 @@ Describe "OpenSSL" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "OpenSSL 1.1 Path Check" {
|
||||
Context "OpenSSL 1.1 Path Check" -Skip:($os.IsTahoe) {
|
||||
It "OpenSSL 1.1 path exists" {
|
||||
$openSSLpath = brew --prefix openssl@1.1
|
||||
$openSSLpath | Should -Exist
|
||||
}
|
||||
}
|
||||
|
||||
Context "OpenSSL 1.1 is default" {
|
||||
Context "OpenSSL 1.1 is default" -Skip:($os.IsTahoe) {
|
||||
It "Default OpenSSL version is 1.1" {
|
||||
$commandResult = Get-CommandResult "openssl version"
|
||||
$commandResult.Output | Should -Match "OpenSSL 1.1"
|
||||
}
|
||||
}
|
||||
|
||||
Context "OpenSSL 3 Path Check" -Skip:(-not $os.IsTahoe) {
|
||||
It "OpenSSL 3 path exists" {
|
||||
$openSSLpath = brew --prefix openssl@3
|
||||
$openSSLpath | Should -Exist
|
||||
}
|
||||
}
|
||||
|
||||
Context "OpenSSL 3 is default" -Skip:(-not $os.IsTahoe) {
|
||||
It "Default OpenSSL version is 3" {
|
||||
$commandResult = Get-CommandResult "openssl version"
|
||||
$commandResult.Output | Should -Match "OpenSSL 3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "PHP" {
|
||||
Context "PHP" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
Context "PHP" -Skip:($os.IsArm64) {
|
||||
It "PHP Path" {
|
||||
Get-ToolPath "php" | Should -Not -BeLike "/usr/bin/php*"
|
||||
}
|
||||
@@ -14,7 +14,7 @@ Describe "PHP" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "Composer" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
Context "Composer" -Skip:($os.IsArm64) {
|
||||
It "Composer" {
|
||||
"composer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ Describe "Python3" {
|
||||
"python3 --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
if ($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
if ($os.IsArm64) {
|
||||
It "Python 3 is installed under /opt/homebrew/bin/" {
|
||||
Get-ToolPath "python3" | Should -BeLike "/opt/homebrew/bin/*"
|
||||
}
|
||||
@@ -33,18 +33,3 @@ Describe "Python3" {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Describe "Python2" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "Python 2 is available" {
|
||||
"/Library/Frameworks/Python.framework/Versions/2.7/bin/python --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Pip 2 is available" {
|
||||
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "2to3 symlink does not point to Python 2" {
|
||||
$2to3path = (Get-ChildItem (Get-Command 2to3).Path).Target
|
||||
$2to3path | Should -Not -BeLike '/Frameworks/Python.framework/Versions/2.*'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,15 +25,3 @@ Describe "Fastlane" {
|
||||
"fastlane --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "xcpretty" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "xcpretty" {
|
||||
"xcpretty --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "jazzy" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "jazzy" {
|
||||
"jazzy --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,21 +18,4 @@ Describe "Rust" {
|
||||
"cargo --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Context "Cargo dependencies" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "bindgen" {
|
||||
"bindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "cbindgen" {
|
||||
"cbindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo audit" {
|
||||
"cargo audit --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo outdated" {
|
||||
"cargo outdated --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,16 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Disk free space" {
|
||||
It "Image has more than 25GB free space" {
|
||||
# we should have at least 25 GB of free space on macOS images
|
||||
It "Image has more than 30GB free space" {
|
||||
# we should have at least 30 GB of free space on macOS images
|
||||
# 10GB here: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#capabilities-and-limitations
|
||||
# 14GB here: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
|
||||
# 30GB due to: https://github.com/actions/runner-images/issues/10511
|
||||
# 25GB is the current minimum due to the size of Xcode 16.4 and it's dependencies
|
||||
$diskInfo = Get-PSDrive "/"
|
||||
$totalSpaceGB = [math]::Floor(($diskInfo.Used + $diskInfo.Free) / 1GB)
|
||||
$freeSpaceGB = [math]::Floor($diskInfo.Free / 1GB)
|
||||
Write-Host " [i] Disk size: ${totalSpaceGB} GB; Free space: ${freeSpaceGB} GB"
|
||||
$freeSpaceGB | Should -BeGreaterOrEqual 25
|
||||
$freeSpaceGB | Should -BeGreaterOrEqual 30
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,16 +30,6 @@ Describe "Certificate" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Audio device" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
It "Sox is installed" {
|
||||
"sox --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "SwitchAudioSource is installed" {
|
||||
"SwitchAudioSource -c" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "AutomationModeTool" {
|
||||
It "Does not require user authentication" {
|
||||
automationmodetool | Out-String | Should -Match "DOES NOT REQUIRE"
|
||||
|
||||
@@ -57,7 +57,7 @@ Describe "Toolcache" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "Ruby" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoiaArm64) {
|
||||
Context "Ruby" -Skip:($os.IsArm64) {
|
||||
$rubyDirectory = Join-Path $toolcacheDirectory "Ruby"
|
||||
$rubyPackage = $packages | Where-Object { $_.ToolName -eq "Ruby" } | Select-Object -First 1
|
||||
$testCase = @{ RubyDirectory = $rubyDirectory }
|
||||
@@ -99,7 +99,7 @@ Describe "Toolcache" {
|
||||
}
|
||||
}
|
||||
}
|
||||
Context "PyPy" -Skip:($os.IsVenturaArm64 -or $os.IsSonoma -or $os.IsSequoia) {
|
||||
Context "PyPy" -Skip:(-not $os.IsVenturaX64) {
|
||||
$pypyDirectory = Join-Path $toolcacheDirectory "PyPy"
|
||||
$pypyPackage = $packages | Where-Object { $_.ToolName -eq "pypy" } | Select-Object -First 1
|
||||
$testCase = @{ PypyDirectory = $pypyDirectory }
|
||||
|
||||
Reference in New Issue
Block a user