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,8 +2,8 @@
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Monterey needs future review:
|
||||
# Llvm, 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.
|
||||
# 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.
|
||||
common_packages=$(get_toolset_value '.brew.common_packages[]')
|
||||
for package in $common_packages; do
|
||||
echo "Installing $package..."
|
||||
|
||||
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 }}",
|
||||
"scripts": [
|
||||
"./provision/core/commonutils.sh",
|
||||
"./provision/core/llvm.sh",
|
||||
"./provision/core/golang.sh",
|
||||
"./provision/core/swiftlint.sh",
|
||||
"./provision/core/openjdk.sh",
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
"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",
|
||||
@@ -198,7 +199,7 @@
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
|
||||
"scripts": [
|
||||
"scripts": [
|
||||
"./provision/core/toolset.ps1",
|
||||
"./provision/core/configure-toolset.ps1"
|
||||
]
|
||||
|
||||
@@ -163,6 +163,7 @@ build {
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"./provision/core/commonutils.sh",
|
||||
"./provision/core/llvm.sh",
|
||||
"./provision/core/golang.sh",
|
||||
"./provision/core/swiftlint.sh",
|
||||
"./provision/core/openjdk.sh",
|
||||
|
||||
@@ -30,19 +30,12 @@ Describe "SwiftFormat" -Skip:($os.IsMonterey) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Describe "GnuPG" -Skip:($os.IsMonterey) {
|
||||
It "GnuPG" {
|
||||
"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" {
|
||||
It "zstd" {
|
||||
"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",
|
||||
"kotlin",
|
||||
"libpq",
|
||||
"llvm",
|
||||
"p7zip",
|
||||
"packer",
|
||||
"parallel",
|
||||
@@ -339,5 +338,8 @@
|
||||
"12",
|
||||
"14"
|
||||
]
|
||||
},
|
||||
"llvm": {
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,6 @@
|
||||
"helm",
|
||||
"kotlin",
|
||||
"libpq",
|
||||
"llvm",
|
||||
"p7zip",
|
||||
"packer",
|
||||
"perl",
|
||||
@@ -291,5 +290,8 @@
|
||||
"12",
|
||||
"14"
|
||||
]
|
||||
},
|
||||
"llvm": {
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user