From 8096b3df11c6a790fa8b5362855c656c08c59f30 Mon Sep 17 00:00:00 2001 From: SubQ Date: Sun, 6 Dec 2026 07:24:11 +0300 Subject: [PATCH] Split image layers and serialize registry pushes --- .gitea/workflows/build.yml | 3 +++ README.md | 2 +- images/vulkan/Dockerfile | 23 +++++++++++++++-------- images/windows-clang/Dockerfile | 8 +++++++- images/windows-gcc/Dockerfile | 26 ++++++++++++++++---------- 5 files changed, 42 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d31dc2f..6044d30 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -29,6 +29,9 @@ jobs: REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN || secrets.RELEASE_BOT_TOKEN }} strategy: fail-fast: false + # One push at a time: the registry returned HTTP 500 when two multi-GB + # images uploaded concurrently. + max-parallel: 1 matrix: image: - vulkan diff --git a/README.md b/README.md index 5d2704b..88c4127 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ use is already installed: - Boost, OpenSSL, SQLite, libsodium, libarchive, FreeType, GLFW, GoogleTest - Vulkan headers, loader, validation layers, tools, glslang, shaderc, Slang - Mesa with RADV (AMD hardware) and lavapipe (software Vulkan) -- Wine for running Windows tests +- Wine in both Windows images for running Windows tests `windows-gcc` additionally carries the `mingw-w64-toolchain` group (`x86_64-w64-mingw32-gcc/g++`, binutils, CRT, winpthreads) and an initialised diff --git a/images/vulkan/Dockerfile b/images/vulkan/Dockerfile index 05eab1e..eab6c4b 100644 --- a/images/vulkan/Dockerfile +++ b/images/vulkan/Dockerfile @@ -8,6 +8,8 @@ # # Arch Linux is the base because it packages GCC 16 (C++26 reflection), # CMake 4, the Vulkan SDK pieces and every Void dependency in one repository. +# The install is split into several RUN layers so no single image layer gets +# large enough to upset the container registry. FROM archlinux:base-devel LABEL org.opencontainers.image.title="Void CI Vulkan" \ @@ -17,19 +19,27 @@ LABEL org.opencontainers.image.title="Void CI Vulkan" \ ENV LANG=C.UTF-8 \ LC_ALL=C.UTF-8 \ CMAKE_GENERATOR=Ninja \ - CCACHE_DIR=/var/cache/ccache \ - WINEDEBUG=-all \ - WINEDLLOVERRIDES=mscoree,mshtml= + CCACHE_DIR=/var/cache/ccache -RUN pacman -Syu --noconfirm --needed \ +RUN pacman -Syu --noconfirm \ + && pacman -S --noconfirm --needed \ base-devel gcc cmake ninja git pkgconf python ccache \ + && pacman -Scc --noconfirm + +RUN pacman -S --noconfirm --needed \ vulkan-headers vulkan-icd-loader vulkan-validation-layers vulkan-tools \ mesa vulkan-radeon vulkan-swrast vulkan-mesa-layers \ glslang shaderc shader-slang \ + && pacman -Scc --noconfirm + +RUN pacman -S --noconfirm --needed \ glfw gtest boost openssl sqlite libsodium libarchive freetype2 \ libx11 libxcb libxcursor libxrandr libxi libxinerama libxkbcommon \ wayland wayland-protocols \ - wine zip unzip jq curl ca-certificates xorg-server-xvfb \ + && pacman -Scc --noconfirm + +RUN pacman -S --noconfirm --needed \ + zip unzip jq curl ca-certificates xorg-server-xvfb \ && pacman -Scc --noconfirm RUN git config --system --add safe.directory '*' \ @@ -40,7 +50,4 @@ RUN git config --system --add safe.directory '*' \ USER builder WORKDIR /home/builder -# Warm a 64-bit Wine prefix so Windows cross tests do not initialise it per job. -RUN wineboot --init >/dev/null 2>&1 || true; wineserver -w || true - CMD ["/bin/bash"] diff --git a/images/windows-clang/Dockerfile b/images/windows-clang/Dockerfile index ab9f2d6..8b79e08 100644 --- a/images/windows-clang/Dockerfile +++ b/images/windows-clang/Dockerfile @@ -4,6 +4,8 @@ # LLVM-MinGW toolchain in /opt/llvm-mingw (clang, lld, compiler-rt, libc++ and # the mingw-w64 runtime, DEFAULT_CRT=ucrt). Arch's GCC image covers the GCC # side; this one is the clang side. +# +# The install is split into two RUN layers to keep the registry blobs smaller. FROM mstorsjo/llvm-mingw:latest LABEL org.opencontainers.image.title="Void CI Windows Clang" \ @@ -21,9 +23,13 @@ ENV DEBIAN_FRONTEND=noninteractive \ RUN apt-get update \ && apt-get install -y --no-install-recommends \ cmake ninja-build pkg-config git ca-certificates \ + zip unzip jq curl \ + && rm -rf /var/lib/apt/lists/* + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ libvulkan-dev vulkan-tools mesa-vulkan-drivers \ wine xvfb \ - zip unzip jq curl \ && rm -rf /var/lib/apt/lists/* # The Vulkan headers are OS-independent; make them visible to LLVM-MinGW. diff --git a/images/windows-gcc/Dockerfile b/images/windows-gcc/Dockerfile index 86bf89d..d0c45dd 100644 --- a/images/windows-gcc/Dockerfile +++ b/images/windows-gcc/Dockerfile @@ -11,6 +11,9 @@ # Arch ships only the core MinGW toolchain. Extra Windows libraries belong to # the project (CMake FetchContent, vcpkg or conan); the Vulkan headers are # copied into the MinGW sysroot because they are platform-independent. +# +# The install is split into several RUN layers so no single image layer gets +# large enough to upset the container registry. FROM archlinux:base-devel LABEL org.opencontainers.image.title="Void CI Windows GCC" \ @@ -27,19 +30,22 @@ ENV LANG=C.UTF-8 \ WINEDLLOVERRIDES=mscoree,mshtml= \ WINEPATH=Z:/usr/x86_64-w64-mingw32/bin -RUN pacman -Syu --noconfirm --needed \ +RUN pacman -Syu --noconfirm \ + && pacman -S --noconfirm --needed \ base-devel gcc cmake ninja git pkgconf python zip unzip \ - mingw-w64-toolchain \ - vulkan-headers vulkan-icd-loader vulkan-tools \ - mesa vulkan-radeon vulkan-swrast \ - wine xorg-server-xvfb \ - jq curl ca-certificates \ && pacman -Scc --noconfirm -# Optional packages: not every one is in the Arch repositories. -RUN for pkg in nsis wine-mono wine-gecko; do \ - pacman -S --noconfirm --needed "$pkg" || true; \ - done \ +RUN pacman -S --noconfirm --needed \ + mingw-w64-toolchain \ + && pacman -Scc --noconfirm + +RUN pacman -S --noconfirm --needed \ + vulkan-headers vulkan-icd-loader vulkan-tools \ + mesa vulkan-radeon vulkan-swrast \ + && pacman -Scc --noconfirm + +RUN pacman -S --noconfirm --needed \ + wine xorg-server-xvfb jq curl ca-certificates \ && pacman -Scc --noconfirm # The Vulkan headers are OS-independent; make them visible to the MinGW compiler.