From 515fd4a1ae3fa83246020584caafe70dc2722c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sun, 19 Jul 2026 18:28:30 +0200 Subject: [PATCH 1/2] build: add linux/aarch64 Tycho target-environment profile Add a Maven profile activated on linux/aarch64 that sets osgi.os=linux, osgi.ws=gtk, osgi.arch=aarch64. Without it, Tycho falls back to the pom's default win32 target environment on arm64 Linux and builds an unlaunchable test runtime (NoClassDefFoundError: org.eclipse.swt.SWTError, exit code 13), so SWT/UI tests cannot run in an arm64 container. Co-Authored-By: Claude Opus 4.8 (1M context) --- ddk-parent/pom.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ddk-parent/pom.xml b/ddk-parent/pom.xml index 94c86cc68..734c05c72 100644 --- a/ddk-parent/pom.xml +++ b/ddk-parent/pom.xml @@ -477,6 +477,21 @@ x86_64 + + + + linux + aarch64 + unix + + + 64bit_linux_aarch64 + + linux + gtk + aarch64 + + macosx From 29f92bd3a02d7a1d63af47019458c4c4cfefc131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sun, 19 Jul 2026 18:28:30 +0200 Subject: [PATCH 2/2] build: add a Docker build environment for headless DDK builds Adds a small Linux image with Java 21, GTK 3 and Xvfb, so the full build and the UI tests run headlessly on any machine with Docker, on x86-64 or ARM64. It holds only what is specific to Docker, so it needs no upkeep when the build changes: the base image follows the latest Temurin 21 image, and the README runs the build commands from AGENTS.md instead of copying them. The image has no Maven of its own, since the build uses ./mvnw, which pins the Maven version the project can build with. unzip is installed because ./mvnw otherwise downloads the .tar.gz distribution, which doesn't match the wrapper's checksum. tini is the entrypoint, because xvfb-run can hang before starting Maven when it runs as PID 1. Co-Authored-By: Claude Opus 5.5 Co-Authored-By: Claude Fable 5.2 --- docker/Dockerfile | 13 +++++++++++++ docker/README.md | 25 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..a9795c449 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,13 @@ +# No Maven in the image: the build uses ./mvnw, which pins the Maven version the project can build with. +FROM eclipse-temurin:21-jdk-noble + +# Native libraries for SWT on GTK 3 and the JDK's AWT, a virtual display for the UI tests, tini as PID 1, and unzip +# for ./mvnw, which otherwise downloads the .tar.gz that doesn't match its checksum. +RUN apt-get update \ + && apt-get install -y --no-install-recommends libgtk-3-0t64 librsvg2-common libxtst6 tini unzip xvfb \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /workspace + +# Without an init process, xvfb-run runs as PID 1 and can hang before starting Maven. +ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..951d3be0a --- /dev/null +++ b/docker/README.md @@ -0,0 +1,25 @@ +# DDK Docker build environment + +A Linux image with Java, GTK and Xvfb, for running the full build and the UI tests headlessly on any machine with Docker (x86-64 or ARM64). + +Build the image from the repository root: + +```bash +docker build --pull -t ddk-build docker +``` + +Run any build command from [AGENTS.md](../AGENTS.md#build-commands) in it, for example the full CI build, which already starts with `xvfb-run`: + +```bash +docker run --rm \ + --mount "type=bind,source=${PWD},target=/workspace" \ + --mount "type=volume,source=ddk-m2,target=/root/.m2" \ + ddk-build \ + +``` + +In PowerShell, use `$PWD.Path` for the source and backticks for the line breaks, and quote `-D` arguments (`'-DskipTests'`). + +- **Use a full clone, not a linked worktree:** a worktree's `.git` file points outside the mount, and Tycho's build qualifier then fails with `repository not found`. +- The `ddk-m2` volume keeps Maven and p2 downloads between runs; on a machine that builds both architectures, use one volume per architecture. +- The container runs as root, so on a Linux host the build output in the checkout is owned by root.