@@ -53,26 +53,26 @@ jobs:
5353 settings :
5454 - host : macos-latest
5555 target : x86_64-apple-darwin
56- build : cd napi && yarn build --target x86_64-apple-darwin
56+ build : cd napi && npm run build -- --target x86_64-apple-darwin
5757 - host : windows-latest
58- build : cd napi && yarn build --target x86_64-pc-windows-msvc
58+ build : cd napi && npm run build -- --target x86_64-pc-windows-msvc
5959 target : x86_64-pc-windows-msvc
6060 - host : ubuntu-latest
6161 target : x86_64-unknown-linux-gnu
6262 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
6363 build : |
6464 set -e &&
65- cd /build/napi && yarn build --target x86_64-unknown-linux-gnu &&
65+ cd /build/napi && npm install && npm run build -- --target x86_64-unknown-linux-gnu &&
6666 strip /build/napi/*.node
6767 - host : macos-latest
6868 target : aarch64-apple-darwin
69- build : cd napi && yarn build --target aarch64-apple-darwin
69+ build : cd napi && npm run build -- --target aarch64-apple-darwin
7070 - host : ubuntu-latest
7171 target : aarch64-unknown-linux-gnu
7272 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
7373 build : |
7474 set -e &&
75- cd /build/napi && yarn build --target aarch64-unknown-linux-gnu
75+ cd /build/napi && npm install && npm run build -- --target aarch64-unknown-linux-gnu
7676 name : stable - ${{ matrix.settings.target }} - node@20
7777 runs-on : ${{ matrix.settings.host }}
7878 steps :
8282 if : ${{ !matrix.settings.docker }}
8383 with :
8484 node-version : 20
85- cache : yarn
85+ cache : npm
86+ cache-dependency-path : napi/package-lock.json
8687 - name : Install
8788 uses : dtolnay/rust-toolchain@stable
8889 if : ${{ !matrix.settings.docker }}
@@ -109,16 +110,17 @@ jobs:
109110 shell : bash
110111 - name : Setup node x86
111112 if : matrix.settings.target == 'i686-pc-windows-msvc'
112- run : yarn config set supportedArchitectures.cpu " ia32"
113+ run : npm config set target_arch ia32
113114 shell : bash
114115 - name : Install dependencies
115- run : cd napi && yarn install
116+ run : cd napi && npm install
116117 - name : Setup node x86
117118 uses : actions/setup-node@v4
118119 if : matrix.settings.target == 'i686-pc-windows-msvc'
119120 with :
120121 node-version : 20
121- cache : yarn
122+ cache : npm
123+ cache-dependency-path : napi/package-lock.json
122124 architecture : x86
123125 - name : Build in docker
124126 uses : addnab/docker-run-action@v3
@@ -160,10 +162,11 @@ jobs:
160162 uses : actions/setup-node@v4
161163 with :
162164 node-version : ${{ matrix.node }}
163- cache : yarn
165+ cache : npm
166+ cache-dependency-path : napi/package-lock.json
164167 architecture : x64
165168 - name : Install dependencies
166- run : cd napi && yarn install
169+ run : cd napi && npm install
167170 - name : Download artifacts
168171 uses : actions/download-artifact@v4
169172 with :
@@ -173,7 +176,7 @@ jobs:
173176 run : ls -R .
174177 shell : bash
175178 - name : Test bindings
176- run : cd napi && yarn test
179+ run : cd napi && npm test
177180
178181 test-linux-x64-gnu-binding :
179182 name : Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
@@ -192,9 +195,10 @@ jobs:
192195 uses : actions/setup-node@v4
193196 with :
194197 node-version : ${{ matrix.node }}
195- cache : yarn
198+ cache : npm
199+ cache-dependency-path : napi/package-lock.json
196200 - name : Install dependencies
197- run : cd napi && yarn install
201+ run : cd napi && npm install
198202 - name : Download artifacts
199203 uses : actions/download-artifact@v4
200204 with :
@@ -204,7 +208,7 @@ jobs:
204208 run : ls -R .
205209 shell : bash
206210 - name : Test bindings
207- run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim sh -c "cd napi && yarn test"
211+ run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim sh -c "cd napi && npm install && npm test"
208212
209213 test-linux-aarch64-gnu-binding :
210214 name : Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
@@ -229,9 +233,8 @@ jobs:
229233 shell : bash
230234 - name : Install dependencies
231235 run : |
232- yarn config set supportedArchitectures.cpu "arm64"
233- yarn config set supportedArchitectures.libc "glibc"
234- cd napi && yarn install
236+ npm config set target_arch arm64
237+ cd napi && npm install
235238 - name : Set up QEMU
236239 uses : docker/setup-qemu-action@v3
237240 with :
@@ -244,7 +247,7 @@ jobs:
244247 options : ' --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
245248 run : |
246249 set -e
247- cd napi && yarn test
250+ cd napi && npm install && npm test
248251 ls -la
249252
250253 publish :
@@ -260,21 +263,22 @@ jobs:
260263 uses : actions/setup-node@v4
261264 with :
262265 node-version : 20
263- cache : yarn
266+ cache : npm
267+ cache-dependency-path : napi/package-lock.json
264268 - name : Install Rust toolchain
265269 uses : dtolnay/rust-toolchain@stable
266270 - name : Install dependencies
267271 run : |
268272 cd napi
269- yarn install
273+ npm install
270274 - name : Download all artifacts
271275 uses : actions/download-artifact@v4
272276 with :
273277 path : napi/artifacts
274278 - name : Move artifacts
275279 run : |
276280 cd napi
277- yarn artifacts
281+ npm run artifacts
278282 - name : List packages
279283 run : ls -R ./napi/npm
280284 shell : bash
0 commit comments