Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Install llvm repo matching the running distro #132

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ kernel_build_make_jobs() {
echo $(( smp > MAX_MAKE_JOBS ? MAX_MAKE_JOBS : smp ))
}

distro_codename() {
DISTRO_CODENAME="noble"
test -f /etc/lsb-release && . /etc/lsb-release
echo "${DISTRO_CODENAME}"
}

# Convert a platform (as returned by uname -m) to the kernel
# arch (as expected by ARCH= env).
platform_to_kernel_arch() {
Expand Down Expand Up @@ -91,4 +97,4 @@ platform_to_deb_arch() {
echo "$1"
;;
esac
}
}
4 changes: 3 additions & 1 deletion setup-build-env/install_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ else
REPO_DISTRO_SUFFIX="-${LLVM_VERSION}"
fi

echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal${REPO_DISTRO_SUFFIX} main" | sudo tee /etc/apt/sources.list.d/llvm.list
DISTRO_CODENAME=$(distro_codename)

echo "deb https://apt.llvm.org/${DISTRO_CODENAME}/ llvm-toolchain-${DISTRO_CODENAME}${REPO_DISTRO_SUFFIX} main" | sudo tee /etc/apt/sources.list.d/llvm.list
n=0
while [ $n -lt 5 ]; do
set +e && \
Expand Down
Loading