1- # Multi-Architecture Build and Test Workflow for libcupsfilters
2- name : Build and Test (Multi-Architecture)
1+ # Multi-Architecture / multi-CUPS Build and Test Workflow for libcupsfilters
2+ #
3+ # Matrix: 4 architectures x 3 CUPS releases = 12 combinations.
4+ # architectures: x86_64, arm64 (native runners); armv7, riscv64 (QEMU)
5+ # CUPS releases: 2.4.x (distro libcups2-dev), 2.5.x (OpenPrinting/cups
6+ # master), 3.x (OpenPrinting/libcups master)
7+ # All the per-combination work lives in ci/ci-setup.sh so the legs differ only
8+ # in which CUPS is provided and whether they run under emulation.
9+ name : Build and Test (Multi-Architecture, Multi-CUPS)
310
411on :
512 push :
@@ -10,159 +17,108 @@ on:
1017 - ' **'
1118 workflow_dispatch :
1219
20+ concurrency :
21+ group : ${{ github.workflow }}-${{ github.ref }}
22+ cancel-in-progress : true
23+
1324jobs :
1425 build-matrix :
1526 strategy :
1627 fail-fast : false
1728 matrix :
29+ arch : [x86_64, arm64, armv7, riscv64]
30+ cups : [system-2x, source-2.5.x, source-3.x]
1831 include :
19- # Native x86_64
2032 - arch : x86_64
2133 runs-on : ubuntu-latest
2234 use-qemu : false
23-
24- # Native ARM64
2535 - arch : arm64
2636 runs-on : ubuntu-24.04-arm
2737 use-qemu : false
28-
29- # Emulated 32-bit ARM
3038 - arch : armv7
3139 runs-on : ubuntu-latest
3240 use-qemu : true
33-
34- # Emulated RISC-V
3541 - arch : riscv64
3642 runs-on : ubuntu-latest
3743 use-qemu : true
3844
3945 runs-on : ${{ matrix.runs-on }}
40- name : Build & Test (${{ matrix.arch }})
46+ name : Build & Test (${{ matrix.arch }}, ${{ matrix.cups }})
47+ # Building CUPS 2.5 / libcups3 from source under QEMU is slow; allow plenty.
48+ timeout-minutes : 360
4149
4250 steps :
4351 - uses : actions/checkout@v4
4452
4553 # ==========================================
46- # 1. NATIVE EXECUTION (x86_64 and arm64)
54+ # NATIVE EXECUTION (x86_64 and arm64)
4755 # ==========================================
48- - name : Install Dependencies (Native)
49- if : matrix.use-qemu == false
50- run : |
51- sudo apt-get update --fix-missing -y
52- sudo apt-get upgrade --fix-missing -y
53- # PREVENT CONFLICTS: Ensure system version doesn't override local source
54- sudo apt-get remove -y libcupsfilters-dev || true
55- sudo apt-get install -y \
56- libqpdf-dev \
57- avahi-daemon libavahi-client-dev libssl-dev libpam-dev libusb-1.0-0-dev zlib1g-dev \
58- autotools-dev autopoint cmake libtool pkg-config libcups2-dev libexif-dev liblcms2-dev \
59- libfontconfig1-dev libfreetype6-dev build-essential qtbase5-dev qtchooser libcairo2-dev \
60- libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev \
61- libopenjp2-7-dev libjpeg-dev libjxl-dev libpoppler-cpp-dev libpython3-dev libdbus-1-dev \
62- mupdf-tools poppler-utils ghostscript wget tar make gettext \
63- dbus file
64-
65- - name : Build PDFio and libcupsfilters (Native)
56+ - name : Build & Test (Native)
6657 if : matrix.use-qemu == false
6758 env :
6859 CC : /usr/bin/gcc
60+ CUPS_KIND : ${{ matrix.cups }}
61+ EMULATED : " 0"
6962 run : |
7063 set -ex
71-
72- # Build pdfio
73- cd /tmp
74- wget -q https://github.com/michaelrsweet/pdfio/releases/download/v1.6.4/pdfio-1.6.4.tar.gz
75- tar -xzf pdfio-1.6.4.tar.gz && cd pdfio-1.6.4
76- ./configure --prefix=/usr --enable-shared
77- make all
78- sudo make install
79- sudo ldconfig
80-
81- # Build and Test libcupsfilters
82- cd "$GITHUB_WORKSPACE"
83- ./autogen.sh
84- ./configure
85- make -j$(nproc)
86- # V=1 shows compiler commands; VERBOSE=1 restores full internal test details
87- make check V=1 VERBOSE=1 || (test -f test-suite.log && cat test-suite.log; exit 1)
64+ sh ci/ci-setup.sh deps
65+ sh ci/ci-setup.sh cups "${{ matrix.cups }}"
66+ sh ci/ci-setup.sh pdfio
67+ sh ci/ci-setup.sh build-libcupsfilters
8868
8969 - name : Autopkgtest (DESTDIR staging, native)
70+ # Run the downstream autopkgtest suite (consumer compile/link/run +
71+ # functionality) against every CUPS version under test.
9072 if : matrix.use-qemu == false
9173 run : |
9274 set -ex
93- cd "$GITHUB_WORKSPACE"
94- # Full downstream suite: libcupsfilters-2-dev (compile/link/run) +
95- # libcupsfilters-2-functionality. Both point at the staged tree via
96- # environment overrides, so no privilege or path redirection is needed.
9775 make test-autopkgtest V=1
9876
9977 - name : Upload test artifacts (Native)
10078 if : matrix.use-qemu == false && always()
79+ continue-on-error : true
80+ timeout-minutes : 5
10181 uses : actions/upload-artifact@v4
10282 with :
103- name : libcupsfilters-test-artifacts- ${{ matrix.arch }}
83+ name : libcupsfilters-logs- ${{ matrix.arch }}-${{ matrix.cups }}
10484 path : |
105- **/*.log
106- if-no-files-found : warn
85+ config.log
86+ test-suite.log
87+ cupsfilters/*.log
88+ if-no-files-found : ignore
10789
10890 # ==========================================
109- # 2. EMULATED EXECUTION (armv7 and riscv64)
91+ # EMULATED EXECUTION (armv7 and riscv64)
11092 # ==========================================
111- - name : Build and Test (Emulated)
93+ - name : Build & Test (Emulated)
11294 if : matrix.use-qemu == true
11395 uses : uraimo/run-on-arch-action@v3
11496 with :
11597 arch : ${{ matrix.arch }}
11698 distro : ubuntu24.04
99+ githubToken : ${{ github.token }}
117100 install : |
118101 apt-get update --fix-missing -y
119- DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
120- # PREVENT CONFLICTS: Ensure system version doesn't override local source
121- apt-get remove -y libcupsfilters-dev || true
122- apt-get install -y \
123- libqpdf-dev \
124- avahi-daemon libavahi-client-dev libssl-dev libpam-dev libusb-1.0-0-dev zlib1g-dev \
125- autotools-dev autopoint cmake libtool pkg-config libcups2-dev libexif-dev liblcms2-dev \
126- libfontconfig1-dev libfreetype6-dev build-essential qtbase5-dev qtchooser libcairo2-dev \
127- libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev \
128- libopenjp2-7-dev libjpeg-dev libjxl-dev libpoppler-cpp-dev libpython3-dev libdbus-1-dev \
129- mupdf-tools poppler-utils ghostscript wget tar make gettext gcc g++ \
130- dbus file
102+ DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata ca-certificates git
131103 run : |
132104 set -ex
133- REPO_DIR=$(pwd)
134-
135- # Build pdfio
136- cd /tmp
137- wget -q https://github.com/michaelrsweet/pdfio/releases/download/v1.6.4/pdfio-1.6.4.tar.gz
138- tar -xzf pdfio-1.6.4.tar.gz && cd pdfio-1.6.4
139- ./configure --prefix=/usr --enable-shared
140- make all
141- make install
142- ldconfig
143-
144- # Build and Test libcupsfilters
145- cd $REPO_DIR
146- export CC=/usr/bin/gcc
147- ./autogen.sh
148- ./configure
149- make -j$(nproc)
150-
151- # Mark test-pclm-overflow.sh as XFAIL; VERBOSE=1 for full internal logs
152- make check V=1 VERBOSE=1 XFAIL_TESTS="cupsfilters/test-pclm-overflow.sh" || (test -f test-suite.log && cat test-suite.log; exit 1)
153-
154- # Full downstream autopkgtest suite. Both tests resolve the staged
155- # build tree through environment overrides (no absolute paths, no
156- # privilege, no bind mounts), so the same suite that runs on the
157- # native legs runs unchanged under QEMU emulation.
105+ export CUPS_KIND="${{ matrix.cups }}"
106+ export EMULATED=1
107+ sh ci/ci-setup.sh deps
108+ sh ci/ci-setup.sh cups "${{ matrix.cups }}"
109+ sh ci/ci-setup.sh pdfio
110+ sh ci/ci-setup.sh build-libcupsfilters
158111 make test-autopkgtest V=1
159112
160113 - name : Upload test artifacts (Emulated)
161114 if : matrix.use-qemu == true && always()
115+ continue-on-error : true
116+ timeout-minutes : 5
162117 uses : actions/upload-artifact@v4
163118 with :
164- name : libcupsfilters-test-artifacts- ${{ matrix.arch }}
119+ name : libcupsfilters-logs- ${{ matrix.arch }}-${{ matrix.cups }}
165120 path : |
166- **/*.log
167- if-no-files-found : warn
168-
121+ config.log
122+ test-suite.log
123+ cupsfilters/*.log
124+ if-no-files-found : ignore
0 commit comments