diff --git a/images/macos/scripts/build/install-compilable-brew-packages.sh b/images/macos/scripts/build/install-compilable-brew-packages.sh new file mode 100644 index 000000000..b0f22c5df --- /dev/null +++ b/images/macos/scripts/build/install-compilable-brew-packages.sh @@ -0,0 +1,15 @@ +#!/bin/bash -e -o pipefail +################################################################################ +## File: install-compilable-brew-packages.sh +## Desc: Install compilable brew packages +################################################################################ + +source ~/utils/utils.sh + +compilable_packages=$(get_toolset_value '.brew.compilable_packages[]') +for package in $compilable_packages; do + echo "Installing $package..." + brew_smart_install "$package" +done + +invoke_tests "Common" "Compiled" diff --git a/images/macos/scripts/tests/BasicTools.Tests.ps1 b/images/macos/scripts/tests/BasicTools.Tests.ps1 index add654733..e6cfeac59 100644 --- a/images/macos/scripts/tests/BasicTools.Tests.ps1 +++ b/images/macos/scripts/tests/BasicTools.Tests.ps1 @@ -87,7 +87,7 @@ Describe "7-Zip" { } } -Describe "Apache Ant" { +Describe "Apache Ant" -Skip:($os.IsMonterey) { It "Apache Ant" { "ant -version" | Should -ReturnZeroExitCode } @@ -159,7 +159,7 @@ Describe "Homebrew" { } } -Describe "Kotlin" { +Describe "Kotlin" -Skip:($os.IsMonterey) { $kotlinPackages = @("kapt", "kotlin", "kotlinc", "kotlinc-jvm", "kotlin-dce-js") It " is available" -TestCases ($kotlinPackages | ForEach-Object { @{ toolName = $_ } }) { @@ -167,12 +167,6 @@ Describe "Kotlin" { } } -Describe "sbt" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) { - It "sbt" { - "sbt -version" | Should -ReturnZeroExitCode - } -} - Describe "yq" { It "yq" { "yq --version" | Should -ReturnZeroExitCode diff --git a/images/macos/scripts/tests/Common.Tests.ps1 b/images/macos/scripts/tests/Common.Tests.ps1 index 92591437d..497ed60e2 100644 --- a/images/macos/scripts/tests/Common.Tests.ps1 +++ b/images/macos/scripts/tests/Common.Tests.ps1 @@ -146,3 +146,19 @@ Describe "Colima" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) { "colima version" | Should -ReturnZeroExitCode } } + +Describe "Compiled" -Skip:(-not $os.IsMonterey) { + It "Apache Ant" { + "ant -version" | Should -ReturnZeroExitCode + } + + $kotlinPackages = @("kapt", "kotlin", "kotlinc", "kotlinc-jvm", "kotlin-dce-js") + + It " is available" -TestCases ($kotlinPackages | ForEach-Object { @{ toolName = $_ } }) { + "$toolName -version" | Should -ReturnZeroExitCode + } + + It "sbt" { + "sbt -version" | Should -ReturnZeroExitCode + } +} diff --git a/images/macos/templates/macOS-12.anka.pkr.hcl b/images/macos/templates/macOS-12.anka.pkr.hcl index dc3661997..398623bbd 100644 --- a/images/macos/templates/macOS-12.anka.pkr.hcl +++ b/images/macos/templates/macOS-12.anka.pkr.hcl @@ -266,7 +266,8 @@ build { "${path.root}/../scripts/build/install-pypy.sh", "${path.root}/../scripts/build/install-pipx-packages.sh", "${path.root}/../scripts/build/install-bicep.sh", - "${path.root}/../scripts/build/install-codeql-bundle.sh" + "${path.root}/../scripts/build/install-codeql-bundle.sh", + "${path.root}/../scripts/build/install-compilable-brew-packages.sh" ] } diff --git a/images/macos/toolsets/toolset-12.json b/images/macos/toolsets/toolset-12.json index 9aca0bad9..e63383d7a 100644 --- a/images/macos/toolsets/toolset-12.json +++ b/images/macos/toolsets/toolset-12.json @@ -184,7 +184,6 @@ }, "brew": { "common_packages": [ - "ant", "aria2", "azure-cli", "bazelisk", @@ -194,13 +193,11 @@ "gh", "gnupg", "gnu-tar", - "kotlin", "libpq", "p7zip", "packer", "perl", "pkg-config", - "sbt", "subversion", "swiftformat", "swig", @@ -222,6 +219,11 @@ "vagrant", "virtualbox", "parallels" + ], + "compilable_packages": [ + "ant", + "kotlin", + "sbt" ] }, "gcc": {