Conversation
wojiushixiaobai
commented
Apr 4, 2025
- Riscv64 native #157
- Provide aarch64 musl builds #104
|
name: Node.js custom build job
on:
workflow_dispatch:
inputs:
version:
description: 'Node.js version, e.g. v23.11.0'
required: true
default: 'v23.11.0'
jobs:
build:
runs-on: ubuntu-latest
env:
version: ${{ github.event.inputs.version }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Set Workdir
run: |
mkdir -p ${{ github.workspace }}/workdir/staging
sudo chmod -R 777 ${{ github.workspace }}/workdir/staging
sudo chown -R 1000:docker ${{ github.workspace }}/workdir/staging
- name: Build node.js
run: |
./bin/local_build.sh -r musl -v ${{ env.version }} -w ${{ github.workspace }}/workdir
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/workdir/staging/release/${{ env.version }}/ |
There was a problem hiding this comment.
Please feel free to disregard my feedback if it's not applicable. Should the Dockerfile be update to FROM alpine:3.21 based on your comment regarding loongarch64 support in Alpine Linux?
| alpineArch="$(apk --print-arch)" | ||
| case "${alpineArch##*-}" in | ||
| riscv64) | ||
| config_flags+="--openssl-no-asm" | ||
| ;; | ||
| loongarch64) | ||
| # v18.x need, https://github.com/nodejs/node/blob/v18.x/Makefile#L939 | ||
| make_flags+=" DESTCPU=loong64 ARCH=loong64" | ||
| config_flags+="--openssl-no-asm" | ||
| ;; | ||
| esac |
There was a problem hiding this comment.
Can you tell me what this is trying to do? these builds normally only happen on x64 and we only get a single, stable arch build out of these to publish to unofficial-builds.nodejs.org. We have separate loong64 and riscc64 recipes to handle those cases.
Or are you trying to use this to do local builds for musl on these architectures?
There was a problem hiding this comment.
This change allows you to directly run scripts on physical machines of other architectures to build.
This way we don't need to add files for other architectures, such as #157
There was a problem hiding this comment.
the problem you're introducing here is that you've removed DESTCPU and ARCH from below and only added them back for loong64.
I think you should consider a few things here:
- Set the default DESTCPU and ARCH variables to use below
- Override them in loong64
- Remove the riscv64 path if you don't need it, let's not leave cruft around
- Document why you're doing the arch switch in the first place - like you've explained it here
|
Hey, can we help here in someway to get this merged? I want to install into Alpine specific Node versions this would help a lot :) |
Signed-off-by: 吴小白 <296015668@qq.com>
4d54e3e to
24d7705
Compare