Skip to content

Commit 831c4d8

Browse files
committed
Add ARM64 support for Linux and macOS
1 parent 75fa377 commit 831c4d8

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

.github/workflows/build_node_shared.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
include:
16-
# Linux builds
16+
# Linux x64 builds
1717
- os: ubuntu-latest
1818
platform: linux
1919
arch: x64
@@ -28,6 +28,21 @@ jobs:
2828
container: ghcr.io/ten-framework/ten_building_ubuntu2204
2929
lib_name: libnode.so.127
3030
nproc_cmd: nproc
31+
# Linux ARM64 builds
32+
- os: ubuntu-24.04-arm
33+
platform: linux
34+
arch: arm64
35+
compiler: gcc
36+
container: ""
37+
lib_name: libnode.so.127
38+
nproc_cmd: nproc
39+
- os: ubuntu-24.04-arm
40+
platform: linux
41+
arch: arm64
42+
compiler: clang
43+
container: ""
44+
lib_name: libnode.so.127
45+
nproc_cmd: nproc
3146
# macOS x64 builds
3247
- os: macos-13
3348
platform: mac
@@ -43,6 +58,21 @@ jobs:
4358
container: ""
4459
lib_name: libnode.127.dylib
4560
nproc_cmd: sysctl -n hw.ncpu
61+
# macOS ARM64 builds
62+
- os: macos-14
63+
platform: mac
64+
arch: arm64
65+
compiler: gcc
66+
container: ""
67+
lib_name: libnode.127.dylib
68+
nproc_cmd: sysctl -n hw.ncpu
69+
- os: macos-14
70+
platform: mac
71+
arch: arm64
72+
compiler: clang
73+
container: ""
74+
lib_name: libnode.127.dylib
75+
nproc_cmd: sysctl -n hw.ncpu
4676

4777
runs-on: ${{ matrix.os }}
4878
container: ${{ matrix.container != '' && matrix.container || null }}
@@ -54,6 +84,15 @@ jobs:
5484
repository: nodejs/node
5585
ref: v22.12.0
5686

87+
- name: Setup dependencies (Linux ARM64)
88+
if: matrix.platform == 'linux' && matrix.arch == 'arm64'
89+
run: |
90+
sudo apt-get update
91+
sudo apt-get install -y python3 python3-pip build-essential
92+
if [ "${{ matrix.compiler }}" = "clang" ]; then
93+
sudo apt-get install -y clang
94+
fi
95+
5796
- name: Setup Python (macOS)
5897
if: matrix.platform == 'mac'
5998
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)