Skip to content

perf: update musl build #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wojiushixiaobai
Copy link

@wojiushixiaobai
Copy link
Author

.github/workflows/build.yml

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 }}/

Copy link

@jameschensmith jameschensmith Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let me correct it.

Signed-off-by: 吴小白 <296015668@qq.com>
Comment on lines +16 to +26
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants