mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 02:20:20 +08:00
[macOS] Introduce macOS-26 base code (#13007)
This commit is contained in:
@@ -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