Skip to content

Commit 47784c0

Browse files
lvaroquiclaude
andauthored
ci: build the package for Ubuntu 26.04 (#47)
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 <ubuntu version>`. Refs COD-3305 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 60a2e5f commit 47784c0

5 files changed

Lines changed: 53 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
ubuntu-version: 22.04
2020
- platform: ubuntu-24.04
2121
ubuntu-version: 24.04
22+
- platform: ubuntu-26.04
23+
ubuntu-version: 26.04
2224

2325
runs-on: ${{ matrix.runner.platform }}
2426

‎.github/workflows/release.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ jobs:
1919
- architecture: amd64
2020
platform: ubuntu-24.04
2121
ubuntu-version: 24.04
22+
- architecture: amd64
23+
platform: ubuntu-26.04
24+
ubuntu-version: 26.04
2225
- architecture: arm64
23-
platform: codspeedhq-arm64-ubuntu-22.04
26+
platform: ubuntu-22.04-arm
2427
ubuntu-version: 22.04
2528
- architecture: arm64
26-
platform: codspeedhq-arm64-ubuntu-24.04
29+
platform: ubuntu-24.04-arm
2730
ubuntu-version: 24.04
31+
- architecture: arm64
32+
platform: ubuntu-26.04-arm
33+
ubuntu-version: 26.04
2834

2935
runs-on: ${{ matrix.runner.platform }}
3036
steps:

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,3 +2583,6 @@ test-suite.log
25832583

25842584
# python bytecode cache left behind when something imports generate_config.py as a module
25852585
/bench/__pycache__/
2586+
2587+
# Packages built by `just docker-deb`
2588+
/dist/

‎Justfile‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,15 @@ install version:
4646
cd "/tmp/valgrind-build/valgrind-{{ version }}"
4747
sudo make install
4848
49+
# Builds the .deb for an Ubuntu release in Docker with docker/deb.Dockerfile, like the release
50+
# workflow but unsigned, then installs it and runs Callgrind on it. The package lands in dist/
51+
# under its release asset name. Builds the tracked files of the working tree, local changes
52+
# included.
53+
# Usage: just docker-deb 26.04
54+
docker-deb ubuntu_version:
55+
#!/usr/bin/env bash
56+
set -euo pipefail
57+
git submodule update --init --recursive
58+
git ls-files -z --recurse-submodules | tar --null -T - -cf - |
59+
docker build -f docker/deb.Dockerfile --build-arg UBUNTU_VERSION="{{ ubuntu_version }}" \
60+
--output type=local,dest=dist -

‎docker/deb.Dockerfile‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Builds the .deb for an Ubuntu release like the release workflow, but unsigned, then installs
2+
# it and runs Callgrind on it. The final stage holds only the package, named as its release
3+
# asset, for `docker build --output`.
4+
ARG UBUNTU_VERSION=24.04
5+
6+
FROM ubuntu:${UBUNTU_VERSION} AS build
7+
ARG UBUNTU_VERSION
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
RUN apt-get update -q \
10+
&& apt-get install -y -q build-essential devscripts debhelper dh-make \
11+
&& apt-get install -y -q debhelper-compat gdb mpi-default-dev pkgconf docbook docbook-xsl \
12+
docbook-xml xsltproc
13+
14+
WORKDIR /build/src
15+
COPY . .
16+
RUN debuild --no-tgz-check -nc -us -uc >/build/debuild.log 2>&1 \
17+
|| { tail -n 50 /build/debuild.log; exit 1; }
18+
19+
RUN deb=$(ls /build/valgrind_*.deb) \
20+
&& version=$(dpkg-deb -f "$deb" Version) \
21+
&& mkdir /out \
22+
&& cp "$deb" "/out/valgrind_${version#*:}_ubuntu-${UBUNTU_VERSION}_$(dpkg-deb -f "$deb" Architecture).deb"
23+
RUN apt-get install -y -q /out/*.deb \
24+
&& valgrind --version \
25+
&& valgrind --tool=callgrind --cycle-estimation=yes --callgrind-out-file=/dev/null /bin/true
26+
27+
FROM scratch
28+
COPY --from=build /out/ /

0 commit comments

Comments
 (0)