mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[Ubuntu] update zstd version (#6681)
This commit is contained in:
@@ -281,7 +281,7 @@ function Get-YamllintVersion {
|
|||||||
|
|
||||||
function Get-ZstdVersion {
|
function Get-ZstdVersion {
|
||||||
$zstdVersion = zstd --version | Take-OutputPart -Part 1 -Delimiter "v" | Take-OutputPart -Part 0 -Delimiter ","
|
$zstdVersion = zstd --version | Take-OutputPart -Part 1 -Delimiter "v" | Take-OutputPart -Part 0 -Delimiter ","
|
||||||
return "$zstdVersion (Homebrew)"
|
return "$zstdVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-YqVersion {
|
function Get-YqVersion {
|
||||||
|
|||||||
@@ -22,23 +22,6 @@ 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 GCC installation needed because the default Ubuntu components
|
|
||||||
# are too old for current brew software
|
|
||||||
# See:
|
|
||||||
# https://github.com/Homebrew/homebrew-core/issues/110877
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
gfortran=$(brew --prefix)/bin/gfortran
|
gfortran=$(brew --prefix)/bin/gfortran
|
||||||
# Remove gfortran symlink, not to conflict with system gfortran
|
# Remove gfortran symlink, not to conflict with system gfortran
|
||||||
if [[ -e $gfortran ]]; then
|
if [[ -e $gfortran ]]; then
|
||||||
|
|||||||
22
images/linux/scripts/installers/zstd.sh
Normal file
22
images/linux/scripts/installers/zstd.sh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
################################################################################
|
||||||
|
## File: zstd.sh
|
||||||
|
## Desc: Installs zstd
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Source the helpers for use with the script
|
||||||
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
|
apt-get install -y liblz4-dev
|
||||||
|
release_tag=$(curl https://api.github.com/repos/facebook/zstd/releases/latest | jq -r '.tag_name')
|
||||||
|
zstd_tar_name=zstd-${release_tag//v}.tar.gz
|
||||||
|
URL=https://github.com/facebook/zstd/releases/download/${release_tag}/${zstd_tar_name}
|
||||||
|
download_with_retries "${URL}" "/tmp" "${zstd_tar_name}"
|
||||||
|
tar xzf /tmp/$zstd_tar_name -C /tmp
|
||||||
|
make -C /tmp/zstd-${release_tag//v}/contrib/pzstd all
|
||||||
|
make -C /tmp/zstd-${release_tag//v} zstd-release
|
||||||
|
for copyprocess in zstd zstdless zstdgrep; do cp /tmp/zstd-${release_tag//v}/programs/$copyprocess /usr/local/bin/; done
|
||||||
|
cp /tmp/zstd-${release_tag//v}/contrib/pzstd/pzstd /usr/local/bin/
|
||||||
|
for symlink in zstdcat zstdmt unzstd; do ln -sf /usr/local/bin/zstd /usr/local/bin/$symlink; done
|
||||||
|
|
||||||
|
invoke_tests "Tools" "Zstd"
|
||||||
@@ -220,6 +220,16 @@ Describe "Terraform" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "Zstd" {
|
||||||
|
It "zstd" {
|
||||||
|
"zstd --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "pzstd" {
|
||||||
|
"pzstd --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Describe "Vcpkg" {
|
Describe "Vcpkg" {
|
||||||
It "vcpkg" {
|
It "vcpkg" {
|
||||||
"vcpkg version" | Should -ReturnZeroExitCode
|
"vcpkg version" | Should -ReturnZeroExitCode
|
||||||
@@ -257,23 +267,9 @@ Describe "HHVM" -Skip:(Test-IsUbuntu22) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Describe "Homebrew" {
|
Describe "Homebrew" {
|
||||||
$brewToolset = (Get-ToolsetContent).brew
|
|
||||||
$testCases = $brewToolset | ForEach-Object { @{brewName = $_.name; brewCommand = $_.command} }
|
|
||||||
|
|
||||||
It "homebrew" {
|
It "homebrew" {
|
||||||
"/home/linuxbrew/.linuxbrew/bin/brew --version" | Should -ReturnZeroExitCode
|
"/home/linuxbrew/.linuxbrew/bin/brew --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "zstd has /usr/local/bin symlink" {
|
|
||||||
"/usr/local/bin/zstd" | Should -Exist
|
|
||||||
}
|
|
||||||
|
|
||||||
It "homebrew package <brewName>" -TestCases $testCases {
|
|
||||||
$brewPrefix = /home/linuxbrew/.linuxbrew/bin/brew --prefix $brewName
|
|
||||||
$brewPackage = Join-Path $brewPrefix "bin" $brewCommand
|
|
||||||
|
|
||||||
"$brewPackage --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Julia" {
|
Describe "Julia" {
|
||||||
|
|||||||
@@ -221,14 +221,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"brew": [
|
"brew": [
|
||||||
{
|
|
||||||
"name": "gcc@12",
|
|
||||||
"command": "gcc-12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "zstd",
|
|
||||||
"command": "zstd"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
|
|||||||
@@ -221,14 +221,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"brew": [
|
"brew": [
|
||||||
{
|
|
||||||
"name": "gcc@12",
|
|
||||||
"command": "gcc-12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "zstd",
|
|
||||||
"command": "zstd"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
|
|||||||
@@ -206,10 +206,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"brew": [
|
"brew": [
|
||||||
{
|
|
||||||
"name": "zstd",
|
|
||||||
"command": "zstd"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
|
|||||||
@@ -252,7 +252,8 @@
|
|||||||
"{{template_dir}}/scripts/installers/android.sh",
|
"{{template_dir}}/scripts/installers/android.sh",
|
||||||
"{{template_dir}}/scripts/installers/pypy.sh",
|
"{{template_dir}}/scripts/installers/pypy.sh",
|
||||||
"{{template_dir}}/scripts/installers/python.sh",
|
"{{template_dir}}/scripts/installers/python.sh",
|
||||||
"{{template_dir}}/scripts/installers/aws.sh"
|
"{{template_dir}}/scripts/installers/aws.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/zstd.sh"
|
||||||
],
|
],
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
||||||
|
|||||||
@@ -253,7 +253,8 @@
|
|||||||
"{{template_dir}}/scripts/installers/android.sh",
|
"{{template_dir}}/scripts/installers/android.sh",
|
||||||
"{{template_dir}}/scripts/installers/pypy.sh",
|
"{{template_dir}}/scripts/installers/pypy.sh",
|
||||||
"{{template_dir}}/scripts/installers/python.sh",
|
"{{template_dir}}/scripts/installers/python.sh",
|
||||||
"{{template_dir}}/scripts/installers/graalvm.sh"
|
"{{template_dir}}/scripts/installers/graalvm.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/zstd.sh"
|
||||||
],
|
],
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
||||||
|
|||||||
@@ -334,7 +334,8 @@ build {
|
|||||||
"${path.root}/scripts/installers/android.sh",
|
"${path.root}/scripts/installers/android.sh",
|
||||||
"${path.root}/scripts/installers/pypy.sh",
|
"${path.root}/scripts/installers/pypy.sh",
|
||||||
"${path.root}/scripts/installers/python.sh",
|
"${path.root}/scripts/installers/python.sh",
|
||||||
"${path.root}/scripts/installers/graalvm.sh"
|
"${path.root}/scripts/installers/graalvm.sh",
|
||||||
|
"${path.root}/scripts/installers/zstd.sh"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user