From 12daf6d78985dd942eb383026ad2bf36c4dc2f0d Mon Sep 17 00:00:00 2001 From: Luc Varoqui Date: Thu, 8 Oct 2026 15:54:48 +0200 Subject: [PATCH] ci: build the package for Ubuntu 26.04 Add Ubuntu 26.04 to the release matrix, for amd64 and arm64, and to the Callgrind tests. The arm64 package builds on the GitHub-hosted ubuntu-26.04-arm runner. Add Justfile recipes to check a release before it ships on an Ubuntu release other than the host's: `just docker-deb ` builds the .deb in Docker as the release workflow does, unsigned, installs it and runs Callgrind on it, then writes it to dist/ under its release asset name; `just docker-test ` runs the Callgrind tests as the CI does. Both build the tracked files of the working tree in a throwaway container. Refs COD-3305 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 10 ++++++++-- .gitignore | 3 +++ Justfile | 12 ++++++++++++ docker/deb.Dockerfile | 28 ++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 docker/deb.Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95f8000bb..94f6afe2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: ubuntu-version: 22.04 - platform: ubuntu-24.04 ubuntu-version: 24.04 + - platform: ubuntu-26.04 + ubuntu-version: 26.04 runs-on: ${{ matrix.runner.platform }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f639d782..7c218bc13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,12 +19,18 @@ jobs: - architecture: amd64 platform: ubuntu-24.04 ubuntu-version: 24.04 + - architecture: amd64 + platform: ubuntu-26.04 + ubuntu-version: 26.04 - architecture: arm64 - platform: codspeedhq-arm64-ubuntu-22.04 + platform: ubuntu-22.04-arm ubuntu-version: 22.04 - architecture: arm64 - platform: codspeedhq-arm64-ubuntu-24.04 + platform: ubuntu-24.04-arm ubuntu-version: 24.04 + - architecture: arm64 + platform: ubuntu-26.04-arm + ubuntu-version: 26.04 runs-on: ${{ matrix.runner.platform }} steps: diff --git a/.gitignore b/.gitignore index 6f1e869b8..4ddcb08a0 100644 --- a/.gitignore +++ b/.gitignore @@ -2583,3 +2583,6 @@ test-suite.log # python bytecode cache left behind when something imports generate_config.py as a module /bench/__pycache__/ + +# Packages built by `just docker-deb` +/dist/ diff --git a/Justfile b/Justfile index 45a99fad4..e53a73111 100644 --- a/Justfile +++ b/Justfile @@ -46,3 +46,15 @@ install version: cd "/tmp/valgrind-build/valgrind-{{ version }}" sudo make install +# Builds the .deb for an Ubuntu release in Docker with docker/deb.Dockerfile, like the release +# workflow but unsigned, then installs it and runs Callgrind on it. The package lands in dist/ +# under its release asset name. Builds the tracked files of the working tree, local changes +# included. +# Usage: just docker-deb 26.04 +docker-deb ubuntu_version: + #!/usr/bin/env bash + set -euo pipefail + git submodule update --init --recursive + git ls-files -z --recurse-submodules | tar --null -T - -cf - | + docker build -f docker/deb.Dockerfile --build-arg UBUNTU_VERSION="{{ ubuntu_version }}" \ + --output type=local,dest=dist - diff --git a/docker/deb.Dockerfile b/docker/deb.Dockerfile new file mode 100644 index 000000000..fe5d4a407 --- /dev/null +++ b/docker/deb.Dockerfile @@ -0,0 +1,28 @@ +# Builds the .deb for an Ubuntu release like the release workflow, but unsigned, then installs +# it and runs Callgrind on it. The final stage holds only the package, named as its release +# asset, for `docker build --output`. +ARG UBUNTU_VERSION=24.04 + +FROM ubuntu:${UBUNTU_VERSION} AS build +ARG UBUNTU_VERSION +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update -q \ + && apt-get install -y -q build-essential devscripts debhelper dh-make \ + && apt-get install -y -q debhelper-compat gdb mpi-default-dev pkgconf docbook docbook-xsl \ + docbook-xml xsltproc + +WORKDIR /build/src +COPY . . +RUN debuild --no-tgz-check -nc -us -uc >/build/debuild.log 2>&1 \ + || { tail -n 50 /build/debuild.log; exit 1; } + +RUN deb=$(ls /build/valgrind_*.deb) \ + && version=$(dpkg-deb -f "$deb" Version) \ + && mkdir /out \ + && cp "$deb" "/out/valgrind_${version#*:}_ubuntu-${UBUNTU_VERSION}_$(dpkg-deb -f "$deb" Architecture).deb" +RUN apt-get install -y -q /out/*.deb \ + && valgrind --version \ + && valgrind --tool=callgrind --cycle-estimation=yes --callgrind-out-file=/dev/null /bin/true + +FROM scratch +COPY --from=build /out/ /