CI: build CMake 3.20 to support LLVM 17

This commit is contained in:
Jakub Beránek 2023-07-15 08:59:59 +02:00
parent fa06a371b7
commit 18f20439dd
16 changed files with 51 additions and 3 deletions

View File

@ -17,6 +17,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
xz-utils \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -13,6 +13,7 @@ RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-
git \
libc6-dev \
libc6-dev-armhf-cross \
libssl-dev \
make \
ninja-build \
python3 \
@ -75,6 +76,9 @@ RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
# Source of the file: https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/vexpress-v2p-ca15-tc1.dtb
RUN curl -O https://ci-mirrors.rust-lang.org/rustc/vexpress-v2p-ca15-tc1.dtb
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -16,6 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -19,6 +19,7 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
g++ \
libc6-dev \
libc6-dev-riscv64-cross \
libssl-dev \
make \
ninja-build \
patch \
@ -94,6 +95,9 @@ RUN mkdir build && cd build && \
WORKDIR /tmp
RUN rm -rf /tmp/riscv-pk
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -48,6 +48,9 @@ COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
COPY scripts/cmake.sh /tmp/
RUN ./cmake.sh
# Now build LLVM+Clang, afterwards configuring further compilations to use the
# clang/clang++ compilers.
COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/

View File

@ -14,6 +14,9 @@ RUN apt-get install -y --no-install-recommends rpm2cpio cpio
COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /tmp/
RUN ./build-powerpc64le-toolchain.sh
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -186,6 +186,9 @@ ENV SCRIPT \
python3 ../x.py --stage 2 test --host='' --target $RUN_MAKE_TARGETS tests/run-make && \
python3 ../x.py dist --host='' --target $TARGETS
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
# sccache
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -96,6 +96,9 @@ RUN /tmp/build-wasi-toolchain.sh
COPY scripts/freebsd-toolchain.sh /tmp/
RUN /tmp/freebsd-toolchain.sh i686
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -48,6 +48,10 @@ COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
# LLVM 17 needs cmake 3.20 or higher.
COPY scripts/cmake.sh /tmp/
RUN ./cmake.sh
# Now build LLVM+Clang, afterwards configuring further compilations to use the
# clang/clang++ compilers.
COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/

View File

@ -7,6 +7,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y zlib1g-dev
COPY host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh /tmp/
RUN /tmp/build-netbsd-toolchain.sh
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -37,6 +37,9 @@ COPY scripts/musl-toolchain.sh /build/
RUN bash musl-toolchain.sh x86_64 && rm -rf build
WORKDIR /
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -13,12 +13,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
sudo \
gdb \
xz-utils \
libssl-dev \
bzip2 \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -26,6 +26,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
clang \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -18,6 +18,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
xz-utils \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -19,6 +19,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
mingw-w64 \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -18,9 +18,9 @@ exit 1
set -x
}
# LLVM 12 requires CMake 3.13.4 or higher.
# This script is not necessary for images using Ubuntu 20.04 or newer.
CMAKE=3.13.4
# LLVM 17 requires CMake 3.20 or higher.
# This script is not necessary for images using Ubuntu 22.04 or newer.
CMAKE=3.20.3
curl -L https://github.com/Kitware/CMake/releases/download/v$CMAKE/cmake-$CMAKE.tar.gz | tar xzf -
mkdir cmake-build