Files
scriptc/.github/actions/libnode-dev-pack/action.yml
T
Malte UblandClaude Opus 5.5 1081315a49 Run Node on its own stack; provide a libnode pack to the Linux CI test lanes
Calls into Node now run on one dedicated 64 MB stack with a guard page,
reached by a context switch, and the bridge sets V8's stack limit on it
(bridge ABI 2). Before, a call from an async fiber (512 KB stacks without a
guard page) failed to bootstrap Node, which the dev-mode LLVM differential
showed. The runtime's stack guard follows the switch, and the switch
carries ASan's fiber annotations.

The Node island tests load Node from a libnode pack. Until the NI-13 packs
are published, .github/actions/libnode-dev-pack assembles one for the
Linux x64 test lanes (plain and sanitized): a pinned, checksum-verified
prebuilt libnode of the repository's Node release (24.22.0) and Node's
official headers (packages/libnode-common/dev-pack.json), with the bridge
built against them by build-pack.mjs. The pack is cached by its inputs and
the bridge source, so only a cache miss downloads and builds; the normal
build path never does.

tests/harness/libnode.ts makes a missing pack a failure in those lanes:
island tests skip only off Linux x64 CI without a configured pack. The
bridge smoke test (packages/libnode-common/test/bridge-smoke.c) loads the
pack the way scr_node_island.c does and makes synchronous, throwing and
asynchronous calls through the bridge with the runtime's bootstrap.

IR, LLVM and object outputs of programs that call into Node no longer need
a pack at build time; only executables record one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 09:58:32 -07:00

27 lines
1.3 KiB
YAML

name: libnode development pack (Linux x64)
description: >-
Provide a libnode pack for the Node island tests and export
SCRIPTC_LIBNODE: restored from the cache, or on a miss assembled from the
pinned, checksum-verified inputs in packages/libnode-common/dev-pack.json
(a prebuilt libnode and Node's headers; the bridge builds in seconds).
Temporary until the NI-13 packs exist. Fails the job if no pack results:
the island tests must never skip in CI.
runs:
using: composite
steps:
- uses: actions/cache@v4
id: libnode
with:
path: ${{ runner.temp }}/libnode-dev-pack
key: libnode-dev-pack-linux-x64-${{ hashFiles('packages/libnode-common/dev-pack.json', 'packages/libnode-common/build-pack.mjs', 'packages/libnode-common/fetch-dev-pack.mjs', 'packages/libnode-common/bridge/**', 'packages/runtime/src/scr_node_bridge.h') }}
- name: Assemble the libnode pack
if: steps.libnode.outputs.cache-hit != 'true'
shell: bash
run: node packages/libnode-common/fetch-dev-pack.mjs --out "$RUNNER_TEMP/libnode-dev-pack"
- name: Export SCRIPTC_LIBNODE
shell: bash
run: |
test -f "$RUNNER_TEMP/libnode-dev-pack/manifest.json"
test -f "$RUNNER_TEMP/libnode-dev-pack/libscr_node_bridge.so"
echo "SCRIPTC_LIBNODE=$RUNNER_TEMP/libnode-dev-pack" >> "$GITHUB_ENV"