mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[macOS] move llvm to toolset (#4457)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
|
||||||
# Monterey needs future review:
|
# Monterey needs future review:
|
||||||
# Llvm, aliyun-cli, gnupg, helm have issues with building from the source code.
|
# aliyun-cli, gnupg, helm have issues with building from the source code.
|
||||||
# Added gmp for now, because toolcache ruby needs its libs. Remove it when php starts to build from source code.
|
# Added gmp for now, because toolcache ruby needs its libs. Remove it when php starts to build from source code.
|
||||||
common_packages=$(get_toolset_value '.brew.common_packages[]')
|
common_packages=$(get_toolset_value '.brew.common_packages[]')
|
||||||
for package in $common_packages; do
|
for package in $common_packages; do
|
||||||
|
|||||||
8
images/macos/provision/core/llvm.sh
Normal file
8
images/macos/provision/core/llvm.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/utils.sh
|
||||||
|
|
||||||
|
llvmVersion=$(get_toolset_value '.llvm.version')
|
||||||
|
|
||||||
|
brew_smart_install "llvm@${llvmVersion}"
|
||||||
|
|
||||||
|
invoke_tests "LLVM"
|
||||||
@@ -160,6 +160,7 @@
|
|||||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"./provision/core/commonutils.sh",
|
"./provision/core/commonutils.sh",
|
||||||
|
"./provision/core/llvm.sh",
|
||||||
"./provision/core/golang.sh",
|
"./provision/core/golang.sh",
|
||||||
"./provision/core/swiftlint.sh",
|
"./provision/core/swiftlint.sh",
|
||||||
"./provision/core/openjdk.sh",
|
"./provision/core/openjdk.sh",
|
||||||
|
|||||||
@@ -165,6 +165,7 @@
|
|||||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"./provision/core/commonutils.sh",
|
"./provision/core/commonutils.sh",
|
||||||
|
"./provision/core/llvm.sh",
|
||||||
"./provision/core/golang.sh",
|
"./provision/core/golang.sh",
|
||||||
"./provision/core/swiftlint.sh",
|
"./provision/core/swiftlint.sh",
|
||||||
"./provision/core/openjdk.sh",
|
"./provision/core/openjdk.sh",
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ build {
|
|||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
scripts = [
|
scripts = [
|
||||||
"./provision/core/commonutils.sh",
|
"./provision/core/commonutils.sh",
|
||||||
|
"./provision/core/llvm.sh",
|
||||||
"./provision/core/golang.sh",
|
"./provision/core/golang.sh",
|
||||||
"./provision/core/swiftlint.sh",
|
"./provision/core/swiftlint.sh",
|
||||||
"./provision/core/openjdk.sh",
|
"./provision/core/openjdk.sh",
|
||||||
|
|||||||
@@ -30,19 +30,12 @@ Describe "SwiftFormat" -Skip:($os.IsMonterey) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Describe "GnuPG" -Skip:($os.IsMonterey) {
|
Describe "GnuPG" -Skip:($os.IsMonterey) {
|
||||||
It "GnuPG" {
|
It "GnuPG" {
|
||||||
"gpg --version" | Should -ReturnZeroExitCode
|
"gpg --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Clang/LLVM" -Skip:($os.IsMonterey) {
|
|
||||||
It "Clang/LLVM is installed" {
|
|
||||||
"$(brew --prefix llvm)/bin/clang --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Describe "zstd" {
|
Describe "zstd" {
|
||||||
It "zstd" {
|
It "zstd" {
|
||||||
"zstd --version" | Should -ReturnZeroExitCode
|
"zstd --version" | Should -ReturnZeroExitCode
|
||||||
|
|||||||
9
images/macos/tests/LLVM.Tests.ps1
Normal file
9
images/macos/tests/LLVM.Tests.ps1
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
$os = Get-OSVersion
|
||||||
|
|
||||||
|
Describe "Clang/LLVM" -Skip:($os.IsMonterey) {
|
||||||
|
It "Clang/LLVM is installed and version is correct" {
|
||||||
|
$toolsetVersion = Get-ToolsetValue 'llvm.version'
|
||||||
|
$clangVersion = & "$(brew --prefix llvm)/bin/clang" --version
|
||||||
|
$clangVersion[0] | Should -BeLike "*${toolsetVersion}*"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -215,7 +215,6 @@
|
|||||||
"helm",
|
"helm",
|
||||||
"kotlin",
|
"kotlin",
|
||||||
"libpq",
|
"libpq",
|
||||||
"llvm",
|
|
||||||
"p7zip",
|
"p7zip",
|
||||||
"packer",
|
"packer",
|
||||||
"parallel",
|
"parallel",
|
||||||
@@ -339,5 +338,8 @@
|
|||||||
"12",
|
"12",
|
||||||
"14"
|
"14"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"llvm": {
|
||||||
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,6 @@
|
|||||||
"helm",
|
"helm",
|
||||||
"kotlin",
|
"kotlin",
|
||||||
"libpq",
|
"libpq",
|
||||||
"llvm",
|
|
||||||
"p7zip",
|
"p7zip",
|
||||||
"packer",
|
"packer",
|
||||||
"perl",
|
"perl",
|
||||||
@@ -291,5 +290,8 @@
|
|||||||
"12",
|
"12",
|
||||||
"14"
|
"14"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"llvm": {
|
||||||
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user