Commit 33da9a6
committed
ci(docker): honor per-image PLATFORMS for build-per-arch matrix + merge
The build-per-arch matrix was a hardcoded cross-product of every changed
image with {amd64, arm64}, and merge-and-scan hardcoded both
`${VERSION}-amd64` and `${VERSION}-arm64` source refs into
`imagetools create`. That forced amd64-only images (foldseek-gpu, whose
CUDA Debian repo has no arm64 path) to schedule an arm64 build that
fails at apt-get install, and would have failed merge even if the
arm64 build were skipped.
Each image's Makefile already declares `PLATFORMS = ...` (AGENTS.md
section "Per-image Makefile required variables"). ci-detect-changed-
images.sh now reads PLATFORMS from each changed image's Makefile and
emits a new `build_matrix` output: a flat list of
`{image, arch, runner, platform}` records, default both arches when
PLATFORMS is absent. build-per-arch uses `matrix.include` from that
record list, so each (image, arch) job is scheduled iff the image
declares that arch. merge-and-scan reads the same PLATFORMS line to
build the source-ref list dynamically — single-arch images produce a
manifest list with one entry, multi-arch images preserve current
behavior bit-for-bit.
Other consumers unchanged:
- bump-versions iterates image names only
- pr-build-scan / rescan-latest iterate image names; both pull/build
amd64 only and resolve the multi-arch tag on an amd64 runner
- cd.yml release notes iterate Makefile VERSION only (no arch refs)
- scripts/mirror-ghcr-to-gar.sh copies the merged manifest list,
single-arch lists transit identically
foldseek-gpu/Makefile already has `PLATFORMS = linux/amd64` (the four
other images already have both arches). No Makefile edits needed.1 parent c3bc0d9 commit 33da9a6
2 files changed
Lines changed: 112 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
132 | | - | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
139 | 149 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
| |||
188 | 195 | | |
189 | 196 | | |
190 | 197 | | |
191 | | - | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
197 | | - | |
| 204 | + | |
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
201 | | - | |
202 | | - | |
| 208 | + | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| |||
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
246 | 264 | | |
247 | 265 | | |
248 | 266 | | |
| |||
351 | 369 | | |
352 | 370 | | |
353 | 371 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
359 | 378 | | |
360 | 379 | | |
361 | 380 | | |
| |||
372 | 391 | | |
373 | 392 | | |
374 | 393 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
383 | 413 | | |
384 | 414 | | |
385 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
52 | 58 | | |
53 | 59 | | |
54 | 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 | + | |
55 | 107 | | |
56 | 108 | | |
57 | 109 | | |
| 110 | + | |
58 | 111 | | |
59 | 112 | | |
60 | 113 | | |
61 | 114 | | |
| 115 | + | |
62 | 116 | | |
63 | 117 | | |
64 | 118 | | |
65 | 119 | | |
| 120 | + | |
66 | 121 | | |
67 | 122 | | |
68 | 123 | | |
| |||
84 | 139 | | |
85 | 140 | | |
86 | 141 | | |
87 | | - | |
| 142 | + | |
88 | 143 | | |
89 | 144 | | |
90 | 145 | | |
| |||
96 | 151 | | |
97 | 152 | | |
98 | 153 | | |
99 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
0 commit comments