Repository navigation
145 lines (135 loc) · 5.57 KB
/
Copy pathdaily.yml
File metadata and controls
145 lines (135 loc) · 5.57 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
136
137
138
139
140
141
142
143
144
145
name: daily
# Daily kernel package builds. Runs at 3:00 PM PST (23:00 UTC), one parallel
# build per Daily entry in ci/build-matrix.json after suite flattening.
# Manual dispatch can run the full Daily matrix, every suite for one kernel
# variant, or one kernel variant and suite. Variant and suite are matrix values,
# so future variants need no workflow edit.
#
# Matrix schema: ci/build-matrix.json
# Each row with "type": "Daily" is expanded by ci/scripts/resolve-matrix.sh:
# the "suites" array is flattened into one job per suite. All other fields
# (kernel_variant, srcpkg, binpkg, kernel_config, dkms, debian_revision,
# git_clone, branch_or_tag, ref_strategy) are passed through to
# build-kernel-deb.yml as inputs.
#
# To add a daily build target: add a row to ci/build-matrix.json with
# "type": "Daily". No workflow changes needed.
on:
schedule:
# 3:00 PM PST == 23:00 UTC
- cron: '0 23 * * *'
workflow_dispatch:
inputs:
build-scope:
description: 'Choose all variants, all suites for one variant, or one variant and suite'
type: choice
required: true
default: 'Selected variant and suite'
options:
- 'Full matrix'
- 'Selected variant (all suites)'
- 'Selected variant and suite'
kernel-variant:
description: 'Kernel variant to build (ignored for Full matrix)'
required: true
default: 'qcom-next'
type: string
suite:
description: 'Target suite to build (used only for Selected variant and suite)'
required: true
default: 'trixie'
type: string
permissions:
contents: read
packages: read
jobs:
# ---------------------------------------------------------------------------
# configure-matrix: flatten the Daily rows from ci/build-matrix.json.
#
# Delegates to ci/scripts/resolve-matrix.sh which filters type=Daily rows
# and expands each row's "suites" array into one flat entry per suite.
# Manual dispatch selects the complete matrix, every suite for a variant, or
# one variant and suite.
# ---------------------------------------------------------------------------
configure-matrix:
name: Configure build matrix
runs-on: ubuntu-26.04
permissions:
contents: read # actions/checkout
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Generate build matrix
id: set-matrix
env:
BUILD_SCOPE_INPUT: ${{ github.event.inputs.build-scope }}
INPUT_VARIANT: ${{ github.event.inputs.kernel-variant }}
INPUT_SUITE: ${{ github.event.inputs.suite }}
run: |
set -euo pipefail
BUILD_SCOPE="$BUILD_SCOPE_INPUT"
if [[ "${{ github.event_name }}" == "schedule" ]]; then
BUILD_SCOPE="Full matrix"
fi
case "$BUILD_SCOPE" in
"Full matrix")
echo "Source: ci/build-matrix.json (full Daily matrix)"
args=(--type Daily)
;;
"Selected variant (all suites)")
echo "Source: ci/build-matrix.json (variant: $INPUT_VARIANT, all suites)"
args=(--type Daily --kernel-variant "$INPUT_VARIANT")
;;
"Selected variant and suite")
echo "Source: ci/build-matrix.json (variant: $INPUT_VARIANT, suite: $INPUT_SUITE)"
args=(--type Daily --kernel-variant "$INPUT_VARIANT" --single-suite "$INPUT_SUITE")
;;
*)
echo "ERROR: unsupported build scope: $BUILD_SCOPE" >&2
exit 1
;;
esac
MATRIX=$(ci/scripts/resolve-matrix.sh "${args[@]}")
echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
echo "Matrix entries: $(echo "$MATRIX" | jq length)"
# ---------------------------------------------------------------------------
# build: one parallel job per flat matrix entry.
#
# Each entry calls build-kernel-deb.yml as a reusable workflow. The full
# set of matrix fields (suite, srcpkg, binpkg, kernel_config, dkms, etc.) is
# threaded through as inputs. fail-fast is disabled so a failed trixie
# build does not cancel the forky build.
# ---------------------------------------------------------------------------
build:
name: ${{ matrix.kernel_variant }} / ${{ matrix.suite }}
needs: configure-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.configure-matrix.outputs.matrix) }}
permissions:
contents: read # actions/checkout in the called workflow
packages: read # ghcr.io images it pulls
uses: ./.github/workflows/build-kernel-deb.yml
with:
suite: ${{ matrix.suite }}
kernel-variant: ${{ matrix.kernel_variant }}
git-clone: ${{ matrix.git_clone }}
kernel-branch: ${{ matrix.branch_or_tag }}
ref-strategy: ${{ matrix.ref_strategy }}
tag-pattern: ${{ matrix.tag_pattern || '' }}
srcpkg: ${{ matrix.srcpkg }}
binpkg: ${{ matrix.binpkg }}
kernel-config: ${{ matrix.kernel_config }}
dkms: ${{ matrix.dkms }}
debian-revision: ${{ matrix.debian_revision }}
localversion: ${{ matrix.localversion || '' }}
kver-extra: ${{ matrix.kver_extra || '' }}
debusine-parent-workspace: ${{ matrix.debusine_parent_workspace || '' }}
secrets:
DEBUSINE_USER: ${{ secrets.DEBUSINE_USER }}
DEBUSINE_TOKEN: ${{ secrets.DEBUSINE_TOKEN }}
DEBUSINE_RELEASE_TOKEN: ${{ secrets.DEBUSINE_RELEASE_TOKEN }}