@@ -22,69 +22,47 @@ concurrency:
2222 group : ${{ github.workflow }}-${{ github.ref }}
2323 cancel-in-progress : true
2424jobs :
25- # lint:
26- # name: Lint
27- # runs-on: ubuntu-latest
28- # steps:
29- # - uses: actions/checkout@v6
30- # - name: Setup node
31- # uses: actions/setup-node@v6
32- # with:
33- # node-version: 22
34- # cache: yarn
35- # - name: Install
36- # uses: dtolnay/rust-toolchain@stable
37- # with:
38- # components: clippy, rustfmt
39- # - name: Install dependencies
40- # run: yarn install
41- # - name: Oxlint
42- # run: yarn workspace @odict/node lint
43- # - name: Cargo fmt
44- # run: cargo fmt -- --check
45- # - name: Clippy
46- # run: cargo clippy
4725 build :
4826 strategy :
4927 fail-fast : false
5028 matrix :
5129 settings :
5230 - host : macos-latest
5331 target : x86_64-apple-darwin
54- build : yarn build:node --target x86_64-apple-darwin
32+ build : mise run //crates/node: build:node --target x86_64-apple-darwin
5533 - host : windows-latest
56- build : yarn build:node --target x86_64-pc-windows-msvc
34+ build : mise run //crates/node: build:node --target x86_64-pc-windows-msvc
5735 target : x86_64-pc-windows-msvc
5836 - host : windows-latest
59- build : yarn build:node --target i686-pc-windows-msvc
37+ build : mise run //crates/node: build:node --target i686-pc-windows-msvc
6038 target : i686-pc-windows-msvc
6139 - host : ubuntu-latest
6240 target : x86_64-unknown-linux-gnu
63- build : yarn build:node --target x86_64-unknown-linux-gnu --use-napi-cross
41+ build : mise run //crates/node: build:node --target x86_64-unknown-linux-gnu --use-napi-cross
6442 - host : ubuntu-latest
6543 target : x86_64-unknown-linux-musl
66- build : yarn build:node --target x86_64-unknown-linux-musl -x
44+ build : mise run //crates/node: build:node --target x86_64-unknown-linux-musl -x
6745 - host : macos-latest
6846 target : aarch64-apple-darwin
69- build : yarn build:node --target aarch64-apple-darwin
47+ build : mise run //crates/node: build:node --target aarch64-apple-darwin
7048 - host : ubuntu-latest
7149 target : aarch64-unknown-linux-gnu
72- build : yarn build:node --target aarch64-unknown-linux-gnu --use-napi-cross
50+ build : mise run //crates/node: build:node --target aarch64-unknown-linux-gnu --use-napi-cross
7351 - host : ubuntu-latest
7452 target : armv7-unknown-linux-gnueabihf
75- build : yarn build:node --target armv7-unknown-linux-gnueabihf --use-napi-cross
53+ build : mise run //crates/node: build:node --target armv7-unknown-linux-gnueabihf --use-napi-cross
7654 - host : ubuntu-latest
7755 target : aarch64-linux-android
78- build : yarn build:node --target aarch64-linux-android
56+ build : mise run //crates/node: build:node --target aarch64-linux-android
7957 - host : ubuntu-latest
8058 target : armv7-linux-androideabi
81- build : yarn build:node --target armv7-linux-androideabi
59+ build : mise run //crates/node: build:node --target armv7-linux-androideabi
8260 - host : ubuntu-latest
8361 target : aarch64-unknown-linux-musl
84- build : yarn build:node --target aarch64-unknown-linux-musl -x
62+ build : mise run //crates/node: build:node --target aarch64-unknown-linux-musl -x
8563 - host : windows-latest
8664 target : aarch64-pc-windows-msvc
87- build : yarn build:node --target aarch64-pc-windows-msvc
65+ build : mise run //crates/node: build:node --target aarch64-pc-windows-msvc
8866 - host : ubuntu-latest
8967 target : wasm32-wasip1-threads
9068 setup : |
@@ -95,20 +73,17 @@ jobs:
9573 export CC="${WASI_SDK_PATH}/bin/clang"
9674 export AR="${WASI_SDK_PATH}/bin/llvm-ar"
9775 export CMAKE_BUILD_PARALLEL_LEVEL=2
98- yarn build:wasm
76+ mise run //crates/node: build:wasm
9977 name : stable - ${{ matrix.settings.target }} - node@24
10078 runs-on : ${{ matrix.settings.host }}
10179 steps :
10280 - uses : actions/checkout@v6
103- - name : Setup node
104- uses : actions/setup-node@v6
81+ - name : Setup mise
82+ uses : jdx/mise-action@v4
10583 with :
106- node-version : 24
107- cache : yarn
108- cache-dependency-path : crates/node/yarn.lock
109- - name : Enable Corepack
110- run : corepack enable && corepack prepare --activate
111- working-directory : crates/node
84+ install : true
85+ cache : true
86+ working_directory : crates/node
11287 - name : Install
11388 uses : dtolnay/rust-toolchain@stable
11489 with :
12196 ~/.cargo/registry/index/
12297 ~/.cargo/registry/cache/
12398 ~/.cargo/git/db/
124- ~/ .napi-rs
99+ .napi-rs
125100 .cargo-cache
126101 target/
127102 key : ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
@@ -140,9 +115,6 @@ jobs:
140115 run : ${{ matrix.settings.setup }}
141116 if : ${{ matrix.settings.setup }}
142117 shell : bash
143- - name : Install dependencies
144- working-directory : crates/node
145- run : yarn install
146118 - name : Build
147119 env :
148120 CFLAGS_aarch64_unknown_linux_gnu : ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' && '-D__ARM_ARCH=8' || '' }}
@@ -231,19 +203,14 @@ jobs:
231203 runs-on : ${{ matrix.settings.host }}
232204 steps :
233205 - uses : actions/checkout@v6
234- - name : Setup node
235- uses : actions/setup-node@v6
206+ - name : Setup mise
207+ uses : jdx/mise-action@v4
236208 with :
237- node-version : ${{ matrix.node }}
238- cache : yarn
239- cache-dependency-path : crates/node/yarn.lock
240- architecture : ${{ matrix.settings.architecture }}
241- - name : Enable Corepack
242- run : corepack enable && corepack prepare --activate
243- working-directory : crates/node
244- - name : Install dependencies
245- working-directory : crates/node
246- run : yarn install
209+ install : true
210+ cache : true
211+ working_directory : crates/node
212+ env :
213+ MISE_NODE_VERSION : ${{ matrix.node }}
247214 - name : Download artifacts
248215 uses : actions/download-artifact@v8
249216 with :
@@ -253,8 +220,7 @@ jobs:
253220 run : ls -R .
254221 shell : bash
255222 - name : Test bindings
256- working-directory : crates/node
257- run : yarn test
223+ run : mise run //crates/node:test
258224 test-linux-binding :
259225 name : Test ${{ matrix.target }} - node@${{ matrix.node }}
260226 needs :
@@ -274,15 +240,14 @@ jobs:
274240 runs-on : ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
275241 steps :
276242 - uses : actions/checkout@v6
277- - name : Setup node
278- uses : actions/setup-node@v6
243+ - name : Setup mise
244+ uses : jdx/mise-action@v4
279245 with :
280- node-version : ${{ matrix.node }}
281- cache : yarn
282- cache-dependency-path : crates/node/yarn.lock
283- - name : Enable Corepack
284- run : corepack enable && corepack prepare --activate
285- working-directory : crates/node
246+ install : true
247+ cache : true
248+ working_directory : crates/node
249+ env :
250+ MISE_NODE_VERSION : ${{ matrix.node }}
286251 - name : Output docker params
287252 id : docker
288253 run : |
@@ -302,12 +267,11 @@ jobs:
302267 console.log('IMAGE=node:${{ matrix.node }}-slim')
303268 }
304269 " >> $GITHUB_OUTPUT
305- - name : Install dependencies
270+ - name : Configure yarn architectures
306271 working-directory : crates/node
307272 run : |
308273 yarn config set --json supportedArchitectures.cpu '["current", "arm64", "x64", "arm"]'
309274 yarn config set --json supportedArchitectures.libc '["current", "musl", "gnu"]'
310- yarn install
311275 - name : Download artifacts
312276 uses : actions/download-artifact@v8
313277 with :
@@ -329,28 +293,23 @@ jobs:
329293 image : ${{ steps.docker.outputs.IMAGE }}
330294 name : test-bindings-${{ matrix.target }}
331295 options : -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}/crates/node --platform ${{ steps.docker.outputs.PLATFORM }}
332- args : yarn test
296+ args : sh -c "corepack enable && yarn test"
333297 test-wasi :
334298 name : Test WASI target
335299 needs :
336300 - build
337301 runs-on : ubuntu-latest
338302 steps :
339303 - uses : actions/checkout@v6
340- - name : Setup node
341- uses : actions/setup-node@v6
304+ - name : Setup mise
305+ uses : jdx/mise-action@v4
342306 with :
343- node-version : 24
344- cache : yarn
345- cache-dependency-path : crates/node/yarn.lock
346- - name : Enable Corepack
347- run : corepack enable && corepack prepare --activate
348- working-directory : crates/node
349- - name : Install dependencies
307+ install : true
308+ cache : true
309+ working_directory : crates/node
310+ - name : Configure yarn for wasm32
350311 working-directory : crates/node
351- run : |
352- yarn config set supportedArchitectures.cpu "wasm32"
353- yarn install
312+ run : yarn config set supportedArchitectures.cpu "wasm32"
354313 - name : Download artifacts
355314 uses : actions/download-artifact@v8
356315 with :
@@ -360,8 +319,7 @@ jobs:
360319 run : ls -R .
361320 shell : bash
362321 - name : Test bindings
363- working-directory : crates/node
364- run : yarn test
322+ run : mise run //crates/node:test
365323 env :
366324 NAPI_RS_FORCE_WASI : 1
367325 publish :
@@ -371,25 +329,18 @@ jobs:
371329 contents : write
372330 id-token : write
373331 needs :
374- # - lint
375332 - build-freebsd
376333 - test-macOS-windows-binding
377334 - test-linux-binding
378335 - test-wasi
379336 steps :
380337 - uses : actions/checkout@v6
381- - name : Setup node
382- uses : actions/setup-node@v6
338+ - name : Setup mise
339+ uses : jdx/mise-action@v4
383340 with :
384- node-version : 24
385- cache : yarn
386- cache-dependency-path : crates/node/yarn.lock
387- - name : Enable Corepack
388- run : corepack enable && corepack prepare --activate
389- working-directory : crates/node
390- - name : Install dependencies
391- working-directory : crates/node
392- run : yarn install
341+ install : true
342+ cache : true
343+ working_directory : crates/node
393344 - name : create npm dirs
394345 working-directory : crates/node
395346 run : yarn create-dirs
0 commit comments