diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /.github/images/linux-ci | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to '.github/images/linux-ci')
| -rw-r--r-- | .github/images/linux-ci/Dockerfile.armhf-cross | 76 | ||||
| -rw-r--r-- | .github/images/linux-ci/Dockerfile.armhf-runtime | 1 | ||||
| -rw-r--r-- | .github/images/linux-ci/README.md | 64 | ||||
| -rwxr-xr-x | .github/images/linux-ci/install-armhf-runtime-packages.sh | 1 |
4 files changed, 108 insertions, 34 deletions
diff --git a/.github/images/linux-ci/Dockerfile.armhf-cross b/.github/images/linux-ci/Dockerfile.armhf-cross index f37d1928..09134413 100644 --- a/.github/images/linux-ci/Dockerfile.armhf-cross +++ b/.github/images/linux-ci/Dockerfile.armhf-cross @@ -1,31 +1,27 @@ -FROM debian:bookworm - -ARG IMAGE_REFRESH_EPOCH +FROM debian:bookworm@sha256:704583dbf243593da87cf949fc0543ffeca24a28d36c2760dc9545410cb8ed02 AS toolchain SHELL ["/bin/bash", "-o", "pipefail", "-c"] ENV DEBIAN_FRONTEND=noninteractive COPY .github/scripts/run-apt-get.sh /usr/local/bin/run-apt-get -RUN chmod +x /usr/local/bin/run-apt-get \ - && test -n "$IMAGE_REFRESH_EPOCH" \ - && run-apt-get update \ - && run-apt-get install -y --no-install-recommends \ - asciidoctor autoconf automake binutils bison build-essential \ - ca-certificates ccache cmake curl dpkg-dev file flex gawk git gperf \ - help2man libncurses-dev libtool libtool-bin mmdebstrap patch pkg-config \ - python3 python3-dev qt5-qmake-bin qtbase5-dev-tools qttools5-dev-tools \ - qemu-user-static rsync texinfo unzip wget xz-utils \ - && run-apt-get clean \ - && rm -rf /var/lib/apt/lists/* +COPY .github/scripts/armhf-toolchain-config.sh /usr/local/share/wsjtx-ci/ +RUN set -eux; \ + . /usr/local/share/wsjtx-ci/armhf-toolchain-config.sh; \ + test -n "$ARMHF_TOOLCHAIN_REBUILD_REVISION"; \ + chmod +x /usr/local/bin/run-apt-get; \ + run-apt-get update; \ + run-apt-get install -y --no-install-recommends \ + autoconf automake bison build-essential ca-certificates curl file flex \ + gawk gperf help2man libncurses-dev libtool libtool-bin patch pkg-config python3 \ + rsync texinfo unzip wget xz-utils; \ + run-apt-get clean; \ + rm -rf /var/lib/apt/lists/* -COPY .github/scripts/linux-ci-image-config.sh \ - .github/scripts/armhf-ci-image-config.sh \ - /usr/local/share/wsjtx-ci/ COPY .github/images/linux-ci/armhf-cross-toolchain.config \ /usr/local/share/wsjtx-ci/armhf-cross-toolchain.config RUN set -eux; \ - . /usr/local/share/wsjtx-ci/armhf-ci-image-config.sh; \ + . /usr/local/share/wsjtx-ci/armhf-toolchain-config.sh; \ curl --fail --show-error --silent --location --retry 5 \ -o /tmp/crosstool-ng.tar.xz "$ARMHF_CROSSTOOL_NG_URL"; \ echo "$ARMHF_CROSSTOOL_NG_SHA256 /tmp/crosstool-ng.tar.xz" | sha256sum -c -; \ @@ -38,15 +34,15 @@ RUN set -eux; \ cd /; \ rm -rf /tmp/crosstool-ng /tmp/crosstool-ng.tar.xz; \ useradd --create-home --shell /bin/bash wsjtx; \ - mkdir -p /tmp/wsjtx-ctng-build /var/cache/wsjtx-ctng /opt/wsjtx; \ - chown -R wsjtx:wsjtx /tmp/wsjtx-ctng-build /var/cache/wsjtx-ctng /opt/wsjtx + mkdir -p /var/cache/wsjtx-ctng /opt/wsjtx; \ + chown -R wsjtx:wsjtx /var/cache/wsjtx-ctng /opt/wsjtx -ARG IMAGE_RECIPE_SHA256 USER wsjtx RUN --mount=type=cache,id=wsjtx-armhf-ctng-downloads,target=/var/cache/wsjtx-ctng,uid=1000,gid=1000 \ - --mount=type=cache,id=wsjtx-armhf-ctng-build-${IMAGE_RECIPE_SHA256},target=/tmp/wsjtx-ctng-build,uid=1000,gid=1000 \ set -eux; \ - cd /tmp/wsjtx-ctng-build; \ + build_dir=/tmp/wsjtx-ctng-build; \ + mkdir "$build_dir"; \ + cd "$build_dir"; \ cp /usr/local/share/wsjtx-ci/armhf-cross-toolchain.config .config; \ ct-ng olddefconfig; \ # crosstool-NG prints only a summary on failure; expose the detailed compiler \ @@ -54,9 +50,36 @@ RUN --mount=type=cache,id=wsjtx-armhf-ctng-downloads,target=/var/cache/wsjtx-ctn if ! ct-ng build; then \ tail -n 300 build.log >&2; \ exit 1; \ - fi + fi; \ + cd /; \ + rm -rf "$build_dir" + +FROM debian:bookworm AS cross_builder + +ARG IMAGE_REFRESH_EPOCH + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ENV DEBIAN_FRONTEND=noninteractive + +COPY .github/scripts/run-apt-get.sh /usr/local/bin/run-apt-get +RUN chmod +x /usr/local/bin/run-apt-get \ + && test -n "$IMAGE_REFRESH_EPOCH" \ + && run-apt-get update \ + && run-apt-get install -y --no-install-recommends \ + asciidoctor autoconf automake binutils bison build-essential \ + ca-certificates ccache cmake curl dpkg-dev file flex gawk git gperf \ + help2man libncurses-dev libtool libtool-bin mmdebstrap patch pkg-config \ + python3 python3-dev qt5-qmake-bin qtbase5-dev-tools qttools5-dev-tools \ + qemu-user-static rsync texinfo unzip wget xz-utils \ + && run-apt-get clean \ + && rm -rf /var/lib/apt/lists/* -USER root +COPY --from=toolchain /opt/wsjtx/armhf-toolchain /opt/wsjtx/armhf-toolchain + +COPY .github/scripts/linux-ci-image-config.sh \ + .github/scripts/armhf-toolchain-config.sh \ + .github/scripts/armhf-ci-image-config.sh \ + /usr/local/share/wsjtx-ci/ COPY .github/scripts/linux-ccache-compiler-signature.sh \ .github/scripts/build-hamlib-armhf-cross.sh \ .github/scripts/build-armhf-toolchain-smoke.sh \ @@ -99,11 +122,12 @@ RUN set -eux; \ test "$("$ARMHF_TOOLCHAIN_PREFIX/bin/$ARMHF_TARGET_TRIPLET-gcc" -print-file-name=libquadmath.so.0)" = libquadmath.so.0; \ /usr/local/share/wsjtx-ci/build-armhf-toolchain-smoke.sh \ "$ARMHF_TOOLCHAIN_PREFIX" "$ARMHF_SYSROOT" /opt/wsjtx-ci/toolchain-smoke; \ - rm -rf /tmp/wsjtx-hamlib-build /home/wsjtx + rm -rf /tmp/wsjtx-hamlib-build ARG IMAGE_CREATED ARG IMAGE_GENERATION=local ARG IMAGE_REVISION +ARG IMAGE_RECIPE_SHA256 LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \ org.opencontainers.image.revision="${IMAGE_REVISION}" \ org.opencontainers.image.source="https://github.com/WSJTX/wsjtx-internal" \ diff --git a/.github/images/linux-ci/Dockerfile.armhf-runtime b/.github/images/linux-ci/Dockerfile.armhf-runtime index 85404f0f..d0581a31 100644 --- a/.github/images/linux-ci/Dockerfile.armhf-runtime +++ b/.github/images/linux-ci/Dockerfile.armhf-runtime @@ -16,6 +16,7 @@ RUN chmod +x /usr/local/bin/run-apt-get /usr/local/bin/install-armhf-runtime-pac && /usr/local/bin/install-armhf-runtime-packages COPY .github/scripts/linux-ci-image-config.sh \ + .github/scripts/armhf-toolchain-config.sh \ .github/scripts/armhf-ci-image-config.sh \ .github/scripts/write-armhf-ci-manifest.sh \ .github/scripts/verify-armhf-ci-image.sh \ diff --git a/.github/images/linux-ci/README.md b/.github/images/linux-ci/README.md index 5c3cd01a..29a94eee 100644 --- a/.github/images/linux-ci/README.md +++ b/.github/images/linux-ci/README.md @@ -40,9 +40,11 @@ and `linux-noble:stable` moves last within that cohort. Consumers resolve that pointer to its immutable `build-*` tag and use the same generation for every normal Linux leg. -The armhf image pair is published explicitly with `include_armhf: true`. It is -excluded from routine weekly/monthly refreshes because toolchain construction -is expensive. The pair is built, promoted, and rolled back as one generation. +The ARMHF image pair is included when the cache-refresh workflow refreshes the +normal Linux image cohort. The pair is built, promoted, and rolled back as one +generation. Its toolchain stage is reused unless a toolchain input or the explicit +rebuild revision changes. + Opt-in full-ci, release, and standalone armhf builds resolve the last promoted runtime generation once and require the matching cross-builder tag; a missing member fails explicitly. Manual full-ci can instead name an immutable candidate @@ -74,6 +76,39 @@ retagging a retained `validated-build-*` generation as `stable` for rollback. Promotion and rollback are restricted to `develop`; non-promoting candidate builds may be run from another ref. +## ARMHF toolchain reuse + +The cross-builder has an independent toolchain stage pinned to a Debian Bookworm +amd64 base digest, which monthly refreshes do not update. Its inputs are the +bootstrap package recipe, apt helper, `armhf-toolchain-config.sh`, and +`armhf-cross-toolchain.config`. The final image +uses the maintained Bookworm base and refreshes host packages, the ARMHF sysroot, +and Hamlib independently. Monthly refresh epochs and full image fingerprints do +not invalidate the toolchain stage. + +The ARMHF cross-builder exports intermediate layers to the `buildcache` tag in +its own GHCR package with registry `mode=max` caching. Internal and public-release +publication use their respective package namespaces for both imports and exports. +A fresh builder can therefore reuse the completed toolchain stage. Only source +archives use a local BuildKit cache mount; each actual toolchain build starts with +a clean build directory and retains its detailed failure log in the job output. + +For an intentional toolchain refresh, update the pinned base digest when needed +and increment `ARMHF_TOOLCHAIN_REBUILD_REVISION` in `armhf-toolchain-config.sh`. +The revision invalidates the bootstrap package installation as well as compiler +construction. Compiler, ABI, crosstool-NG, and ct-ng configuration changes also +invalidate the relevant toolchain layers. Publish with `include_armhf: true` and +validate the resulting image pair before promoting it. Final image manifests +and compiler signatures are regenerated against the final host runtime libraries; +reusing compiler files does not bypass compatibility checks. + +To validate reuse, export a baseline cache and import it into a fresh Buildx +builder after changing only the refresh epoch or a downstream dependency input. +The ct-ng build must be cached while the dependency work reruns. A changed ct-ng +configuration or rebuild revision must execute the toolchain build again. Keep +these validation publications separate from stable promotion and retain their +build logs, image verification results, and timings. + ## ccache compatibility The image recipe and ccache compatibility identities intentionally answer @@ -91,10 +126,22 @@ normal per-object invalidation. Changes to unrelated image packages do not discard otherwise compatible objects. A new generation first restores its own snapshot and then falls back to any -compatible older generation. The candidate build recompiles only genuine -misses and saves an augmented generation-specific snapshot before promotion. -Recipe-stale fallback builds may restore caches but are not allowed to save -them. +compatible older generation. The build recompiles only genuine misses and +saves an augmented generation-specific snapshot. Recipe-stale fallback builds +may restore caches but are not allowed to save them. + +ARMHF warming compiles production and test targets and runs the binary audits, +then saves objects without preparing an AppDir or executing runtime tests and +packaging. Image-pair verification, including its brief QEMU checks, remains +required. The `armhf_build_only` workflow input defaults to false, preserving +full ARMHF CI; build-only cache writes require `develop`. + +The cache-refresh workflow selects ARMHF weekly, for relevant build/configuration +changes on `develop`, and through its `linux-armhf` manual target. Source-only +pushes do not select it. Successful internal ARMHF image promotion warms the +exact new generation afterward; a warmer failure does not undo promotion. +Standalone and post-promotion warmers share a concurrency group, and an image +refresh suppresses duplicate standalone warming. ## Retention @@ -102,7 +149,8 @@ The weekly retention job keeps `stable`, preserves unrecognized and untagged versions, retains at least the newest three recognized package versions, and deletes only recognized build, validated-build, and candidate versions older than 60 days. Manual retention runs are dry-run only; scheduled runs apply the -printed plan. +printed plan. The ARMHF `buildcache` tag is protected as an unrecognized tag; +older cache manifests left untagged when it moves are also preserved. The Buildx jobs deliberately disable provenance and SBOM attachment. Even a single-platform attestation is represented through an image index with diff --git a/.github/images/linux-ci/install-armhf-runtime-packages.sh b/.github/images/linux-ci/install-armhf-runtime-packages.sh index a7a18e2e..d715d85a 100755 --- a/.github/images/linux-ci/install-armhf-runtime-packages.sh +++ b/.github/images/linux-ci/install-armhf-runtime-packages.sh @@ -9,6 +9,7 @@ packages=( libboost-atomic1.74.0 libboost-chrono1.74.0 libboost-filesystem1.74.0 libboost-log1.74.0 libboost-regex1.74.0 libboost-thread1.74.0 libqt5widgets5 libqt5network5 libqt5multimedia5 libqt5printsupport5 libqt5test5 + libqt5concurrent5 libqt5multimedia5-plugins libqt5serialport5 libqt5sql5-sqlite libqt5websockets5 qt5-qmake-bin qtbase5-dev-tools libusb-1.0-0 libudev1 libportaudio2 |
