[libc++][CI] Updates and improves the Docker image.
Since we branched LLVM install Clang 16 and remove Clang 12. Currently our Docker installs 4 versions of Clang so our CI can use the same image for both the main and the release branch. This wasn't done for the other Clang tools so they always use the same version for testing the main and the release branch. Instead install 2 versions for the tools. However it seems the default for Clang and its tools were the latest released version instead of the ToT. To lessen the risk of breaking the release CI, version 14 is installed hard-coded as a temporary solution. Updating the main branch to use the Clang 16 compiler will be done in a separate patch. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D131324
This commit is contained in:
parent
74b5dad5e9
commit
4761a74fd8
|
@ -55,34 +55,34 @@ RUN locale-gen
|
||||||
# LLVM 15, we still need to have Clang 12 in this Docker image because the LLVM
|
# LLVM 15, we still need to have Clang 12 in this Docker image because the LLVM
|
||||||
# 14 release branch CI uses it. The tip-of-trunk CI will never use Clang 12,
|
# 14 release branch CI uses it. The tip-of-trunk CI will never use Clang 12,
|
||||||
# though.
|
# though.
|
||||||
ENV LLVM_LATEST_VERSION=14
|
ENV LLVM_HEAD_VERSION=16
|
||||||
RUN apt-get update && apt-get install -y lsb-release wget software-properties-common
|
RUN apt-get update && apt-get install -y lsb-release wget software-properties-common
|
||||||
RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
|
RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
|
||||||
# TODO Use the apt.llvm.org version after branching to LLVM 15
|
RUN bash /tmp/llvm.sh $(($LLVM_HEAD_VERSION - 3)) # for CI transitions
|
||||||
RUN apt-get update && apt-get install -y clang-$(($LLVM_LATEST_VERSION - 2))
|
RUN bash /tmp/llvm.sh $(($LLVM_HEAD_VERSION - 2)) # previous release
|
||||||
#RUN bash /tmp/llvm.sh $(($LLVM_LATEST_VERSION - 2)) # for CI transitions
|
RUN bash /tmp/llvm.sh $(($LLVM_HEAD_VERSION - 1)) # latest release
|
||||||
RUN bash /tmp/llvm.sh $(($LLVM_LATEST_VERSION - 1)) # previous release
|
RUN bash /tmp/llvm.sh $LLVM_HEAD_VERSION # current ToT
|
||||||
RUN bash /tmp/llvm.sh $LLVM_LATEST_VERSION # latest release
|
|
||||||
RUN bash /tmp/llvm.sh $(($LLVM_LATEST_VERSION + 1)) # current ToT
|
|
||||||
|
|
||||||
# Make the latest version of Clang the "default" compiler on the system
|
# Make the latest version of Clang the "default" compiler on the system
|
||||||
# TODO: In the future, all jobs should be using an explicitly-versioned version of Clang instead,
|
# TODO: After branching for LLVM 16, all jobs will be using an
|
||||||
# and we can get rid of this entirely.
|
# explicitly-versioned version of Clang instead, so we can get rid of
|
||||||
RUN ln -fs /usr/bin/clang++-$LLVM_LATEST_VERSION /usr/bin/c++ && [ -e $(readlink /usr/bin/c++) ]
|
# these symlinks.
|
||||||
RUN ln -fs /usr/bin/clang-$LLVM_LATEST_VERSION /usr/bin/cc && [ -e $(readlink /usr/bin/cc) ]
|
RUN ln -fs /usr/bin/clang++-14 /usr/bin/c++ && [ -e $(readlink /usr/bin/c++) ]
|
||||||
|
RUN ln -fs /usr/bin/clang-14 /usr/bin/cc && [ -e $(readlink /usr/bin/cc) ]
|
||||||
|
|
||||||
# Install clang-format
|
# Install clang-format; always use the lastest stable branch.
|
||||||
RUN apt-get update && apt-get install -y clang-format-$LLVM_LATEST_VERSION
|
# TODO LLVM 16 remove hard-coded version 14 and the symlinks
|
||||||
RUN ln -s /usr/bin/clang-format-$LLVM_LATEST_VERSION /usr/bin/clang-format && [ -e $(readlink /usr/bin/clang-format) ]
|
RUN apt-get update && apt-get install -y clang-format-$(($LLVM_HEAD_VERSION - 2)) clang-format-$(($LLVM_HEAD_VERSION - 1))
|
||||||
RUN ln -s /usr/bin/git-clang-format-$LLVM_LATEST_VERSION /usr/bin/git-clang-format && [ -e $(readlink /usr/bin/git-clang-format) ]
|
RUN ln -s /usr/bin/clang-format-14 /usr/bin/clang-format && [ -e $(readlink /usr/bin/clang-format) ]
|
||||||
|
RUN ln -s /usr/bin/git-clang-format-14 /usr/bin/git-clang-format && [ -e $(readlink /usr/bin/git-clang-format) ]
|
||||||
|
|
||||||
# Install clang-tidy
|
# Install clang-tidy
|
||||||
RUN apt-get update && apt-get install -y clang-tidy-$LLVM_LATEST_VERSION
|
# TODO LLVM 16 remove hard-coded version 14 and the symlink
|
||||||
RUN ln -s /usr/bin/clang-tidy-$LLVM_LATEST_VERSION /usr/bin/clang-tidy && [ -e $(readlink /usr/bin/clang-tidy) ]
|
RUN apt-get update && apt-get install -y clang-tidy-$(($LLVM_HEAD_VERSION - 1)) clang-tidy-$LLVM_HEAD_VERSION clang-tidy-14
|
||||||
|
RUN ln -s /usr/bin/clang-tidy-14 /usr/bin/clang-tidy && [ -e $(readlink /usr/bin/clang-tidy) ]
|
||||||
|
|
||||||
# Install clang-tools
|
# Install clang-tools
|
||||||
RUN apt-get update && apt-get install -y clang-tools-$LLVM_LATEST_VERSION
|
RUN apt-get update && apt-get install -y clang-tools-$(($LLVM_HEAD_VERSION - 1)) clang-tools-$LLVM_HEAD_VERSION
|
||||||
RUN ln -s /usr/bin/clang-query-$LLVM_LATEST_VERSION /usr/bin/clang-query && [ -e $(readlink /usr/bin/clang-query) ]
|
|
||||||
|
|
||||||
# Install the most recent GCC, like clang install the previous version as a transition.
|
# Install the most recent GCC, like clang install the previous version as a transition.
|
||||||
ENV GCC_LATEST_VERSION=12
|
ENV GCC_LATEST_VERSION=12
|
||||||
|
|
Loading…
Reference in New Issue