Skip to content

ci: implement robust multi-architecture build and test workflow#677

Merged
tillkamppeter merged 10 commits intoOpenPrinting:masterfrom
rkt0209:master
Mar 9, 2026
Merged

ci: implement robust multi-architecture build and test workflow#677
tillkamppeter merged 10 commits intoOpenPrinting:masterfrom
rkt0209:master

Conversation

@rkt0209
Copy link
Contributor

@rkt0209 rkt0209 commented Mar 9, 2026

Overview

This PR introduces a comprehensive, multi-architecture GitHub Actions CI workflow (build.yml) for cups-filters. It ensures the repository automatically builds and passes its test suite across a matrix of different architectures, helping catch platform-specific regressions early.

Architectures Covered

The matrix strategy runs the build and test pipeline on four architectures:

  • x86_64: Native (Ubuntu latest)
  • arm64: Native (Ubuntu 24.04 ARM runner for optimal speed)
  • armhf (armv7): Emulated via QEMU (uraimo/run-on-arch-action@v3)
  • riscv64: Emulated via QEMU (uraimo/run-on-arch-action@v3)

Implementation Details & Fixes

Because cups-filters sits at the top of the OpenPrinting dependency chain, this workflow includes several critical configurations to ensure a stable testing environment:

  • Complete Source Dependency Chain: Before building cups-filters, the CI dynamically clones, compiles, and installs pdfio, libcupsfilters, and libppd from source. This ensures we are always testing against the latest upstream code.
  • System Conflict Prevention: Explicitly removes libcupsfilters-dev and libppd-dev from the runner to guarantee the build links against our fresh source builds, not stale Ubuntu system packages.
  • Linker Cache Updates: Injects ldconfig immediately after installing each dependency so the system linker immediately locates the newly compiled .so files.
  • Comprehensive Dependencies: Provides a complete list of required apt-get packages (including autopoint, libjxl-dev, libpoppler-cpp-dev, libexif-dev, and Avahi/DBus headers) to prevent ./autogen.sh and ./configure from failing.
  • Strict QEMU Error Handling: Emulated run blocks are wrapped with set -ex at the very top of the script. This enforces fail-fast execution, ensuring that if a dependency fails to compile inside the emulator, the CI halts immediately rather than failing silently downstream.
  • Failsafe Artifact Collection: The workflow unconditionally (if: always()) uploads all **/*.log files as GitHub Artifacts. This guarantees diagnostic data (like test-suite.log) is always available to developers, even if make check fails inside a nested directory.

Testing

All four architectures (native and emulated) have been tested on my fork and are successfully passing the autogen.sh, configure, make, and make check steps.

@tillkamppeter tillkamppeter merged commit 20df974 into OpenPrinting:master Mar 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants