Skip to content

Commit 31da49d

Browse files
authored
feat: macos arm prebuilts (#160)
* feat: macos arm prebuilts * chore: drop invalid runners and windows-2022 from legacy node * chore: add in a name to the legacy flow * chore: remove node 12-15 from legacy arm (they don't come with arm versions)
1 parent 8f52fa0 commit 31da49d

File tree

2 files changed

+128
-12
lines changed

2 files changed

+128
-12
lines changed

.github/workflows/build.yml

+57-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
18+
os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
1919
node: [12, 13, 14, 15, 16, 17, 19]
2020
steps:
2121
- name: Checkout repository
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
46+
os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
4747
node: [18, 20, 21, 22]
4848
steps:
4949
- name: Checkout repository
@@ -84,8 +84,8 @@ jobs:
8484
- name: Package prebuild
8585
run: npm run build
8686

87-
build_aarch64_legacy_nodejs:
88-
name: Prebuild aarch64 (legacy Node.js)
87+
build_aarch64_legacy_nodejs_linux:
88+
name: Prebuild aarch64 Linux (legacy Node.js)
8989
runs-on: ${{ matrix.os }}
9090
strategy:
9191
fail-fast: false
@@ -109,8 +109,8 @@ jobs:
109109
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
110110
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
111111
112-
build_aarch64:
113-
name: Prebuild aarch64
112+
build_aarch64_linux:
113+
name: Prebuild aarch64 Linux
114114
runs-on: ${{ matrix.os }}
115115
strategy:
116116
fail-fast: false
@@ -134,6 +134,57 @@ jobs:
134134
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
135135
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
136136
137+
build_aarch64_legacy_nodejs_mac:
138+
name: Prebuild aarch64 macOS (legacy Node.js)
139+
runs-on: ${{ matrix.os }}
140+
strategy:
141+
fail-fast: false
142+
matrix:
143+
os: [macos-14]
144+
node: [16, 17, 19]
145+
steps:
146+
- name: Checkout repository
147+
uses: actions/checkout@v3
148+
149+
- name: Install Node v${{ matrix.node }}
150+
uses: actions/setup-node@v3
151+
with:
152+
node-version: ${{ matrix.node }}
153+
154+
- name: Setup python
155+
uses: actions/setup-python@v4
156+
with:
157+
python-version: '3.8'
158+
159+
- name: Install dependencies
160+
run: npm install --build-from-source
161+
162+
- name: Package prebuild
163+
run: npm run build
164+
165+
build_aarch64_mac:
166+
name: Prebuild aarch64 macOS
167+
runs-on: ${{ matrix.os }}
168+
strategy:
169+
fail-fast: false
170+
matrix:
171+
os: [macos-14]
172+
node: [18, 20, 21, 22]
173+
steps:
174+
- name: Checkout repository
175+
uses: actions/checkout@v3
176+
177+
- name: Install Node v${{ matrix.node }}
178+
uses: actions/setup-node@v3
179+
with:
180+
node-version: ${{ matrix.node }}
181+
182+
- name: Install dependencies
183+
run: npm install --build-from-source
184+
185+
- name: Package prebuild
186+
run: npm run build
187+
137188
build_musl_aarch64:
138189
name: Prebuild aarch64 (musl)
139190
runs-on: ubuntu-latest

.github/workflows/release.yml

+71-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
12+
os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
1313
node: [12, 13, 14, 15, 16, 17, 19]
1414
steps:
1515
- name: Checkout repository
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
47+
os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
4848
node: [18, 20, 21, 22]
4949
steps:
5050
- name: Checkout repository
@@ -99,8 +99,8 @@ jobs:
9999
with:
100100
path: 'build/stage/**/*.tar.gz'
101101

102-
build_aarch64_legacy_nodejs:
103-
name: Prebuild aarch64 (legacy Node.js)
102+
build_aarch64_legacy_nodejs_linux:
103+
name: Prebuild aarch64 Linux (legacy Node.js)
104104
runs-on: ${{ matrix.os }}
105105
strategy:
106106
fail-fast: false
@@ -131,8 +131,8 @@ jobs:
131131
with:
132132
path: 'build/stage/**/*.tar.gz'
133133

134-
build_aarch64:
135-
name: Prebuild aarch64
134+
build_aarch64_linux:
135+
name: Prebuild aarch64 Linux
136136
runs-on: ${{ matrix.os }}
137137
strategy:
138138
fail-fast: false
@@ -163,6 +163,71 @@ jobs:
163163
with:
164164
path: 'build/stage/**/*.tar.gz'
165165

166+
build_aarch64_legacy_nodejs_mac:
167+
name: Prebuild aarch64 macOS (legacy Node.js)
168+
runs-on: ${{ matrix.os }}
169+
strategy:
170+
fail-fast: false
171+
matrix:
172+
os: [macos-14]
173+
node: [16, 17, 19]
174+
steps:
175+
- name: Checkout repository
176+
uses: actions/checkout@v3
177+
178+
- name: Install Node v${{ matrix.node }}
179+
uses: actions/setup-node@v3
180+
with:
181+
node-version: ${{ matrix.node }}
182+
183+
- name: Setup python
184+
uses: actions/setup-python@v4
185+
with:
186+
python-version: '3.8'
187+
188+
- name: Install dependencies
189+
run: npm install --build-from-source
190+
191+
- name: Package prebuild
192+
run: npm run build
193+
194+
- name: Upload prebuild asset
195+
uses: icrawl/action-artifact@v2
196+
env:
197+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
198+
with:
199+
path: 'build/stage/**/*.tar.gz'
200+
201+
build_aarch64_mac:
202+
name: Prebuild aarch64 macOS
203+
runs-on: ${{ matrix.os }}
204+
strategy:
205+
fail-fast: false
206+
matrix:
207+
os: [macos-14]
208+
node: [18, 20, 21, 22]
209+
steps:
210+
- name: Checkout repository
211+
uses: actions/checkout@v3
212+
213+
- name: Install Node v${{ matrix.node }}
214+
uses: actions/setup-node@v3
215+
with:
216+
node-version: ${{ matrix.node }}
217+
218+
- name: Install dependencies
219+
run: npm install --build-from-source
220+
221+
- name: Package prebuild
222+
run: npm run build
223+
224+
- name: Upload prebuild asset
225+
uses: icrawl/action-artifact@v2
226+
env:
227+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
228+
with:
229+
path: 'build/stage/**/*.tar.gz'
230+
166231
build_musl_aarch64:
167232
name: Prebuild aarch64 (musl)
168233
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)