@@ -23,6 +23,34 @@ concurrency:
23
23
group : ${{ github.workflow }}-${{ github.ref }}
24
24
cancel-in-progress : true
25
25
jobs :
26
+ lint :
27
+ name : Lint
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v4
31
+
32
+ - name : Setup node
33
+ uses : actions/setup-node@v4
34
+ with :
35
+ node-version : 22
36
+ cache : ' yarn'
37
+
38
+ - name : Install
39
+ uses : dtolnay/rust-toolchain@stable
40
+ with :
41
+ components : clippy, rustfmt
42
+
43
+ - name : Install dependencies
44
+ run : yarn install
45
+
46
+ - name : oxlint
47
+ run : yarn lint
48
+
49
+ - name : Cargo fmt
50
+ run : cargo fmt -- --check
51
+
52
+ - name : Clippy
53
+ run : cargo clippy
26
54
build :
27
55
strategy :
28
56
fail-fast : false
35
63
build : yarn build --target x86_64-pc-windows-msvc
36
64
target : x86_64-pc-windows-msvc
37
65
- host : windows-latest
38
- build : |
39
- yarn build --target i686-pc-windows-msvc
40
- yarn test
66
+ build : yarn build --target i686-pc-windows-msvc
41
67
target : i686-pc-windows-msvc
42
68
- host : ubuntu-latest
43
69
target : x86_64-unknown-linux-gnu
81
107
- host : ubuntu-latest
82
108
target : wasm32-wasip1-threads
83
109
build : |
84
- wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22 /wasi-sdk-22.0 -linux.tar.gz
85
- tar -xvf wasi-sdk-22.0 -linux.tar.gz
86
- export WASI_SDK_PATH="$(pwd)/wasi-sdk-22.0 "
110
+ wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25 /wasi-sdk-25.0-x86_64 -linux.tar.gz
111
+ tar -xvf wasi-sdk-25.0-x86_64 -linux.tar.gz
112
+ export WASI_SDK_PATH="$(pwd)/wasi-sdk-25.0-x86_64-linux "
87
113
yarn build --target wasm32-wasip1-threads
88
114
name : stable - ${{ matrix.settings.target }} - node@20
89
115
runs-on : ${{ matrix.settings.host }}
@@ -126,18 +152,8 @@ jobs:
126
152
run : ${{ matrix.settings.setup }}
127
153
if : ${{ matrix.settings.setup }}
128
154
shell : bash
129
- - name : Setup node x86
130
- if : matrix.settings.target == 'i686-pc-windows-msvc'
131
- run : yarn config set supportedArchitectures.cpu "ia32"
132
- shell : bash
133
155
- name : Install dependencies
134
156
run : yarn install
135
- - name : Setup node x86
136
- uses : actions/setup-node@v4
137
- if : matrix.settings.target == 'i686-pc-windows-msvc'
138
- with :
139
- node-version : 20
140
- architecture : x86
141
157
- name : Build
142
158
run : ${{ matrix.settings.build }}
143
159
shell : bash
@@ -186,6 +202,7 @@ jobs:
186
202
freebsd-version
187
203
yarn install
188
204
yarn build
205
+ yarn test
189
206
rm -rf node_modules
190
207
rm -rf target
191
208
rm -rf .yarn/cache
@@ -206,15 +223,21 @@ jobs:
206
223
- host : windows-latest
207
224
target : x86_64-pc-windows-msvc
208
225
architecture : x64
226
+ - host : windows-latest
227
+ target : i686-pc-windows-msvc
228
+ architecture : x64
229
+ - host : windows-11-arm
230
+ target : aarch64-pc-windows-msvc
231
+ architecture : arm64
209
232
- host : macos-latest
210
233
target : x86_64-apple-darwin
211
234
architecture : x64
212
235
- host : macos-latest
213
236
target : aarch64-apple-darwin
214
237
architecture : arm64
215
238
node :
216
- - ' 18'
217
239
- ' 20'
240
+ - ' 22'
218
241
runs-on : ${{ matrix.settings.host }}
219
242
steps :
220
243
- uses : actions/checkout@v4
@@ -225,7 +248,19 @@ jobs:
225
248
cache : yarn
226
249
architecture : ${{ matrix.settings.architecture }}
227
250
- name : Install dependencies
251
+ if : ${{ matrix.settings.target == 'i686-pc-windows-msvc' }}
252
+ run : |
253
+ yarn config set --json supportedArchitectures.cpu '["current", "ia32"]'
254
+ yarn install
255
+ - name : Install dependencies
256
+ if : ${{ matrix.settings.target != 'i686-pc-windows-msvc' }}
228
257
run : yarn install
258
+ - name : Setup node
259
+ if : ${{ matrix.settings.target == 'i686-pc-windows-msvc' }}
260
+ uses : actions/setup-node@v4
261
+ with :
262
+ node-version : ${{ matrix.node }}
263
+ architecture : x86
229
264
- name : Download artifacts
230
265
uses : actions/download-artifact@v4
231
266
with :
@@ -252,15 +287,9 @@ jobs:
252
287
- s390x-unknown-linux-gnu
253
288
- powerpc64le-unknown-linux-gnu
254
289
node :
255
- - ' 18'
256
290
- ' 20'
257
- exclude :
258
- # too slow
259
- - target : aarch64-unknown-linux-gnu
260
- node : ' 18'
261
- - target : s390x-unknown-linux-gnu
262
- node : ' 18'
263
- runs-on : ubuntu-latest
291
+ - ' 22'
292
+ runs-on : ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
264
293
steps :
265
294
- uses : actions/checkout@v4
266
295
- name : Setup node
@@ -306,12 +335,16 @@ jobs:
306
335
run : ls -R .
307
336
shell : bash
308
337
- name : Set up QEMU
338
+ if : ${{ !contains(matrix.target, 'aarch64') }}
309
339
uses : docker/setup-qemu-action@v3
310
340
with :
311
341
platforms : all
312
342
- run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
343
+ if : ${{ !contains(matrix.target, 'aarch64') }}
313
344
- name : Test bindings
314
345
uses : addnab/docker-run-action@v3
346
+ # Node.js on qemu randomly segfaults on powerpc64le
347
+ continue-on-error : ${{ matrix.target == 'powerpc64le-unknown-linux-gnu' }}
315
348
with :
316
349
image : ${{ steps.docker.outputs.IMAGE }}
317
350
options : -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}
@@ -325,8 +358,8 @@ jobs:
325
358
fail-fast : false
326
359
matrix :
327
360
node :
328
- - ' 18'
329
361
- ' 20'
362
+ - ' 22'
330
363
runs-on : ubuntu-latest
331
364
steps :
332
365
- uses : actions/checkout@v4
@@ -353,6 +386,7 @@ jobs:
353
386
name : Publish
354
387
runs-on : ubuntu-latest
355
388
needs :
389
+ - lint
356
390
- build-freebsd
357
391
- test-macOS-windows-binding
358
392
- test-linux-binding
@@ -362,7 +396,7 @@ jobs:
362
396
- name : Setup node
363
397
uses : actions/setup-node@v4
364
398
with :
365
- node-version : 20
399
+ node-version : 22
366
400
cache : yarn
367
401
- name : Install dependencies
368
402
run : yarn install
0 commit comments