Skip to content

Commit 9fee2e3

Browse files
Dietmar Rietschclaude
andcommitted
ci: build-node workflow — cross-compile the RV64 small-icu node in CI
Docker isn't available locally; GitHub runners have it. Manually triggered (workflow_dispatch), it runs build/node-riscv/build.sh (now --with-intl=small-icu) and uploads images/node to the release for the catalog `node` recipe to source. Unblocks prettier (needs ICU). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ab84d1e commit 9fee2e3

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/build-node.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-UEL
2+
# Copyright (C) 2026 And The Next GmbH - https://userland.run
3+
#
4+
# Cross-compile the RV64 (musl, small-icu) Node.js guest in CI — the build needs
5+
# Docker, which GitHub runners have. Produces images/node and uploads it to the
6+
# v0.1.0 release, where the catalog `node` recipe sources it. Manual trigger:
7+
# gh workflow run build-node.yml -R userland-run/nano
8+
# It is a long build (musl cross-toolchain + Node from source, ~1-2h).
9+
name: build-node
10+
11+
on:
12+
workflow_dispatch:
13+
inputs:
14+
release_tag:
15+
description: "Release tag to upload images/node to"
16+
default: "v0.1.0"
17+
18+
permissions:
19+
contents: write # upload images/node to the release
20+
21+
jobs:
22+
build-node:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 350 # well under the 6h cap; the cross-compile is slow
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
# build.sh does the Docker cross-compile (Dockerfile pins node v25.4.0 +
29+
# --with-intl=small-icu) and extracts the static ELF to images/node.
30+
- name: Cross-compile node (RV64 / musl / small-icu)
31+
run: bash build/node-riscv/build.sh
32+
33+
- name: Inspect the artifact
34+
run: file images/node && ls -lh images/node
35+
36+
- name: Upload to the release
37+
env:
38+
GH_TOKEN: ${{ github.token }}
39+
run: |
40+
tag="${{ github.event.inputs.release_tag }}"
41+
gh release upload "$tag" images/node -R "${{ github.repository }}" --clobber
42+
echo "uploaded images/node → release $tag"

0 commit comments

Comments
 (0)