Skip to content

Mirror fix from cups/pull/1629 #23

Mirror fix from cups/pull/1629

Mirror fix from cups/pull/1629 #23

Workflow file for this run

# =============================================================================
# Multi-Architecture / multi-CUPS Build & Test Workflow for libppd
#
# Matrix: 4 architectures x 3 CUPS releases = 12 combinations.
# architectures: amd64, arm64 (native runners); armhf, riscv64 (QEMU)
# CUPS releases: 2.4.x (distro libcups2-dev), 2.5.x (OpenPrinting/cups
# master), 3.x (OpenPrinting/libcups master)
#
# libppd depends on BOTH libcups and libcupsfilters. For the source-CUPS legs
# the distro libcupsfilters-dev is the wrong ABI, so ci/ci-setup.sh builds
# libcupsfilters (and pdfio) from source against the active CUPS. All the
# per-combination work lives in that script so the legs differ only in which
# CUPS is provided and whether they run under emulation.
# =============================================================================
name: Build and Test (libppd, Multi-Architecture, Multi-CUPS)
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-matrix:
name: Build & Test (${{ matrix.arch }}, ${{ matrix.cups }})
runs-on: ${{ matrix.runs-on }}
# Building CUPS / libcupsfilters from source under QEMU is slow; allow plenty.
timeout-minutes: 360
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64, armhf, riscv64]
cups: [system-2x, source-2.5.x, source-3.x]
include:
- arch: amd64
runs-on: ubuntu-latest
use-qemu: false
- arch: arm64
runs-on: ubuntu-24.04-arm
use-qemu: false
- arch: armhf
runs-on: ubuntu-latest
use-qemu: true
qemu-arch: armv7
- arch: riscv64
runs-on: ubuntu-latest
use-qemu: true
qemu-arch: riscv64
steps:
- uses: actions/checkout@v4
# ==========================================
# NATIVE EXECUTION (amd64 and arm64)
# ==========================================
- name: Build & Test (Native)
if: matrix.use-qemu == false
env:
CUPS_KIND: ${{ matrix.cups }}
EMULATED: "0"
run: |
set -ex
sh ci/ci-setup.sh deps
sh ci/ci-setup.sh cups "${{ matrix.cups }}"
sh ci/ci-setup.sh pdfio
sh ci/ci-setup.sh libcupsfilters "${{ matrix.cups }}"
sh ci/ci-setup.sh build-libppd
- name: Autopkgtest (DESTDIR staging, native)
# Run the downstream autopkgtest suite (libppd-2-dev compile/link/run +
# libppd-2-ppd-handling) against every CUPS version under test.
if: matrix.use-qemu == false
run: |
set -ex
make test-autopkgtest V=1
- name: Upload test artifacts (Native)
if: matrix.use-qemu == false && always()
continue-on-error: true
timeout-minutes: 5
uses: actions/upload-artifact@v4
with:
name: libppd-logs-${{ matrix.arch }}-${{ matrix.cups }}
path: |
config.log
test-suite.log
ppd/*.log
ppd/*.trs
if-no-files-found: ignore
# ==========================================
# EMULATED EXECUTION (armhf and riscv64)
# ==========================================
- name: Build & Test (Emulated)
if: matrix.use-qemu == true
uses: uraimo/run-on-arch-action@v3
with:
arch: ${{ matrix.qemu-arch }}
distro: ubuntu24.04
githubToken: ${{ github.token }}
install: |
apt-get update --fix-missing -y
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata ca-certificates git
run: |
set -ex
export CUPS_KIND="${{ matrix.cups }}"
export EMULATED=1
sh ci/ci-setup.sh deps
sh ci/ci-setup.sh cups "${{ matrix.cups }}"
sh ci/ci-setup.sh pdfio
sh ci/ci-setup.sh libcupsfilters "${{ matrix.cups }}"
sh ci/ci-setup.sh build-libppd
make test-autopkgtest V=1
- name: Upload test artifacts (Emulated)
if: matrix.use-qemu == true && always()
continue-on-error: true
timeout-minutes: 5
uses: actions/upload-artifact@v4
with:
name: libppd-logs-${{ matrix.arch }}-${{ matrix.cups }}
path: |
config.log
test-suite.log
ppd/*.log
ppd/*.trs
if-no-files-found: ignore