-
Notifications
You must be signed in to change notification settings - Fork 28
135 lines (125 loc) · 4.52 KB
/
Copy pathbuild.yml
File metadata and controls
135 lines (125 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# =============================================================================
# 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