mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 07:46:57 +00:00
fix clang-8 installation
This commit is contained in:
committed by
GitHub
parent
cd130bd704
commit
cef6c2e54c
@@ -12,13 +12,11 @@ function InstallClang {
|
|||||||
version=$1
|
version=$1
|
||||||
|
|
||||||
echo "Installing clang-$version..."
|
echo "Installing clang-$version..."
|
||||||
# Clang 6.0 is not supported by automatic installation script (`llvm.sh`)
|
if [[ $version =~ 9 ]]; then
|
||||||
# Thus we have to install it explicitly
|
|
||||||
if [[ $version == 6* ]]; then
|
|
||||||
apt-get install -y "clang-$version" "lldb-$version" "lld-$version"
|
|
||||||
else
|
|
||||||
./llvm.sh $version
|
./llvm.sh $version
|
||||||
apt-get install -y "clang-format-$version"
|
apt-get install -y "clang-format-$version"
|
||||||
|
else
|
||||||
|
apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run tests to determine that the software installed as expected
|
# Run tests to determine that the software installed as expected
|
||||||
@@ -35,11 +33,6 @@ function InstallClang {
|
|||||||
DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))"
|
DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install Clang compiler
|
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
|
||||||
apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-6.0 main"
|
|
||||||
apt-get update -y
|
|
||||||
|
|
||||||
# Download script for automatic installation
|
# Download script for automatic installation
|
||||||
wget https://apt.llvm.org/llvm.sh
|
wget https://apt.llvm.org/llvm.sh
|
||||||
chmod +x llvm.sh
|
chmod +x llvm.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user