mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
28
images/ubuntu/scripts/build/install-zstd.sh
Normal file
28
images/ubuntu/scripts/build/install-zstd.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-zstd.sh
|
||||
## Desc: Install zstd
|
||||
## Supply chain security: zstd - checksum validation
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Download zstd
|
||||
release_tag=$(curl -fsSL 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}"
|
||||
# Supply chain security - zstd
|
||||
external_hash=$(get_hash_from_remote_file "${URL}.sha256" "${zstd_tar_name}")
|
||||
use_checksum_comparison "/tmp/${zstd_tar_name}" "${external_hash}"
|
||||
# Install zstd
|
||||
apt-get install -y liblz4-dev
|
||||
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"
|
||||
Reference in New Issue
Block a user