CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
77 lines
2.9 KiB
Bash
Executable File
77 lines
2.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Downloads and extracts clang-format
|
|
|
|
set -euo pipefail
|
|
|
|
# Check arguments
|
|
if [[ $# -ne 1 ]]; then
|
|
>&2 echo "usage: $0 <output directory>"
|
|
fi
|
|
|
|
# Get absolute path
|
|
output_dir=$(cd -- "$1" && pwd)
|
|
|
|
# Setup temporary workspace
|
|
workspace=$(mktemp -d)
|
|
on_exit() {
|
|
rm -r -- "$workspace"
|
|
}
|
|
trap on_exit EXIT
|
|
cd -- "$workspace"
|
|
|
|
# Check OS
|
|
if [[ -e /etc/os-release ]]; then
|
|
source /etc/os-release
|
|
else
|
|
>&2 echo '/etc/os-release is required to choose a version'
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z ${ID+x} ]]; then
|
|
>&2 echo '$ID must be set'
|
|
exit 1
|
|
fi
|
|
|
|
# Download and extract clang-format to the output directory
|
|
case "$ID" in
|
|
ubuntu)
|
|
wget -q --show-progress https://repo.radeon.com/rocm/apt/4.3.1/pool/main/l/llvm-amdgpu4.3.1/llvm-amdgpu4.3.1_13.0.0.21313.40301_amd64.deb
|
|
echo '5c96fbc11558296422b17a29388ed91d6e436abc7c460d17510e6a5300e1dc8f *llvm-amdgpu4.3.1_13.0.0.21313.40301_amd64.deb' | sha256sum -c || exit
|
|
ar x llvm-amdgpu4.3.1_13.0.0.21313.40301_amd64.deb data.tar.xz
|
|
tar xJf data.tar.xz --strip-components=5 ./opt/rocm-4.3.1/llvm/bin/clang-format
|
|
install --backup --verbose clang-format "$output_dir"
|
|
;;
|
|
centos)
|
|
if [[ -z ${VERSION_ID+x} ]]; then
|
|
>&2 echo '$VERSION_ID must be set'
|
|
exit 1
|
|
fi
|
|
case "$VERSION_ID" in
|
|
7)
|
|
wget https://repo.radeon.com/rocm/yum/rpm/llvm-amdgpu-13.0.0.21295.40300-52.el7.x86_64.rpm
|
|
echo '13984360c38f5a6cb52d79f576902f8f36cfd95aaf8d004223d5c3f5f07e2116 *llvm-amdgpu-13.0.0.21295.40300-52.el7.x86_64.rpm' | sha256sum -c || exit
|
|
rpm2cpio llvm-amdgpu-13.0.0.21295.40300-52.el7.x86_64.rpm | cpio -idm --quiet ./opt/rocm-4.3.0/llvm/bin/clang-format
|
|
install --backup --verbose ./opt/rocm-4.3.0/llvm/bin/clang-format "$output_dir"
|
|
;;
|
|
8)
|
|
wget -q --show-progress https://repo.radeon.com/rocm/centos8/rpm/llvm-amdgpu4.3.0-13.0.0.21295.40300-52.el8.x86_64.rpm
|
|
echo '4c2a6665431e6a37edbc7b5ed4daa5e4289f274af12eb07442b8c32cc63bf849 *llvm-amdgpu4.3.0-13.0.0.21295.40300-52.el8.x86_64.rpm' | sha256sum -c || exit
|
|
rpm2cpio llvm-amdgpu4.3.0-13.0.0.21295.40300-52.el8.x86_64.rpm | cpio -idm --quiet ./opt/rocm-4.3.0/llvm/bin/clang-format
|
|
install --backup --verbose ./opt/rocm-4.3.0/llvm/bin/clang-format "$output_dir"
|
|
;;
|
|
*)
|
|
>&2 echo "centos $VERSION_ID is not a supported OS"
|
|
exit 1 ;;
|
|
esac
|
|
;;
|
|
sles)
|
|
wget -q --show-progress https://repo.radeon.com/rocm/zyp/4.3.1/llvm-amdgpu4.3.1-13.0.0.21313.40301-sles152.59.x86_64.rpm
|
|
echo '992e52d3c9274d266f30efd25b270cd8b3660f3d9fb2d0eca6e801c0e4a2d359 *llvm-amdgpu4.3.1-13.0.0.21313.40301-sles152.59.x86_64.rpm' | sha256sum -c || exit
|
|
rpm2cpio llvm-amdgpu4.3.1-13.0.0.21313.40301-sles152.59.x86_64.rpm | cpio -idm --quiet ./opt/rocm-4.3.1/llvm/bin/clang-format
|
|
install --backup --verbose ./opt/rocm-4.3.1/llvm/bin/clang-format "$output_dir"
|
|
;;
|
|
*)
|
|
>&2 echo "$ID is not a supported OS"
|
|
exit 1 ;;
|
|
esac
|