mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[Ubuntu] Install zstd homebrew (#3181)
* install zstd using brew * fix typo * remove Run-Command * replace to Take-OutputPart * create zstd symlinks
This commit is contained in:
committed by
GitHub
parent
16fd521369
commit
b04de88f6e
@@ -130,7 +130,8 @@ $toolsList = @(
|
|||||||
(Get-PulumiVersion),
|
(Get-PulumiVersion),
|
||||||
(Get-RVersion),
|
(Get-RVersion),
|
||||||
(Get-SphinxVersion),
|
(Get-SphinxVersion),
|
||||||
(Get-TerraformVersion)
|
(Get-TerraformVersion),
|
||||||
|
(Get-ZstdVersion)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (-not (Test-IsUbuntu16)) {
|
if (-not (Test-IsUbuntu16)) {
|
||||||
|
|||||||
@@ -263,3 +263,8 @@ function Get-SphinxVersion {
|
|||||||
function Get-YamllintVersion {
|
function Get-YamllintVersion {
|
||||||
return "$(yamllint --version)"
|
return "$(yamllint --version)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-ZstdVersion {
|
||||||
|
$zstdVersion = zstd --version | Take-OutputPart -Part 1 -Delimiter "v" | Take-OutputPart -Part 0 -Delimiter ","
|
||||||
|
return "zstd $zstdVersion (homebrew)"
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
# Source the helpers
|
# Source the helpers
|
||||||
source $HELPER_SCRIPTS/etc-environment.sh
|
source $HELPER_SCRIPTS/etc-environment.sh
|
||||||
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
# Install the Homebrew on Linux
|
# Install the Homebrew on Linux
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||||
@@ -25,4 +26,15 @@ setEtcEnvironmentVariable HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS 3650
|
|||||||
echo "Validate the installation reloading /etc/environment"
|
echo "Validate the installation reloading /etc/environment"
|
||||||
reloadEtcEnvironment
|
reloadEtcEnvironment
|
||||||
|
|
||||||
|
# Install additional brew packages
|
||||||
|
brew_packages=$(get_toolset_value .brew[].name)
|
||||||
|
for package in $brew_packages; do
|
||||||
|
echo "Install $package"
|
||||||
|
brew install $package
|
||||||
|
# create symlinks for zstd in /usr/local/bin
|
||||||
|
if [[ $package == "zstd" ]]; then
|
||||||
|
find $(brew --prefix)/bin -name *zstd* -exec sudo sh -c 'ln -s {} /usr/local/bin/$(basename {})' ';'
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
invoke_tests "Tools" "Homebrew"
|
invoke_tests "Tools" "Homebrew"
|
||||||
|
|||||||
@@ -225,6 +225,14 @@ Describe "Homebrew" {
|
|||||||
It "homebrew" {
|
It "homebrew" {
|
||||||
"brew --version" | Should -ReturnZeroExitCode
|
"brew --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Context "Packages" {
|
||||||
|
$testCases = (Get-ToolsetContent).brew | ForEach-Object { @{ ToolName = $_.name } }
|
||||||
|
|
||||||
|
It "<ToolName>" -TestCases $testCases {
|
||||||
|
"$ToolName --version" | Should -Not -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Julia" {
|
Describe "Julia" {
|
||||||
|
|||||||
@@ -161,7 +161,6 @@
|
|||||||
"xorriso",
|
"xorriso",
|
||||||
"xvfb",
|
"xvfb",
|
||||||
"xz-utils",
|
"xz-utils",
|
||||||
"zstd",
|
|
||||||
"zsync"
|
"zsync"
|
||||||
],
|
],
|
||||||
"cmd_packages": [
|
"cmd_packages": [
|
||||||
@@ -202,6 +201,9 @@
|
|||||||
"zip"
|
"zip"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"brew": [
|
||||||
|
{"name": "zstd"}
|
||||||
|
],
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
"alpine:3.11",
|
"alpine:3.11",
|
||||||
|
|||||||
@@ -155,7 +155,6 @@
|
|||||||
"xorriso",
|
"xorriso",
|
||||||
"xvfb",
|
"xvfb",
|
||||||
"xz-utils",
|
"xz-utils",
|
||||||
"zstd",
|
|
||||||
"zsync"
|
"zsync"
|
||||||
],
|
],
|
||||||
"cmd_packages": [
|
"cmd_packages": [
|
||||||
@@ -195,6 +194,9 @@
|
|||||||
"zip"
|
"zip"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"brew": [
|
||||||
|
{"name": "zstd"}
|
||||||
|
],
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
"alpine:3.11",
|
"alpine:3.11",
|
||||||
|
|||||||
@@ -154,7 +154,6 @@
|
|||||||
"xorriso",
|
"xorriso",
|
||||||
"xvfb",
|
"xvfb",
|
||||||
"xz-utils",
|
"xz-utils",
|
||||||
"zstd",
|
|
||||||
"zsync"
|
"zsync"
|
||||||
],
|
],
|
||||||
"cmd_packages": [
|
"cmd_packages": [
|
||||||
@@ -195,6 +194,9 @@
|
|||||||
"zip"
|
"zip"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"brew": [
|
||||||
|
{"name": "zstd"}
|
||||||
|
],
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
"alpine:3.11",
|
"alpine:3.11",
|
||||||
|
|||||||
Reference in New Issue
Block a user