Skip to content

Commit 2e00d5c

Browse files
committed
ci: update workflow to emit bundle
1 parent 69966a7 commit 2e00d5c

1 file changed

Lines changed: 46 additions & 4 deletions

File tree

.github/workflows/bytecode-compilers.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ name: Build bytecode compilers
88
# each containing `<engine>/<host>/<binary>` so the downloads merge straight into
99
# tools/bytecode-compiler/bin/.
1010
#
11+
# The final `bundle` job merges them all into a single `bytecode-compiler-bin`
12+
# artifact laid out exactly like tools/bytecode-compiler/bin/ — download it, unzip,
13+
# and drop its contents into tools/bytecode-compiler/bin/ as-is.
14+
#
1115
# NOTE ON COMPATIBILITY: the produced bytecode must be loadable by the engine
1216
# library the runtime ships. Hermes/PrimJS runtimes link prebuilt .so's and
1317
# QuickJS/QuickJS-NG compile from vendored source, so the refs below must be kept
@@ -112,7 +116,9 @@ jobs:
112116
- uses: actions/upload-artifact@v4
113117
with:
114118
name: bytecode-compiler-hermes-${{ matrix.host }}
115-
path: out/hermes/${{ matrix.host }}
119+
# Root the artifact at `out/` so it carries the full
120+
# `hermes/<host>/<binary>` path and merges straight into bin/.
121+
path: out
116122
if-no-files-found: error
117123

118124
# ---------------------------------------------------------------------------
@@ -183,7 +189,9 @@ jobs:
183189
- uses: actions/upload-artifact@v4
184190
with:
185191
name: bytecode-compiler-quickjs-${{ matrix.host }}
186-
path: out/quickjs/${{ matrix.host }}
192+
# Root the artifact at `out/` so it carries the full
193+
# `quickjs/<host>/<binary>` path and merges straight into bin/.
194+
path: out
187195
if-no-files-found: error
188196

189197
# ---------------------------------------------------------------------------
@@ -251,7 +259,9 @@ jobs:
251259
- uses: actions/upload-artifact@v4
252260
with:
253261
name: bytecode-compiler-quickjs-ng-${{ matrix.host }}
254-
path: out/quickjs-ng/${{ matrix.host }}
262+
# Root the artifact at `out/` so it carries the full
263+
# `quickjs-ng/<host>/<binary>` path and merges straight into bin/.
264+
path: out
255265
if-no-files-found: error
256266

257267
# ---------------------------------------------------------------------------
@@ -330,5 +340,37 @@ jobs:
330340
- uses: actions/upload-artifact@v4
331341
with:
332342
name: bytecode-compiler-primjs-${{ matrix.host }}
333-
path: out/primjs/${{ matrix.host }}
343+
# Root the artifact at `out/` so it carries the full
344+
# `primjs/<host>/<binary>` path and merges straight into bin/.
345+
path: out
346+
if-no-files-found: error
347+
348+
# ---------------------------------------------------------------------------
349+
# Bundle — merge every per-(engine, host) artifact into a single artifact laid
350+
# out exactly like tools/bytecode-compiler/bin/, ready to download-and-paste.
351+
# ---------------------------------------------------------------------------
352+
bundle:
353+
name: bundle bin/
354+
runs-on: ubuntu-24.04
355+
needs: [hermes, quickjs, quickjs-ng, primjs]
356+
# Run even if some engine/host builds failed, so a partial bin/ is still
357+
# published rather than nothing.
358+
if: always()
359+
steps:
360+
- name: Download all compiler artifacts
361+
uses: actions/download-artifact@v4
362+
with:
363+
# Every per-job artifact already carries an `<engine>/<host>/<binary>`
364+
# path; merge-multiple overlays them into one tree = the bin/ layout.
365+
pattern: bytecode-compiler-*
366+
path: bin
367+
merge-multiple: true
368+
369+
- name: Show merged layout
370+
run: find bin -type f | sort
371+
372+
- uses: actions/upload-artifact@v4
373+
with:
374+
name: bytecode-compiler-bin
375+
path: bin
334376
if-no-files-found: error

0 commit comments

Comments
 (0)