Repository navigation
Add opt-in Linux RISC-V runner builds - #294
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the architecture patches for the current upstream source and keep RISC-V packages on Node 24 only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep optional RISC-V sync from blocking existing architectures when disabled, and use its own patch baseline when enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match GitHub Actions string comparison when deciding whether to synchronize the optional RISC-V patches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move workflow regressions into a patch against an existing upstream test file, inline the fork-specific helpers, and preserve x64 CI when optional tests become stale. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Native RISC-V execution, GitHub Actions acceptance of RISCV64 metadata, runtime behavior, and end-to-end CI/release publishing remain unverified and require human validation on a native builder.
No open issues 🎉
What changed in this PR
Adds experimental, opt-in Linux RISC-V runner builds to the fork’s existing architecture-patch system, covering mirrored upstream main and release sources.
Changes:
- Adds RISC-V architecture support using community .NET 10 and Node 24, including legacy Node request fallback for release builds.
- Extends CI and release workflows with checksum-pinned SDK installation, L0 tests, package validation and asset publishing.
- Adds independent RISC-V patch baselines, workflow regression tests and setup documentation.
Native execution, live GitHub Actions jobs and native CI/release publishing remain unverified.
| File | Description |
|---|---|
patches/runner-sdk8-riscv64.patch |
Adds release-source RISC-V support, Node 24 fallback and compatibility tests. |
patches/runner-main-sdk8-riscv64.patch |
Adds main-source RISC-V architecture, runtime and build support. |
patches/patch-sync-l0.patch |
Adds regression tests for workflow gates, patch baselines and SDK checksum rejection. |
.github/workflows/release.yml |
Adds opt-in RISC-V builds, tests, packaging and release assets. |
.github/workflows/patch_update_release.yml |
Synchronizes the enabled RISC-V patch from its own release marker. |
.github/workflows/patch_update_main.yml |
Synchronizes the enabled RISC-V patch from its own commit marker. |
.github/workflows/build.yml |
Adds opt-in RISC-V CI and workflow regression-test integration. |
.github/release-note-canonical.md |
Documents prerequisites, build steps, opt-in controls and operational limitations. |
Review effort: Balanced
|
Tested this end to end on real riscv64 hardware: the runner registers, picks up jobs and runs them, but the bundled Node 24.22.3 segfaults as soon as JavaScript runs for long, so every JavaScript action crashes. The fix is in Node 24.23.0; we'll wait for its riscv64 build and bump Node issue
What was tested
Suggestions
AI-generated message. |
Node 24.22.x segfaults on riscv64 in V8's Sparkplug JIT (Runtime_InstallBaselineCode) once JavaScript gets warm, which breaks every JavaScript action. 24.23.0 carries the upstream V8 fix (ec2f506f97df). Both riscv64 patches now set NODE24_VERSION to 24.23.0 with the matching unofficial-builds checksum.
|
Node 24.23.0 is out for riscv64 and fixes the Sparkplug crash, so I pushed 23e9524 to bump both RISC-V patches to it. JavaScript actions now run on real hardware without any workaround. What changed
Verification
Still open
AI-generated message. |
No RISC-V builder exists yet, so the linux-riscv64 job could never run. Build it on the x64 runners instead with the official x64 .NET SDK plus the community SDK's riscv64 runtime packs, both checksum-pinned. The packs are copied dereferenced, since copying their symlinks would package the x64 runtime. The RISC-V L0 steps now run only when runner.arch is RISCV64, so the x64 cross-build skips them (they would need emulation) and they come back on their own once the job moves to a native runner. Meanwhile the package is smoke-tested under qemu-user, the job fails if any bundled ELF file is not RISC-V, and a Node hot loop exercises V8's JIT, which node --version alone does not.
There was a problem hiding this comment.
🟡 Changes recommended
The unconditional matrix include in .github/workflows/build.yml creates a RISC-V job even when ENABLE_RISCV64_BUILDS is unset or false, allowing experimental build failures to break unrelated PR CI; the include in .github/workflows/release.yml likewise creates a RISC-V job when check.outputs.riscv64-enabled is false, allowing experimental build failures to block releases despite RISC-V asset publication being disabled.
2 open issues
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The release note’s native RISC-V guidance is incomplete: changing only runs-on leaves both workflows installing and executing the x64 SDK for linux-riscv64, so SDK setup fails on a native builder before reaching L0.
1 open issue
2 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
QEMU smoke tests and a board trial provide evidence for the architecture combining community .NET runtime packs, Node JIT execution, and cross-build packaging. Native RISC-V L0 and the release-publishing path remain unverified and need human validation.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
cbartz
left a comment
There was a problem hiding this comment.
Self-review to help reviewers. The inline notes mark the places that need human judgement and explain why things are done the way they are. Most of the +1.9k lines are mechanical: three .patch files, mostly csproj runtime-ID additions. See Review focus in the description for how to read them as real code.
Checksums: verify with a script, not by eye
There are three pinned SHA-256 values. Each one appears identically in every file that uses it, which you can check with:
grep -rhoE '[0-9a-f]{64}' .github patches | sort | uniq -cThe script below compares each pin with what its publisher states. Microsoft only publishes SHA-512 for the SDK, so the x64 SDK (about 200 MB) is downloaded once to check both. I ran it on 2026-12-03 and all four checks printed OK.
verify-pins.sh (needs curl, jq, gh)
#!/usr/bin/env bash
# Compare PR 294's pinned checksums with what each publisher states.
set -euo pipefail
fail=0
check() { if [[ "$2" == "$3" ]]; then echo "OK $1"; else echo "FAIL $1: pinned $2, publisher $3"; fail=1; fi; }
# Node 24.23.0 riscv64: unofficial-builds SHASUMS256.txt
node=$(curl -fsSL https://unofficial-builds.nodejs.org/download/release/v24.23.0/SHASUMS256.txt | awk '$2=="node-v24.23.0-linux-riscv64.tar.gz"{print $1}')
check "node riscv64" 832252bca22aa10bc88fe7ceebf67ae6c40aa206dbcbca78d107c9ef5bae6c42 "$node"
# Community riscv64 SDK: GitHub release asset digest
rv=$(gh api repos/filipnavara/dotnet-riscv/releases/tags/10.0.115 --jq '.assets[]|select(.name=="dotnet-sdk-10.0.115-linux-riscv64.tar.gz")|.digest')
check "riscv64 SDK" sha256:f06bcd3f7cff2781711150ae817190ce67d630b075be0b0aedeb021049c8a0d4 "$rv"
# Official x64 SDK: Microsoft publishes only SHA-512, so download once and compute both
tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT
curl -fsSL -o "$tmp/sdk.tgz" https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.115/dotnet-sdk-10.0.115-linux-x64.tar.gz
ms512=$(curl -fsSL https://builds.dotnet.microsoft.com/dotnet/release-metadata/10.0/releases.json | jq -r '.releases[] | (.sdks // [.sdk])[] | select(.version=="10.0.115") | .files[] | select(.name=="dotnet-sdk-linux-x64.tar.gz") | .hash' | head -1)
check "x64 SDK sha512 vs Microsoft" "$ms512" "$(sha512sum "$tmp/sdk.tgz" | cut -d' ' -f1)"
check "x64 SDK pinned sha256" a2c56c69422f28995196290c068d0e670206f7f873cd0079500774bae8ce3ea4 "$(sha256sum "$tmp/sdk.tgz" | cut -d' ' -f1)"
exit $failA checksum only proves we get the same bytes every time. Trusting the content is a separate decision: the riscv64 SDK and runtime packs come from a community build, and the Node binary from the Node.js project's unofficial builds. Both are called out in the release note.
AI-generated message.
weiiwang01
left a comment
There was a problem hiding this comment.
I am wondering if we still need the ENABLE_RISCV64_BUILDS flag instead of enabling the riscv64 build immediately, as even if the build has some problems, we can always just remove the release and fix them.
|
Thanks! We'll keep the variable and set The reason to keep it: a riscv64 failure doesn't produce a bad release we could delete, it blocks other work. A riscv64 patch conflict fails the whole patch-sync job ( AI-generated message. |
Cherry-pick of #294 plus a CI fix to apply release patches on release branches.


What this PR does
Adds an opt-in Linux RISC-V 64 (
linux-riscv64) runner package to the fork's CI and releases:patches/runner-main-sdk8-riscv64.patch(upstream main) andpatches/runner-sdk8-riscv64.patch(upstreamv2.338.2) add theRiscV64architecture to the runner. They build it with .NET 10 and bundle only Node 24.23.0 (unofficial riscv64 build, checksum-pinned). The release patch also makes Node 12/16/20 actions use Node 24, since Node 20 isn't bundled.build.yml/release.ymladd alinux-riscv64job. It only exists when the repository variableENABLE_RISCV64_BUILDSistrue. Temporarily, until native RISC-V runners are available, the job cross-builds on the x64 runners: the official x64 .NET SDK plus the community riscv64 runtime packs, all checksum-pinned. The package is then smoke-tested under qemu-user.release.ymlpublishes the archive and its SHA-256.patch_update_main.yml/patch_update_release.ymlsync the RISC-V patches against their own recorded baselines, and skip them while RISC-V is disabled.patches/patch-sync-l0.patchadds C# tests for the workflow scripts above..github/release-note-canonical.mddocuments usage, the feature flag, limitations (--disableupdate, Node 24 only) and how to switch to a native builder later.Why we need it
We need to release a riscv64 runner binary so that riscv64 GitHub runners can be spawned (spec requirement R1). Upstream
actions/runnerdoesn't support RISC-V. We have no RISC-V CI runner yet, so cross-building on x64 is the only way to ship today.The variable is an off switch. riscv64 depends on unofficial .NET and Node builds, and its patches touch many upstream files. Turning the variable off stops a broken riscv64 build from blocking CI, patch sync and releases for the official architectures.
Checklist
CONTRIBUTING.mdupdated: not applicable, no change to the contribution process.github/release-note-canonical.md)patches/patch-sync-l0.patch, plus the Node fallback tests inside the release patch)Test plan
ProcessExtensionL0.SuccessReadProcessEnvrace, which passes on retry.v2.338.2.config.sh --versionreports 2.338.2 and Node v24.23.0.actions/checkout,hashFilesandactions/github-script.Review focus
Most of the +1.9k lines are
.patchfiles. I've posted a self-review with inline notes on the parts that need human judgement. Suggested split:amd64inruns-on;runner-main-sdk8-riscv64.patch(for a C# reviewer). Read it as real code by applying it to its baseline:runner-sdk8-riscv64.patch: the same changes forv2.338.2. Only the Node 12/16/20 → 24 fallback (NodeUtil,HandlerFactory) needs separate reading.Potential breaking changes
None while
ENABLE_RISCV64_BUILDSis unset, which is the default. The existing architectures' jobs, patches and release assets don't change.New dependencies and workflow changes
ENABLE_RISCV64_BUILDS.