diff --git a/images/macos/helpers/Common.Helpers.psm1 b/images/macos/helpers/Common.Helpers.psm1 index 9c8f2cac..2a295120 100644 --- a/images/macos/helpers/Common.Helpers.psm1 +++ b/images/macos/helpers/Common.Helpers.psm1 @@ -36,6 +36,7 @@ function Get-OSVersion { IsMonterey = $osVersion.Version.Major -eq "12" IsVentura = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -ne "arm64") IsVenturaArm64 = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -eq "arm64") + IsSonoma = $($osVersion.Version.Major -eq "14") } } diff --git a/images/macos/helpers/Xcode.Installer.psm1 b/images/macos/helpers/Xcode.Installer.psm1 index 1bb9d040..57cc2e55 100644 --- a/images/macos/helpers/Xcode.Installer.psm1 +++ b/images/macos/helpers/Xcode.Installer.psm1 @@ -132,7 +132,7 @@ function Approve-XcodeLicense { Write-Host "Approving Xcode license for '$XcodeRootPath'..." $xcodeBuildPath = Get-XcodeToolPath -XcodeRootPath $XcodeRootPath -ToolName "xcodebuild" - if ($os.IsVentura -or $os.IsVenturaArm64) { + if ($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept" -Timeout 15 } else { Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept" diff --git a/images/macos/provision/configuration/configure-tccdb-macos.sh b/images/macos/provision/configuration/configure-tccdb-macos.sh index 8c5315be..1d863b42 100644 --- a/images/macos/provision/configuration/configure-tccdb-macos.sh +++ b/images/macos/provision/configuration/configure-tccdb-macos.sh @@ -30,7 +30,12 @@ systemValuesArray=( "'kTCCServiceSystemPolicyNetworkVolumes','com.apple.Terminal',0,2,4,1,X'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e5465726d696e616c000000000003',NULL,0,'UNUSED',NULL,0,1678990068" ) for values in "${systemValuesArray[@]}"; do - configure_system_tccdb "$values" + if is_Sonoma; then + # TCC access table in Sonoma has extra 4 columns: pid, pid_version, boot_uuid, last_reminded + configure_system_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}" + else + configure_system_tccdb "$values" + fi done # $HOME/Library/Application\ Support/com.apple.TCC/TCC.db @@ -59,5 +64,10 @@ userValuesArray=( "'kTCCServiceAppleEvents','/usr/local/opt/runner/provisioner/provisioner',1,2,3,1,NULL,NULL,0,'com.apple.systemevents',X'fade0c000000003400000001000000060000000200000016636f6d2e6170706c652e73797374656d6576656e7473000000000003',NULL,1592919552" ) for values in "${userValuesArray[@]}"; do - configure_user_tccdb "$values" + if is_Sonoma; then + # TCC access table in Sonoma has extra 4 columns: pid, pid_version, boot_uuid, last_reminded + configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}" + else + configure_user_tccdb "$values" + fi done diff --git a/images/macos/provision/configuration/preimagedata.sh b/images/macos/provision/configuration/preimagedata.sh index 47cc926c..fee38f07 100644 --- a/images/macos/provision/configuration/preimagedata.sh +++ b/images/macos/provision/configuration/preimagedata.sh @@ -17,7 +17,7 @@ else fi release_label="macOS-${label_version}" -if is_Ventura; then +if is_Ventura || is_Sonoma; then software_url="https://github.com/actions/runner-images/blob/${image_label}/${image_version}/images/macos/${image_label}-Readme.md" releaseUrl="https://github.com/actions/runner-images/releases/tag/${image_label}%2F${image_version}" else diff --git a/images/macos/provision/core/commonutils.sh b/images/macos/provision/core/commonutils.sh index 10101588..8d704582 100644 --- a/images/macos/provision/core/commonutils.sh +++ b/images/macos/provision/core/commonutils.sh @@ -13,15 +13,13 @@ done cask_packages=$(get_toolset_value '.brew.cask_packages[]') for package in $cask_packages; do echo "Installing $package..." - if [[ $package == "virtualbox" ]]; then - if ! is_Ventura || ! is_VenturaArm64; then - # Do not update VirtualBox on macOS 12 due to the issue with VMs in gurumediation state which blocks Vagrant on macOS: https://github.com/actions/runner-images/issues/8730 - # macOS host: Dropped all kernel extensions. VirtualBox relies fully on the hypervisor and vmnet frameworks provided by Apple now. - vbcask_url="https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb" - download_with_retries $vbcask_url - brew install ./virtualbox.rb - rm ./virtualbox.rb - fi + if is_Monterey && [[ $package == "virtualbox" ]]; then + # Do not update VirtualBox on macOS 12 due to the issue with VMs in gurumediation state which blocks Vagrant on macOS: https://github.com/actions/runner-images/issues/8730 + # macOS host: Dropped all kernel extensions. VirtualBox relies fully on the hypervisor and vmnet frameworks provided by Apple now. + vbcask_url="https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb" + download_with_retries $vbcask_url + brew install ./virtualbox.rb + rm ./virtualbox.rb else brew install --cask $package fi diff --git a/images/macos/provision/core/node.sh b/images/macos/provision/core/node.sh index db012971..c4e3d8b9 100644 --- a/images/macos/provision/core/node.sh +++ b/images/macos/provision/core/node.sh @@ -11,7 +11,7 @@ echo Installing yarn... download_with_retries "https://yarnpkg.com/install.sh" "/tmp" "yarn-install.sh" bash /tmp/yarn-install.sh -if ! is_Ventura || ! is_VenturaArm64; then +if is_BigSur || is_Monterey; then npm_global_packages=$(get_toolset_value '.npm.global_packages[].name') for module in ${npm_global_packages[@]}; do echo "Install $module" diff --git a/images/macos/provision/utils/utils.sh b/images/macos/provision/utils/utils.sh index 04d9eec3..c4374d7c 100755 --- a/images/macos/provision/utils/utils.sh +++ b/images/macos/provision/utils/utils.sh @@ -55,6 +55,14 @@ is_VenturaArm64() { fi } +is_Sonoma() { + if [ "$OSTYPE" = "darwin23" ]; then + true + else + false + fi +} + is_Ventura() { if [ "$OSTYPE" = "darwin22" ]; then true @@ -122,6 +130,8 @@ get_brew_os_keyword() { echo "monterey" elif is_Ventura; then echo "ventura" + elif is_Sonoma; then + echo "sonoma" else echo "null" fi diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index 99b9508c..ff694767 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -40,12 +40,12 @@ $languageAndRuntime.AddNodes($(Get-GccVersions)) $languageAndRuntime.AddNodes($(Get-FortranVersions)) $languageAndRuntime.AddToolVersion("Julia", $(Get-JuliaVersion)) $languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersion("Go", $(Get-GoVersion)) } $languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion)) $languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersion("MSBuild", $(Get-MSBuildVersion)) $languageAndRuntime.AddToolVersion("NVM", $(Get-NVMVersion)) $languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+') @@ -55,7 +55,7 @@ if (-not $os.IsVenturaArm64) { $languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion)) } -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion)) } @@ -74,12 +74,12 @@ if (-not $os.IsVenturaArm64) { $packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion)) } $packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $packageManagement.AddToolVersion("Miniconda", $(Get-CondaVersion)) } $packageManagement.AddToolVersion("NPM", $(Get-NPMVersion)) $packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2)) } @@ -94,7 +94,7 @@ if (-not $os.IsVenturaArm64) { } $packageManagement.AddToolVersion("Yarn", $(Get-YarnVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $packageManagement.AddNode($(Build-PackageManagementEnvironmentTable)) } # Project Management @@ -102,7 +102,7 @@ $projectManagement = $installedSoftware.AddHeader("Project Management") $projectManagement.AddToolVersion("Apache Ant", $(Get-ApacheAntVersion)) $projectManagement.AddToolVersion("Apache Maven", $(Get-MavenVersion)) $projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion)) } @@ -124,11 +124,11 @@ $utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion)) if ($os.IsBigSur) { $utilities.AddToolVersion("helm", $(Get-HelmVersion)) } -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion)) } $utilities.AddToolVersion("jq", $(Get-JqVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $utilities.AddToolVersion("mongo", $(Get-MongoVersion)) $utilities.AddToolVersion("mongod", $(Get-MongodVersion)) } @@ -138,14 +138,14 @@ if ($os.IsBigSur) { $utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion)) $utilities.AddToolVersion("Packer", $(Get-PackerVersion)) $utilities.AddToolVersion("pkg-config", $(Get-PKGConfigVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $utilities.AddToolVersion("PostgreSQL", $(Get-PostgresServerVersion)) $utilities.AddToolVersion("psql (PostgreSQL)", $(Get-PostgresClientVersion)) $utilities.AddToolVersion("Sox", $(Get-SoxVersion)) $utilities.AddToolVersion("Subversion (SVN)", $(Get-SVNVersion)) $utilities.AddToolVersion("Switchaudio-osx", $(Get-SwitchAudioOsxVersion)) } -if ((-not $os.IsBigSur) -and (-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ($os.IsMonterey) { $utilities.AddToolVersion("Vagrant", $(Get-VagrantVersion)) $utilities.AddToolVersion("VirtualBox", $(Get-VirtualBoxVersion)) } @@ -157,7 +157,7 @@ $tools = $installedSoftware.AddHeader("Tools") if ($os.IsBigSur) { $tools.AddToolVersion("Aliyun CLI", $(Get-AliyunCLIVersion)) } -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion)) } if (-not $os.IsVenturaArm64) { @@ -181,14 +181,14 @@ if (-not $os.IsVenturaArm64) { $tools.AddToolVersion("GHC", $(Get-GHCVersion)) $tools.AddToolVersion("GHCup", $(Get-GHCupVersion)) } -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $tools.AddToolVersion("Jazzy", $(Get-JazzyVersion)) } if (-not $os.IsVenturaArm64) { $tools.AddToolVersion("Stack", $(Get-StackVersion)) } $tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $tools.AddToolVersion("Swig", $(Get-SwigVersion)) } $tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion)) @@ -198,7 +198,7 @@ $linters = $installedSoftware.AddHeader("Linters") if (-not $os.IsVenturaArm64) { $linters.AddToolVersion("SwiftLint", $(Get-SwiftLintVersion)) } -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $linters.AddToolVersion("Yamllint", $(Get-YamllintVersion)) } @@ -212,23 +212,25 @@ $java = $installedSoftware.AddHeader("Java") $java.AddTable($(Get-JavaVersions)) # Toolcache -$toolcache = $installedSoftware.AddHeader("Cached Tools") -$toolcache.AddNodes($(Build-ToolcacheSection)) +if (-not $os.IsSonoma) { + $toolcache = $installedSoftware.AddHeader("Cached Tools") + $toolcache.AddNodes($(Build-ToolcacheSection)) -# Rust -$rust = $installedSoftware.AddHeader("Rust Tools") -$rust.AddToolVersion("Cargo", $(Get-RustCargoVersion)) -$rust.AddToolVersion("Rust", $(Get-RustVersion)) -$rust.AddToolVersion("Rustdoc", $(Get-RustdocVersion)) -$rust.AddToolVersion("Rustup", $(Get-RustupVersion)) + # Rust + $rust = $installedSoftware.AddHeader("Rust Tools") + $rust.AddToolVersion("Cargo", $(Get-RustCargoVersion)) + $rust.AddToolVersion("Rust", $(Get-RustVersion)) + $rust.AddToolVersion("Rustdoc", $(Get-RustdocVersion)) + $rust.AddToolVersion("Rustup", $(Get-RustupVersion)) -$rustPackages = $rust.AddHeader("Packages") -$rustPackages.AddToolVersion("Bindgen", $(Get-Bindgen)) -$rustPackages.AddToolVersion("Cargo-audit", $(Get-Cargoaudit)) -$rustPackages.AddToolVersion("Cargo-outdated", $(Get-Cargooutdated)) -$rustPackages.AddToolVersion("Cbindgen", $(Get-Cbindgen)) -$rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion)) -$rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion)) + $rustPackages = $rust.AddHeader("Packages") + $rustPackages.AddToolVersion("Bindgen", $(Get-Bindgen)) + $rustPackages.AddToolVersion("Cargo-audit", $(Get-Cargoaudit)) + $rustPackages.AddToolVersion("Cargo-outdated", $(Get-Cargooutdated)) + $rustPackages.AddToolVersion("Cbindgen", $(Get-Cbindgen)) + $rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion)) + $rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion)) +} # PowerShell $powerShell = $installedSoftware.AddHeader("PowerShell Tools") @@ -238,30 +240,30 @@ $powerShellModules = $powerShell.AddHeader("PowerShell Modules") $powerShellModules.AddNodes($(Get-PowerShellModules)) # Web Servers -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { $webServers = $installedSoftware.AddHeader("Web Servers") $webServers.AddTable($(Build-WebServersSection)) } # Xamarin section -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { -$xamarin = $installedSoftware.AddHeader("Xamarin") -$vsForMac = $xamarin.AddHeader("Visual Studio for Mac") -$vsForMac.AddTable($(Build-VSMacTable)) -$note = +if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonoma)) { + $xamarin = $installedSoftware.AddHeader("Xamarin") + $vsForMac = $xamarin.AddHeader("Visual Studio for Mac") + $vsForMac.AddTable($(Build-VSMacTable)) + $note = @' To use Visual Studio 2019 by default rename the app: mv "/Applications/Visual Studio.app" "/Applications/Visual Studio 2022.app" mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app" '@ -$vsForMacNotes = $vsForMac.AddHeader("Notes") -$vsForMacNotes.AddNote($note) + $vsForMacNotes = $vsForMac.AddHeader("Notes") + $vsForMacNotes.AddNote($note) -$xamarinBundles = $xamarin.AddHeader("Xamarin bundles") -$xamarinBundles.AddTable($(Build-XamarinTable)) + $xamarinBundles = $xamarin.AddHeader("Xamarin bundles") + $xamarinBundles.AddTable($(Build-XamarinTable)) -$unitTestFramework = $xamarin.AddHeader("Unit Test Framework") -$unitTestFramework.AddToolVersion("NUnit", $(Get-NUnitVersion)) + $unitTestFramework = $xamarin.AddHeader("Unit Test Framework") + $unitTestFramework.AddToolVersion("NUnit", $(Get-NUnitVersion)) } # Xcode section @@ -289,7 +291,7 @@ $android.AddTable($androidTable) $androidEnv = $android.AddHeader("Environment variables") $androidEnv.AddTable($(Build-AndroidEnvironmentTable)) -if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { +if ($os.IsBigSur -or $os.IsMonterey) { $miscellaneous = $installedSoftware.AddHeader("Miscellaneous") $miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion)) $miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion)) diff --git a/images/macos/tests/Android.Tests.ps1 b/images/macos/tests/Android.Tests.ps1 index 54b18e33..d399f558 100644 --- a/images/macos/tests/Android.Tests.ps1 +++ b/images/macos/tests/Android.Tests.ps1 @@ -9,14 +9,14 @@ Describe "Android" { [int]$platformMinVersion = Get-ToolsetValue "android.platform_min_version" [version]$buildToolsMinVersion = Get-ToolsetValue "android.build_tools_min_version" [array]$ndkVersions = Get-ToolsetValue "android.ndk.versions" - $ndkFullVersions = $ndkVersions | ForEach-Object { Get-ChildItem "$env:ANDROID_HOME/ndk/${_}.*" -Name | Select-Object -Last 1} | ForEach-Object { "ndk/${_}" } + $ndkFullVersions = $ndkVersions | ForEach-Object { Get-ChildItem "$env:ANDROID_HOME/ndk/${_}.*" -Name | Select-Object -Last 1 } | ForEach-Object { "ndk/${_}" } # Platforms starting with a letter are the preview versions, which is not installed on the image $platformVersionsList = ($androidSdkManagerPackages | Where-Object { "$_".StartsWith("platforms;") }) -replace 'platforms;android-', '' | Where-Object { $_ -match "^\d" } | Sort-Object -Unique $platformsInstalled = $platformVersionsList | Where-Object { [int]($_.Split("-")[0]) -ge $platformMinVersion } | ForEach-Object { "platforms/android-${_}" } $buildToolsList = ($androidSdkManagerPackages | Where-Object { "$_".StartsWith("build-tools;") }) -replace 'build-tools;', '' - $buildTools = $buildToolsList | Where-Object { $_ -match "\d+(\.\d+){2,}$"} | Where-Object { [version]$_ -ge $buildToolsMinVersion } | Sort-Object -Unique | - ForEach-Object { "build-tools/${_}" } + $buildTools = $buildToolsList | Where-Object { $_ -match "\d+(\.\d+){2,}$" } | Where-Object { [version]$_ -ge $buildToolsMinVersion } | Sort-Object -Unique | + ForEach-Object { "build-tools/${_}" } $androidPackages = @( "tools", @@ -31,14 +31,14 @@ Describe "Android" { ) | ForEach-Object { $_ } # Remove empty strings from array to avoid possible issues - $androidPackages = $androidPackages | Where-Object {$_} + $androidPackages = $androidPackages | Where-Object { $_ } BeforeAll { $ANDROID_SDK_DIR = Join-Path $env:HOME "Library" "Android" "sdk" function Validate-AndroidPackage { param ( - [Parameter(Mandatory=$true)] + [Parameter(Mandatory = $true)] [string]$PackageName ) @@ -51,22 +51,17 @@ Describe "Android" { } Context "SDKManagers" { - if (-not $os.IsVentura -and -not $os.IsVenturaArm64) { - $testCases = @( + $testCases = @( + @{ + PackageName = "Command-line tools" + Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" + } + ) + if ($os.IsBigSur -or $os.IsMonterey) { + $testCases += @( @{ PackageName = "SDK tools" - Sdkmanager = "$env:ANDROID_HOME/tools/bin/sdkmanager" - }, - @{ - PackageName = "Command-line tools" - Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" - } - ) - }else { - $testCases = @( - @{ - PackageName = "Command-line tools" - Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" + Sdkmanager = "$env:ANDROID_HOME/tools/bin/sdkmanager" } ) } @@ -84,4 +79,4 @@ Describe "Android" { Validate-AndroidPackage $PackageName } } -} \ No newline at end of file +} diff --git a/images/macos/tests/BasicTools.Tests.ps1 b/images/macos/tests/BasicTools.Tests.ps1 index c4b763cd..081959a0 100644 --- a/images/macos/tests/BasicTools.Tests.ps1 +++ b/images/macos/tests/BasicTools.Tests.ps1 @@ -25,7 +25,7 @@ Describe "cmake" { } } -Describe "Subversion" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Subversion" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Subversion" { "svn --version" | Should -ReturnZeroExitCode } @@ -61,7 +61,7 @@ Describe "Perl" { } } -Describe "Helm" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsVenturaArm64) { +Describe "Helm" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Helm" { "helm version --short" | Should -ReturnZeroExitCode } @@ -116,7 +116,7 @@ Describe "bazel" { } } -Describe "Aliyun CLI" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsVenturaArm64) { +Describe "Aliyun CLI" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Aliyun CLI" { "aliyun --version" | Should -ReturnZeroExitCode } @@ -146,13 +146,13 @@ Describe "wget" { } } -Describe "vagrant" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64) { +Describe "vagrant" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "vagrant" { "vagrant --version" | Should -ReturnZeroExitCode } } -Describe "virtualbox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64) { +Describe "virtualbox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "virtualbox" { "vboxmanage -v" | Should -ReturnZeroExitCode } @@ -178,7 +178,7 @@ Describe "Kotlin" { } } -Describe "sbt" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "sbt" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "sbt" { "sbt -version" | Should -ReturnZeroExitCode } @@ -190,7 +190,7 @@ Describe "yq" { } } -Describe "imagemagick" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "imagemagick" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "imagemagick" { "magick -version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 index e1e645e7..f0d4f830 100644 --- a/images/macos/tests/Common.Tests.ps1 +++ b/images/macos/tests/Common.Tests.ps1 @@ -58,7 +58,7 @@ Describe "AzCopy" { } } -Describe "Miniconda" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Miniconda" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Conda" { Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty $condaBinPath = Join-Path $env:CONDA "bin" "conda" @@ -78,7 +78,7 @@ Describe "CocoaPods" { } } -Describe "VSMac" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "VSMac" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { $vsMacVersions = Get-ToolsetValue "xamarin.vsmac.versions" $defaultVSMacVersion = Get-ToolsetValue "xamarin.vsmac.default" @@ -105,7 +105,7 @@ Describe "VSMac" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { } } -Describe "Swig" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Swig" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Swig" { "swig -version" | Should -ReturnZeroExitCode } @@ -117,13 +117,13 @@ Describe "Bicep" { } } -Describe "Go" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Go" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Go" { "go version" | Should -ReturnZeroExitCode } } -Describe "VirtualBox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64) { +Describe "VirtualBox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Check kext kernel modules" { kextstat | Out-String | Should -Match "org.virtualbox.kext" } @@ -141,7 +141,7 @@ Describe "CodeQL Bundle" { } } -Describe "Colima" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Colima" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Colima" { "colima version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/Databases.Tests.ps1 b/images/macos/tests/Databases.Tests.ps1 index 36eebcd5..3dda00ee 100644 --- a/images/macos/tests/Databases.Tests.ps1 +++ b/images/macos/tests/Databases.Tests.ps1 @@ -2,7 +2,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" $os = Get-OSVersion -Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "" -TestCases @( @{ ToolName = "mongo" } @{ ToolName = "mongod" } @@ -12,7 +12,7 @@ Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { } } -Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "PostgreSQL version should correspond to the version in the toolset" { $toolsetVersion = Get-ToolsetValue 'postgresql.version' # Client version @@ -20,4 +20,4 @@ Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { # Server version (pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*" } -} \ No newline at end of file +} diff --git a/images/macos/tests/Node.Tests.ps1 b/images/macos/tests/Node.Tests.ps1 index 9f13fe43..b84aee35 100644 --- a/images/macos/tests/Node.Tests.ps1 +++ b/images/macos/tests/Node.Tests.ps1 @@ -21,7 +21,7 @@ Describe "Node.js" { } } -Describe "nvm" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "nvm" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { BeforeAll { $nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh" $nvmInitCommand = ". $nvmPath > /dev/null 2>&1 || true" @@ -54,4 +54,3 @@ Describe "Global NPM Packages" { $Test | Should -ReturnZeroExitCode } } - diff --git a/images/macos/tests/PipxPackages.Tests.ps1 b/images/macos/tests/PipxPackages.Tests.ps1 index f95d3563..adfd45c3 100644 --- a/images/macos/tests/PipxPackages.Tests.ps1 +++ b/images/macos/tests/PipxPackages.Tests.ps1 @@ -3,10 +3,10 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" $os = Get-OSVersion -Describe "PipxPackages" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "PipxPackages" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { $pipxToolset = Get-ToolsetValue "pipx" $testCases = $pipxToolset | ForEach-Object { @{package = $_.package; cmd = $_.cmd} } It "" -TestCases $testCases { "$cmd" | Should -ReturnZeroExitCode } -} \ No newline at end of file +} diff --git a/images/macos/tests/Python.Tests.ps1 b/images/macos/tests/Python.Tests.ps1 index 4c1f7086..2504b965 100644 --- a/images/macos/tests/Python.Tests.ps1 +++ b/images/macos/tests/Python.Tests.ps1 @@ -28,7 +28,7 @@ Describe "Python3" -Skip:($os.IsVenturaArm64) { } -Describe "Python2" -Skip:($os.IsVenturaArm64 -or $os.IsVentura) { +Describe "Python2" -Skip:($os.IsVenturaArm64 -or $os.IsVentura -or $os.IsSonoma) { It "Python 2 is available" { "/Library/Frameworks/Python.framework/Versions/2.7/bin/python --version" | Should -ReturnZeroExitCode } @@ -41,4 +41,4 @@ Describe "Python2" -Skip:($os.IsVenturaArm64 -or $os.IsVentura) { $2to3path = (Get-ChildItem (Get-Command 2to3).Path).Target $2to3path | Should -Not -BeLike '/Frameworks/Python.framework/Versions/2.*' } -} \ No newline at end of file +} diff --git a/images/macos/tests/Ruby.arm64.Tests.ps1 b/images/macos/tests/Ruby.arm64.Tests.ps1 index 2e380ac1..c8b77fac 100644 --- a/images/macos/tests/Ruby.arm64.Tests.ps1 +++ b/images/macos/tests/Ruby.arm64.Tests.ps1 @@ -3,7 +3,7 @@ Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking $os = Get-OSVersion -Describe "Ruby" -Skip:($os.IsVentura -or $os.IsBigSur -or $os.IsMonterey) { +Describe "Ruby" -Skip:($os.IsVentura -or $os.IsBigSur -or $os.IsMonterey -or $os.IsSonoma) { It "Ruby is available" { "ruby --version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/RubyGem.Tests.ps1 b/images/macos/tests/RubyGem.Tests.ps1 index 4546c951..81f178d9 100644 --- a/images/macos/tests/RubyGem.Tests.ps1 +++ b/images/macos/tests/RubyGem.Tests.ps1 @@ -20,7 +20,7 @@ Describe "Bundler" { } } -Describe "Nomad shenzhen CLI" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsVenturaArm64) { +Describe "Nomad shenzhen CLI" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Nomad shenzhen CLI" { "ipa --version" | Should -ReturnZeroExitCode } @@ -38,8 +38,8 @@ Describe "xcpretty" { } } -Describe "jazzy" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "jazzy" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "jazzy" { "jazzy --version" | Should -ReturnZeroExitCode } -} \ No newline at end of file +} diff --git a/images/macos/tests/System.Tests.ps1 b/images/macos/tests/System.Tests.ps1 index 4d56aafc..3dd7e802 100644 --- a/images/macos/tests/System.Tests.ps1 +++ b/images/macos/tests/System.Tests.ps1 @@ -25,7 +25,7 @@ Describe "Certificate" { } } -Describe "Audio device" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Audio device" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Sox is installed" { "sox --version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/Xamarin.Tests.ps1 b/images/macos/tests/Xamarin.Tests.ps1 index 5e00ff48..69ced674 100644 --- a/images/macos/tests/Xamarin.Tests.ps1 +++ b/images/macos/tests/Xamarin.Tests.ps1 @@ -2,7 +2,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking $os = Get-OSVersion -if ($os.IsVentura -or $os.IsVenturaArm64) { +if ($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { $MONO_VERSIONS = @(Get-ToolsetValue "mono.framework.version") $XAMARIN_IOS_VERSIONS = @() $XAMARIN_MAC_VERSIONS = @() @@ -89,7 +89,7 @@ Describe "Mono" { } } -Describe "Xamarin.iOS" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Xamarin.iOS" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { $XAMARIN_IOS_VERSIONS | ForEach-Object { Context "$_" { $XAMARIN_IOS_VERSIONS_PATH = "/Library/Frameworks/Xamarin.iOS.framework/Versions" @@ -122,7 +122,7 @@ Describe "Xamarin.iOS" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { } } -Describe "Xamarin.Mac" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Xamarin.Mac" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { $XAMARIN_MAC_VERSIONS | ForEach-Object { Context "$_" { $XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions" @@ -155,7 +155,7 @@ Describe "Xamarin.Mac" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { } } -Describe "Xamarin.Android" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Xamarin.Android" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { $XAMARIN_ANDROID_VERSIONS | ForEach-Object { Context "$_" { $XAMARIN_ANDROID_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Android.framework/Versions" @@ -195,7 +195,7 @@ Describe "Xamarin.Android" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { } } -Describe "Xamarin Bundles" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Xamarin Bundles" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { BeforeAll { $MONO_VERSIONS_PATH = "/Library/Frameworks/Mono.framework/Versions" $XAMARIN_IOS_VERSIONS_PATH = "/Library/Frameworks/Xamarin.iOS.framework/Versions" @@ -302,7 +302,7 @@ Describe "Xamarin Bundles" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { } } -Describe "Nuget" -Skip:($os.IsVentura -or $os.IsVenturaArm64) { +Describe "Nuget" -Skip:($os.IsVentura -or $os.IsVenturaArm64 -or $os.IsSonoma) { It "Nuget config contains nuget.org feed" { Get-Content $env:HOME/.config/NuGet/NuGet.Config | Out-String | Should -Match "nuget.org" } diff --git a/images/macos/toolsets/toolset-14.json b/images/macos/toolsets/toolset-14.json index 69fc0efe..7ef04cd6 100644 --- a/images/macos/toolsets/toolset-14.json +++ b/images/macos/toolsets/toolset-14.json @@ -6,12 +6,22 @@ { "link": "15.0.1", "version": "15.0.1+15A507", "symlinks": ["15.0"], "install_runtimes": "true"}, { "link": "14.3.1", "version": "14.3.1+14E300c","symlinks": ["14.3"], "install_runtimes": "true"} ] + }, + "arm64":{ + "versions": [ + { "link": "15.0.1", "version": "15.0.1+15A507", "symlinks": ["15.0"], "install_runtimes": "true"}, + { "link": "14.3.1", "version": "14.3.1+14E300c","symlinks": ["14.3"], "install_runtimes": "true"} + ] } }, "java": { "x64": { "default": "21", "versions": [ "8", "11", "17", "21"] + }, + "arm64": { + "default": "21", + "versions": [ "11", "17", "21"] } }, "android": { @@ -79,6 +89,11 @@ "versions": [ "7.0" ] + }, + "arm64": { + "versions": [ + "7.0" + ] } } },