mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Revert "install clang9 directly from apt-get"
This reverts commit e7d965f5b4.
This commit is contained in:
@@ -12,7 +12,12 @@ function InstallClang {
|
|||||||
version=$1
|
version=$1
|
||||||
|
|
||||||
echo "Installing clang-$version..."
|
echo "Installing clang-$version..."
|
||||||
|
if [[ $version =~ 9 ]]; then
|
||||||
|
./llvm.sh $version
|
||||||
|
apt-get install -y "clang-format-$version"
|
||||||
|
else
|
||||||
apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version"
|
apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version"
|
||||||
|
fi
|
||||||
|
|
||||||
# Run tests to determine that the software installed as expected
|
# Run tests to determine that the software installed as expected
|
||||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||||
@@ -28,6 +33,10 @@ 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))"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Download script for automatic installation
|
||||||
|
wget https://apt.llvm.org/llvm.sh
|
||||||
|
chmod +x llvm.sh
|
||||||
|
|
||||||
versions=(
|
versions=(
|
||||||
"6.0"
|
"6.0"
|
||||||
"8"
|
"8"
|
||||||
@@ -39,6 +48,8 @@ do
|
|||||||
InstallClang $version
|
InstallClang $version
|
||||||
done
|
done
|
||||||
|
|
||||||
|
rm llvm.sh
|
||||||
|
|
||||||
# Make Clang 9 default
|
# Make Clang 9 default
|
||||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 100
|
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 100
|
||||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 100
|
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 100
|
||||||
|
|||||||
Reference in New Issue
Block a user