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: Switch from LLVM 12 to 14 #1256

Merged
merged 2 commits into from
Sep 23, 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: 6 additions & 2 deletions .github/Dockerfile-crux-llvm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ RUN apt-get update && \
# Crux dependencies \
pkg-config zlib1g-dev \
# LLVM toolchain
clang-12 llvm-12-tools \
#
# If you update the version numbers below, make sure to update the
# value of LINUX_LLVM_VER in .github/ci.sh (in the install_llvm()
# function).
clang-14 llvm-14-tools \
# Miscellaneous
locales unzip wget
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
Expand Down Expand Up @@ -45,7 +49,7 @@ ADD crux-llvm ${DIR}/build/crux-llvm
ADD dependencies ${DIR}/build/dependencies
ADD .github/cabal.project.crux-llvm ${DIR}/build/cabal.project
ADD cabal.GHC-9.4.8.config ${DIR}/build/cabal.project.freeze
# Workaround until we have an LLVM 12 build available
# Workaround until we have an LLVM 14 build available
RUN cp $DIR/build/crux-llvm/c-src/libcxx-7.1.0.bc $DIR/build/crux-llvm/c-src/libcxx-12.0.1.bc

WORKDIR ${DIR}/build
Expand Down
26 changes: 20 additions & 6 deletions .github/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,27 @@ test() {

install_llvm() {
if [[ "$RUNNER_OS" = "Linux" ]]; then
sudo apt-get update -q && sudo apt-get install -y clang-12 llvm-12-tools
echo "LLVM_LINK=llvm-link-12" >> "$GITHUB_ENV"
echo "LLVM_AS=llvm-as-12" >> "$GITHUB_ENV"
echo "CLANG=clang-12" >> "$GITHUB_ENV"
# Different Ubuntu versions include different LLVM versions in the package
# manager, so we select the appropriate LLVM version below.
#
# If you update the value of LINUX_LLVM_VER below, make sure to also update
# the corresponding LLVM version in .github/Dockerfile-crux-llvm.
if [[ "$BUILD_TARGET_OS" = "ubuntu-22.04" ]]; then
LINUX_LLVM_VER=14
elif [[ "$BUILD_TARGET_OS" = "ubuntu-20.04" ]]; then
LINUX_LLVM_VER=12
else
echo "Don't know what LLVM version to use for $LINUX_LLVM_VER."
exit 1
fi
sudo apt-get update -q && sudo apt-get install -y "clang-$LINUX_LLVM_VER" "llvm-$LINUX_LLVM_VER-tools"
echo "LLVM_LINK=llvm-link-$LINUX_LLVM_VER" >> "$GITHUB_ENV"
echo "LLVM_AS=llvm-as-$LINUX_LLVM_VER" >> "$GITHUB_ENV"
echo "CLANG=clang-$LINUX_LLVM_VER" >> "$GITHUB_ENV"
elif [[ "$RUNNER_OS" = "macOS" ]]; then
brew install llvm@12
echo "$(brew --prefix)/opt/llvm@12/bin" >> "$GITHUB_PATH"
MACOS_LLVM_VER=14
brew install "llvm@$MACOS_LLVM_VER"
echo "$(brew --prefix)/opt/llvm@$MACOS_LLVM_VER/bin" >> "$GITHUB_PATH"
elif [[ "$RUNNER_OS" = "Windows" ]]; then
choco install llvm
else
Expand Down
Loading