From ca8169d472eaf60b286fe30eb4f602acbf3c1442 Mon Sep 17 00:00:00 2001 From: Maksim Shilov <89912354+shilovmaksim@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:35:56 +0300 Subject: [PATCH] [MacOS] Add software to MacOS 12 image was not available during the Monterey beta stage. (#4644) --- .../SoftwareReport.Generator.ps1 | 34 +++++++------------ images/macos/templates/macOS-12.json | 4 +++ images/macos/tests/BasicTools.Tests.ps1 | 4 +-- images/macos/tests/Common.Tests.ps1 | 2 +- images/macos/tests/LLVM.Tests.ps1 | 2 +- images/macos/tests/PHP.Tests.ps1 | 2 +- images/macos/tests/RubyGem.Tests.ps1 | 2 +- images/macos/tests/System.Tests.ps1 | 2 +- images/macos/toolsets/toolset-12.json | 6 ++++ 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index f69292947..5490a66dc 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -43,21 +43,16 @@ $languageAndRuntimeList = @( (Get-DotnetVersionList), (Get-GoVersion), (Get-JuliaVersion), - (Get-KotlinVersion) + (Get-KotlinVersion), + (Get-PHPVersion), + (Get-ClangLLVMVersion) ) if ($os.IsLessThanMonterey) { $languageAndRuntimeList += @( - (Get-PHPVersion) - ) -} - -if ($os.IsLessThanMonterey) { - $languageAndRuntimeList += @( - (Get-GccVersion) + (Get-GccVersion), (Get-FortranVersion) - (Get-ClangLLVMVersion) - ) + ) } if ($os.IsLessThanBigSur) { @@ -83,17 +78,17 @@ $packageManagementList = @( (Get-YarnVersion), (Get-NuGetVersion), (Get-RubyGemsVersion), - (Get-ComposerVersion) + (Get-ComposerVersion), + (Get-CarthageVersion) ) if ($os.IsLessThanMonterey) { $packageManagementList += @( - (Get-CarthageVersion), (Get-CondaVersion) ) } -if ($os.IsHigherThanMojave -and $os.IsLessThanMonterey) { +if ($os.IsHigherThanMojave) { $packageManagementList += @( (Get-VcpkgVersion) ) @@ -139,12 +134,14 @@ $utilitiesList = @( (Get-MongodVersion), (Get-7zipVersion), (Get-BsdtarVersion), - (Get-GnuTarVersion) + (Get-GnuTarVersion), + (Get-GPGVersion), + (Get-SwitchAudioOsxVersion), + (Get-SoxVersion) ) if ($os.IsLessThanMonterey) { $utilitiesList += @( - (Get-GPGVersion), (Get-HelmVersion) ) } @@ -163,13 +160,6 @@ if ($os.IsLessThanBigSur) { ) } -if ($os.IsLessThanMonterey) { - $utilitiesList += @( - (Get-SwitchAudioOsxVersion), - (Get-SoxVersion) - ) -} - $markdown += New-MDList -Style Unordered -Lines ($utilitiesList | Sort-Object) # Tools diff --git a/images/macos/templates/macOS-12.json b/images/macos/templates/macOS-12.json index 596bc460d..6cf0215d6 100644 --- a/images/macos/templates/macOS-12.json +++ b/images/macos/templates/macOS-12.json @@ -165,9 +165,11 @@ "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "scripts": [ "./provision/core/commonutils.sh", + "./provision/core/llvm.sh", "./provision/core/golang.sh", "./provision/core/swiftlint.sh", "./provision/core/openjdk.sh", + "./provision/core/php.sh", "./provision/core/aws.sh", "./provision/core/rust.sh", "./provision/core/haskell.sh", @@ -181,6 +183,8 @@ "./provision/core/nginx.sh", "./provision/core/postgresql.sh", "./provision/core/mongodb.sh", + "./provision/core/audiodevice.sh", + "./provision/core/vcpkg.sh", "./provision/core/safari.sh", "./provision/core/chrome.sh", "./provision/core/edge.sh", diff --git a/images/macos/tests/BasicTools.Tests.ps1 b/images/macos/tests/BasicTools.Tests.ps1 index 4389c89e6..bc6845117 100644 --- a/images/macos/tests/BasicTools.Tests.ps1 +++ b/images/macos/tests/BasicTools.Tests.ps1 @@ -6,7 +6,7 @@ Describe "Azure CLI" { } } -Describe "Carthage" -Skip:($os.IsMonterey) { +Describe "Carthage" { It "Carthage" { "carthage version" | Should -ReturnZeroExitCode } @@ -30,7 +30,7 @@ Describe "SwiftFormat" -Skip:($os.IsMonterey) { } } -Describe "GnuPG" -Skip:($os.IsMonterey) { +Describe "GnuPG" { It "GnuPG" { "gpg --version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 index 16d7878c5..107937da1 100644 --- a/images/macos/tests/Common.Tests.ps1 +++ b/images/macos/tests/Common.Tests.ps1 @@ -33,7 +33,7 @@ Describe "GCC" -Skip:($os.IsMonterey) { } } -Describe "vcpkg" -Skip:($os.IsMojave -or $os.IsMonterey) { +Describe "vcpkg" -Skip:($os.IsMojave) { It "vcpkg" { "vcpkg version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/LLVM.Tests.ps1 b/images/macos/tests/LLVM.Tests.ps1 index 75b67e9c4..0591d049a 100644 --- a/images/macos/tests/LLVM.Tests.ps1 +++ b/images/macos/tests/LLVM.Tests.ps1 @@ -1,6 +1,6 @@ $os = Get-OSVersion -Describe "Clang/LLVM" -Skip:($os.IsMonterey) { +Describe "Clang/LLVM" { It "Clang/LLVM is installed and version is correct" { $toolsetVersion = Get-ToolsetValue 'llvm.version' $clangVersion = & "$(brew --prefix llvm)/bin/clang" --version diff --git a/images/macos/tests/PHP.Tests.ps1 b/images/macos/tests/PHP.Tests.ps1 index ac34a9b48..d5b257324 100644 --- a/images/macos/tests/PHP.Tests.ps1 +++ b/images/macos/tests/PHP.Tests.ps1 @@ -1,6 +1,6 @@ $os = Get-OSVersion -Describe "PHP" -Skip:($os.IsMonterey) { +Describe "PHP" { Context "PHP" { It "PHP Path" { Get-WhichTool "php" | Should -Not -BeLike "/usr/bin/php*" diff --git a/images/macos/tests/RubyGem.Tests.ps1 b/images/macos/tests/RubyGem.Tests.ps1 index 5e15d2f70..cd3806886 100644 --- a/images/macos/tests/RubyGem.Tests.ps1 +++ b/images/macos/tests/RubyGem.Tests.ps1 @@ -19,7 +19,7 @@ Describe "Bundler" { } } -Describe "Nomad shenzhen CLI" -Skip:($os.IsMonterey) { +Describe "Nomad shenzhen CLI" { It "Nomad shenzhen CLI" { "ipa --version" | Should -ReturnZeroExitCode } diff --git a/images/macos/tests/System.Tests.ps1 b/images/macos/tests/System.Tests.ps1 index 71b6d48f6..2b7f00915 100644 --- a/images/macos/tests/System.Tests.ps1 +++ b/images/macos/tests/System.Tests.ps1 @@ -17,7 +17,7 @@ Describe "Certificate" { } } -Describe "Audio device" -Skip:($os.IsMonterey) { +Describe "Audio device" { It "Sox is installed" { "sox --version" | Should -ReturnZeroExitCode } diff --git a/images/macos/toolsets/toolset-12.json b/images/macos/toolsets/toolset-12.json index bb847a482..0f35a3188 100644 --- a/images/macos/toolsets/toolset-12.json +++ b/images/macos/toolsets/toolset-12.json @@ -84,8 +84,10 @@ "aria2", "azure-cli", "bazelisk", + "carthage", "cmake", "gh", + "gnupg", "gnu-tar", "kotlin", "libpq", @@ -174,6 +176,7 @@ "rubygems": [ "xcode-install", "cocoapods", + "nomad-cli", "xcpretty", "bundler", "fastlane", @@ -191,6 +194,9 @@ "16" ] }, + "llvm": { + "version": "13" + }, "php": { "version": "8.1" },