mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
ci: use the system llvm-11 package on Focal
ATTOW llvm-11 got into focal-updates, which conflicts with llvm-11 provided by the apt.llvm.org repositories. Let's use the system llvm package if available in such cases to avoid that.
This commit is contained in:
parent
de3ef2524e
commit
1c71302f70
16
.github/workflows/build_test.sh
vendored
16
.github/workflows/build_test.sh
vendored
@ -72,11 +72,17 @@ if [[ "$COMPILER" == clang ]]; then
|
|||||||
CC="clang-$COMPILER_VERSION"
|
CC="clang-$COMPILER_VERSION"
|
||||||
CXX="clang++-$COMPILER_VERSION"
|
CXX="clang++-$COMPILER_VERSION"
|
||||||
AR="llvm-ar-$COMPILER_VERSION"
|
AR="llvm-ar-$COMPILER_VERSION"
|
||||||
# Latest LLVM stack deb packages provided by https://apt.llvm.org/
|
|
||||||
# Following snippet was borrowed from https://apt.llvm.org/llvm.sh
|
# ATTOW llvm-11 got into focal-updates, which conflicts with llvm-11
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
# provided by the apt.llvm.org repositories. Let's use the system
|
||||||
add-apt-repository -y "deb http://apt.llvm.org/$RELEASE/ llvm-toolchain-$RELEASE-$COMPILER_VERSION main"
|
# llvm package if available in such cases to avoid that.
|
||||||
PACKAGES+=("clang-$COMPILER_VERSION" "lldb-$COMPILER_VERSION" "lld-$COMPILER_VERSION" "clangd-$COMPILER_VERSION")
|
if ! apt show --quiet "llvm-$COMPILER_VERSION" &>/dev/null; then
|
||||||
|
# Latest LLVM stack deb packages provided by https://apt.llvm.org/
|
||||||
|
# Following snippet was borrowed from https://apt.llvm.org/llvm.sh
|
||||||
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||||
|
add-apt-repository -y "deb http://apt.llvm.org/$RELEASE/ llvm-toolchain-$RELEASE-$COMPILER_VERSION main"
|
||||||
|
PACKAGES+=("clang-$COMPILER_VERSION" "lldb-$COMPILER_VERSION" "lld-$COMPILER_VERSION" "clangd-$COMPILER_VERSION")
|
||||||
|
fi
|
||||||
elif [[ "$COMPILER" == gcc ]]; then
|
elif [[ "$COMPILER" == gcc ]]; then
|
||||||
CC="gcc-$COMPILER_VERSION"
|
CC="gcc-$COMPILER_VERSION"
|
||||||
CXX="g++-$COMPILER_VERSION"
|
CXX="g++-$COMPILER_VERSION"
|
||||||
|
Loading…
Reference in New Issue
Block a user