Skip to content

Commit

Permalink
v23.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TerrorJack committed Nov 22, 2024
1 parent 22e34cd commit f5e4749
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 144 deletions.
37 changes: 37 additions & 0 deletions .github/actions/darwin/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build-darwin-node
runs:
using: composite
steps:
- name: build-node
shell: bash
run: |
set -euo pipefail
node_ver=v23.3.0
pushd "$(mktemp -d)"
curl -f -L --retry 5 https://github.com/nodejs/node/archive/refs/tags/$node_ver.tar.gz | tar xz --strip-components=1
patch -p1 -i $GITHUB_WORKSPACE/bump-v8-wasm-limits.diff
make -j$(curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc/-/raw/master/mk/detect-cpu-count.sh | sh) binary CONFIG_FLAGS="--v8-disable-maglev"
mkdir $GITHUB_WORKSPACE/dist
mv node-$node_ver-*.tar.xz $GITHUB_WORKSPACE/dist
popd
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: node-darwin-${{ matrix.arch }}
path: dist/node-v*.tar.xz

- name: test-node
shell: bash
run: |
pushd dist
tar xJf node-v*.tar.xz --strip-components=1
export PATH=$PWD/bin:$PATH
npm install @bjorn3/browser_wasi_shim
popd
44 changes: 44 additions & 0 deletions .github/actions/linux/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: build-linux-node
runs:
using: composite
steps:
- name: build-image
shell: bash
run: |
pushd "$(mktemp -d)"
curl -f -L --retry 5 https://github.com/tweag/rust-alpine-mimalloc/archive/refs/heads/master.tar.gz | tar xz --strip-components=1
podman build \
--network host \
--pull \
--squash-all \
--tag rust:alpine-mimalloc \
.
popd
- name: build-node
shell: bash
run: |
podman run \
--init \
--network host \
--rm \
--tmpfs /tmp:exec \
--volume $PWD:/workspace \
--workdir /workspace \
rust:alpine-mimalloc \
/workspace/build-alpine.sh
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: node-linux-${{ matrix.arch }}
path: dist/node-v*.tar.xz

- name: test-node
shell: bash
run: |
pushd dist
tar xJf node-v*.tar.xz --strip-components=1
export PATH=$PWD/bin:$PATH
npm install @bjorn3/browser_wasi_shim
popd
147 changes: 42 additions & 105 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,130 +9,67 @@ on:
jobs:
x86_64-linux:
name: x86_64-linux
runs-on: ubuntu-24.04
runs-on:
- X64
- Linux
- podman
strategy:
matrix:
include:
- arch: x86_64
steps:

- name: setup-podman
uses: TerrorJack/setup-podman@master

- name: build-image
run: |
pushd "$(mktemp -d)"
curl -f -L --retry 5 https://github.com/tweag/rust-alpine-mimalloc/archive/refs/heads/master.tar.gz | tar xz --strip-components=1
podman build \
--network host \
--pull \
--squash-all \
--tag rust:alpine-mimalloc \
.
popd
- name: checkout
uses: actions/checkout@v4

- name: build-node
run: |
podman run \
--init \
--network host \
--rm \
--tmpfs /tmp:exec \
--volume $PWD:/workspace \
--workdir /workspace \
rust:alpine-mimalloc \
/workspace/build-alpine.sh
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: node-linux-x86_64
path: node-v*-linux-x64-static.tar.xz

- name: test-node
run: |
tar xJf node-v*-linux-x64-static.tar.xz
export PATH=$PWD/node-v*-linux-x64-static/bin:$PATH
npm install @bjorn3/browser_wasi_shim
- name: build-linux-node
uses: ./.github/actions/linux

aarch64-linux:
name: aarch64-linux
runs-on: ubuntu-24.04
runs-on:
- ARM64
- Linux
- podman
strategy:
matrix:
include:
- arch: aarch64
steps:

- name: setup-podman
uses: TerrorJack/setup-podman@master

- name: checkout
uses: actions/checkout@v4

- name: build-node
run: |
podman run \
--init \
--network host \
--rm \
--tmpfs /tmp:exec \
--volume $PWD:/workspace \
--workdir /workspace \
chimeralinux/chimera \
/workspace/build-chimera.sh
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: node-linux-aarch64
path: node-v*-linux-x64-static.tar.xz

- name: test-node
run: |
tar xJf node-v*-linux-x64-static.tar.xz
export PATH=$PWD/node-v*-linux-x64-static/bin:$PATH
npm install @bjorn3/browser_wasi_shim
- name: build-linux-node
uses: ./.github/actions/linux

darwin:
name: ${{ matrix.arch }}-darwin
runs-on: ${{ matrix.os }}
aarch64-darwin:
name: aarch64-darwin
runs-on:
- ARM64
- macOS
strategy:
matrix:
include:
- arch: aarch64
os: macos-15
- arch: x86_64
os: macos-15-large
steps:

- name: setup-xcode
run: |
sudo xcode-select --switch /Applications/Xcode_16.1.app
- name: checkout
uses: actions/checkout@v4

- name: build-node
run: |
set -euo pipefail
node_ver=v23.1.0
pushd "$(mktemp -d)"
curl -f -L --retry 5 https://github.com/nodejs/node/archive/refs/tags/$node_ver.tar.gz | tar xz --strip-components=1
patch -p1 -i $GITHUB_WORKSPACE/bump-v8-wasm-limits.diff
make -j$(curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc/-/raw/master/mk/detect-cpu-count.sh | sh) binary CONFIG_FLAGS="--v8-disable-maglev"
mv node-$node_ver-*.tar.xz $GITHUB_WORKSPACE
- name: build-darwin-node
uses: ./.github/actions/darwin

popd
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: node-darwin-${{ matrix.arch }}
path: node-v*.tar.xz
x86_64-darwin:
needs: aarch64-darwin
name: x86_64-darwin
runs-on:
- X64
- macOS
strategy:
matrix:
include:
- arch: x86_64
steps:
- name: checkout
uses: actions/checkout@v4

- name: test-node
run: |
tar xJf node-v*.tar.xz
export PATH=$PWD/node-v*/bin:$PATH
npm install @bjorn3/browser_wasi_shim
- name: build-darwin-node
uses: ./.github/actions/darwin
5 changes: 3 additions & 2 deletions build-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu

node_ver=v23.1.0
node_ver=v23.3.0

apk add \
linux-headers \
Expand All @@ -19,4 +19,5 @@ make -j"$(nproc)" binary \
CONFIG_FLAGS="--fully-static --openssl-use-def-ca-store --v8-disable-maglev" \
VARIATION="static"

mv node-$node_ver-linux-x64-static.tar.xz /workspace
mkdir /workspace/dist
mv node-v*.tar.xz /workspace/dist
37 changes: 0 additions & 37 deletions build-chimera.sh

This file was deleted.

0 comments on commit f5e4749

Please sign in to comment.