Auto merge of #113931 - cuviper:ci-ubuntu-22.04, r=Mark-Simulacrum

ci: update ubuntu:20.04 builders to 22.04

This is mostly just maintenance to avoid bitrotting, but 22.04 also updates to cmake 3.22, so they don't need the manual builds from #113714 anymore.
This commit is contained in:
bors 2023-07-28 17:36:35 +00:00
commit b6dd153fbc
14 changed files with 507 additions and 278 deletions

View File

@ -1,6 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
ninja-build \
@ -17,9 +18,6 @@ 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

@ -1,6 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get install -y --no-install-recommends \
bc \
bzip2 \
ca-certificates \
@ -34,14 +35,14 @@ WORKDIR /build
# the kernel. This file was generated by running `make vexpress_defconfig`
# followed by `make menuconfig` and then enabling the IPv6 protocol page.
COPY host-x86_64/armhf-gnu/vexpress_config /build/.config
RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.253.tar.xz | \
RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.320.tar.xz | \
tar xJf - && \
cd /build/linux-4.4.253 && \
cd /build/linux-4.14.320 && \
cp /build/.config . && \
make -j$(nproc) all && \
cp arch/arm/boot/zImage /tmp && \
cd /build && \
rm -rf linux-4.4.253
rm -rf linux-4.14.320
# Compile an instance of busybox as this provides a lightweight system and init
# binary which we will boot into. Only trick here is configuring busybox to
@ -59,7 +60,7 @@ RUN curl https://www.busybox.net/downloads/busybox-1.32.1.tar.bz2 | tar xjf - &&
# Download the ubuntu rootfs, which we'll use as a chroot for all our tests.
WORKDIR /tmp
RUN mkdir rootfs/ubuntu
RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.1-base-armhf.tar.gz | \
RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04.2-base-armhf.tar.gz | \
tar xzf - -C rootfs/ubuntu && \
cd rootfs && mkdir proc sys dev etc etc/init.d
@ -76,9 +77,6 @@ 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

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,16 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
COPY scripts/rustbuild-setup.sh /scripts/
RUN sh /scripts/rustbuild-setup.sh
USER rustbuild
WORKDIR /tmp
USER root
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

@ -1,6 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
automake \
bison \
@ -73,8 +74,8 @@ RUN env \
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv6 -marm -mfpu=vfp" \
bash musl.sh armhf && \
env \
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a" \
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a" \
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a+fp" \
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a+fp" \
bash musl.sh armv7hf && \
env \
CC=mips-openwrt-linux-gcc \
@ -147,7 +148,7 @@ ENV TARGETS=$TARGETS,armv7a-none-eabi
ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft" \
CFLAGS_arm_unknown_linux_musleabi="-march=armv6 -marm" \
CFLAGS_arm_unknown_linux_musleabihf="-march=armv6 -marm -mfpu=vfp" \
CFLAGS_armv7_unknown_linux_musleabihf="-march=armv7-a" \
CFLAGS_armv7_unknown_linux_musleabihf="-march=armv7-a+fp" \
CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
CC_mips64el_unknown_linux_muslabi64=mips64el-linux-gnuabi64-gcc \
@ -186,9 +187,6 @@ 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

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
@ -9,7 +9,7 @@ RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \
build-essential \
# gcc-multilib can not be installed together with gcc-arm-linux-gnueabi
g++-8-multilib \
g++-9-multilib \
libedit-dev \
libgmp-dev \
libisl-dev \
@ -24,7 +24,7 @@ RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no
# Needed for apt-key to work:
dirmngr \
gpg-agent \
g++-8-arm-linux-gnueabi
g++-9-arm-linux-gnueabi
RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486
RUN add-apt-repository -y 'deb https://apt.dilos.org/dilos dilos2 main'
@ -51,8 +51,8 @@ ENV \
AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ \
CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-8 \
CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-8 \
CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-9 \
CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-9 \
AR_x86_64_fortanix_unknown_sgx=ar \
CC_x86_64_fortanix_unknown_sgx=clang-11 \
CFLAGS_x86_64_fortanix_unknown_sgx="-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \
@ -67,14 +67,14 @@ ENV \
CXX_i686_unknown_uefi=clang++-11 \
CC_x86_64_unknown_uefi=clang-11 \
CXX_x86_64_unknown_uefi=clang++-11 \
CC=gcc-8 \
CXX=g++-8
CC=gcc-9 \
CXX=g++-9
WORKDIR /build
COPY scripts/musl.sh /build
RUN env \
CC=arm-linux-gnueabi-gcc-8 CFLAGS="-march=armv7-a" \
CXX=arm-linux-gnueabi-g++-8 CXXFLAGS="-march=armv7-a" \
CC=arm-linux-gnueabi-gcc-9 CFLAGS="-march=armv7-a" \
CXX=arm-linux-gnueabi-g++-9 CXXFLAGS="-march=armv7-a" \
bash musl.sh armv7 && \
rm -rf /build/*
@ -96,9 +96,6 @@ 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
@ -132,7 +129,7 @@ ENV TARGETS=$TARGETS,i686-unknown-uefi
ENV TARGETS=$TARGETS,x86_64-unknown-uefi
# As per https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1300211
# we need asm in the search path for gcc-8 (for gnux32) but not in the search path of the
# we need asm in the search path for gcc-9 (for gnux32) but not in the search path of the
# cross compilers.
# Luckily one of the folders is /usr/local/include so symlink /usr/include/asm-generic there
RUN ln -s /usr/include/asm-generic /usr/local/include/asm

View File

@ -1,6 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
ninja-build \
@ -11,6 +12,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
python3 \
git \
cmake \
bzip2 \
xz-utils \
sudo \
gdb \
@ -21,10 +23,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
WORKDIR /build/
# Build cmake before musl toolchain, as we replace the compiler during that step.
COPY scripts/cmake.sh /scripts/
RUN /scripts/cmake.sh
COPY scripts/musl-toolchain.sh /build/
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \

View File

@ -1,14 +1,14 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y zlib1g-dev
RUN 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
# GCC 10 changed the default to -fno-common, which causes errors with the NetBSD-9.0 sources like:
# /usr/bin/ld: buf.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
RUN env HOST_CFLAGS="-O -fcommon" /tmp/build-netbsd-toolchain.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

View File

@ -1,6 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
clang-11 \
g++ \
make \
@ -15,10 +16,12 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
gdb \
libssl-dev \
pkg-config \
bzip2 \
xz-utils \
wget \
patch \
ovmf \
ovmf-ia32 \
qemu-efi-aarch64 \
qemu-system-arm \
qemu-system-x86 \
@ -27,19 +30,11 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
RUN curl -sL https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.xz | \
tar -xJ
# Install 32-bit OVMF files for the i686-unknown-uefi test. This package
# is not available in ubuntu 20.04, so download a 22.04 package.
RUN curl -sL --output ovmf-ia32.deb http://mirrors.kernel.org/ubuntu/pool/universe/e/edk2/ovmf-ia32_2022.02-3_all.deb
RUN dpkg -i ovmf-ia32.deb && rm ovmf-ia32.deb
WORKDIR /build/
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

@ -109,12 +109,7 @@ def build_and_run(tmp_dir, target):
'-drive',
f'format=raw,file=fat:rw:{esp}',
capture=True,
# Ubuntu 20.04 (which is what the Dockerfile currently
# uses) provides QEMU 4.2.1, which segfaults on
# shutdown under some circumstances. That has been
# fixed in newer versions of QEMU, but for now just
# don't check the exit status.
check=False,
check=True,
# Set a timeout to kill the VM in case something goes wrong.
timeout=60).stdout

View File

@ -1,6 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
ninja-build \
@ -20,9 +21,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
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
@ -57,6 +55,7 @@ COPY static/gitconfig /etc/gitconfig
# Emscripten installation is user-specific
ENV NO_CHANGE_USER=1
RUN chown 10719 -R /emsdk-portable/
# Exclude library/alloc due to OOM in benches.
ENV SCRIPT python3 ../x.py test --stage 2 --host='' --target $TARGETS \

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
@ -26,9 +26,6 @@ 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

@ -1,7 +1,8 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
# Avoid interactive prompts while installing `tzdata` dependency with `DEBIAN_FRONTEND`.
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
ninja-build \
@ -18,9 +19,6 @@ 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

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
@ -19,9 +19,6 @@ 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