4
4
DEBUG : napi:*
5
5
APP_NAME : node
6
6
MACOSX_DEPLOYMENT_TARGET : " 10.13"
7
-
8
- defaults :
9
- run :
10
- working-directory : ./node
7
+ COREPACK_ENABLE_STRICT : 0
11
8
12
9
permissions :
13
10
contents : write
@@ -25,60 +22,60 @@ jobs:
25
22
fail-fast : false
26
23
matrix :
27
24
settings :
28
- - host : macos-latest
29
- target : x86_64-apple-darwin
30
- build : pnpm build
31
- - host : windows-latest
32
- build : pnpm build
33
- target : x86_64-pc-windows-msvc
34
- - host : windows-latest
35
- build : |
36
- pnpm build --target i686-pc-windows-msvc
37
- pnpm test
38
- target : i686-pc-windows-msvc
39
- - host : ubuntu-latest
40
- target : x86_64-unknown-linux-gnu
41
- docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
42
- build : pnpm build --target x86_64-unknown-linux-gnu
43
- - host : ubuntu-latest
44
- target : x86_64-unknown-linux-musl
45
- docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
46
- build : pnpm build
47
- - host : macos-latest
48
- target : aarch64-apple-darwin
49
- build : pnpm build --target aarch64-apple-darwin
25
+ # - host: macos-latest
26
+ # target: x86_64-apple-darwin
27
+ # build: pnpm build
28
+ # - host: windows-latest
29
+ # build: pnpm build
30
+ # target: x86_64-pc-windows-msvc
31
+ # - host: windows-latest
32
+ # build: |
33
+ # pnpm build --target i686-pc-windows-msvc
34
+ # pnpm test
35
+ # target: i686-pc-windows-msvc
36
+ # - host: ubuntu-latest
37
+ # target: x86_64-unknown-linux-gnu
38
+ # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
39
+ # build: pnpm build --target x86_64-unknown-linux-gnu
40
+ # - host: ubuntu-latest
41
+ # target: x86_64-unknown-linux-musl
42
+ # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
43
+ # build: pnpm build
44
+ # - host: macos-latest
45
+ # target: aarch64-apple-darwin
46
+ # build: pnpm build --target aarch64-apple-darwin
50
47
- host : ubuntu-latest
51
48
target : aarch64-unknown-linux-gnu
52
49
docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
53
50
build : pnpm build --target aarch64-unknown-linux-gnu
54
- - host : ubuntu-latest
55
- target : armv7-unknown-linux-gnueabihf
56
- setup : |
57
- sudo apt-get update
58
- sudo apt-get install gcc-arm-linux-gnueabihf -y
59
- build : pnpm build --target armv7-unknown-linux-gnueabihf
60
- - host : ubuntu-latest
61
- target : aarch64-linux-android
62
- build : pnpm build --target aarch64-linux-android
63
- - host : ubuntu-latest
64
- target : armv7-linux-androideabi
65
- build : pnpm build --target armv7-linux-androideabi
66
- - host : ubuntu-latest
67
- target : aarch64-unknown-linux-musl
68
- docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
69
- build : |-
70
- set -e &&
71
- rustup target add aarch64-unknown-linux-musl &&
72
- pnpm build --target aarch64-unknown-linux-musl
73
- - host : windows-latest
74
- target : aarch64-pc-windows-msvc
75
- build : pnpm build --target aarch64-pc-windows-msvc
76
- - host : ubuntu-latest
77
- target : riscv64gc-unknown-linux-gnu
78
- setup : |
79
- sudo apt-get update
80
- sudo apt-get install gcc-riscv64-linux-gnu -y
81
- build : pnpm build --target riscv64gc-unknown-linux-gnu
51
+ # - host: ubuntu-latest
52
+ # target: armv7-unknown-linux-gnueabihf
53
+ # setup: |
54
+ # sudo apt-get update
55
+ # sudo apt-get install gcc-arm-linux-gnueabihf -y
56
+ # build: pnpm build --target armv7-unknown-linux-gnueabihf
57
+ # - host: ubuntu-latest
58
+ # target: aarch64-linux-android
59
+ # build: pnpm build --target aarch64-linux-android
60
+ # - host: ubuntu-latest
61
+ # target: armv7-linux-androideabi
62
+ # build: pnpm build --target armv7-linux-androideabi
63
+ # - host: ubuntu-latest
64
+ # target: aarch64-unknown-linux-musl
65
+ # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
66
+ # build: |-
67
+ # set -e &&
68
+ # rustup target add aarch64-unknown-linux-musl &&
69
+ # pnpm build --target aarch64-unknown-linux-musl
70
+ # - host: windows-latest
71
+ # target: aarch64-pc-windows-msvc
72
+ # build: pnpm build --target aarch64-pc-windows-msvc
73
+ # - host: ubuntu-latest
74
+ # target: riscv64gc-unknown-linux-gnu
75
+ # setup: |
76
+ # sudo apt-get update
77
+ # sudo apt-get install gcc-riscv64-linux-gnu -y
78
+ # build: pnpm build --target riscv64gc-unknown-linux-gnu
82
79
name : stable - ${{ matrix.settings.target }} - node@20
83
80
runs-on : ${{ matrix.settings.host }}
84
81
steps :
@@ -120,7 +117,7 @@ jobs:
120
117
run : pnpm config set supportedArchitectures.cpu "ia32"
121
118
shell : bash
122
119
- name : Install dependencies
123
- run : pnpm install
120
+ run : pnpm install --no-frozen-lockfile
124
121
- name : Setup node x86
125
122
uses : actions/setup-node@v4
126
123
if : matrix.settings.target == 'i686-pc-windows-msvc'
@@ -133,17 +130,19 @@ jobs:
133
130
if : ${{ matrix.settings.docker }}
134
131
with :
135
132
image : ${{ matrix.settings.docker }}
136
- options : " --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build"
137
- run : ${{ matrix.settings.build }}
133
+ options : " -e COREPACK_ENABLE_STRICT=0 - -user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build"
134
+ run : cd node && ${{ matrix.settings.build }} && ls -a /build/node
138
135
- name : Build
139
- run : ${{ matrix.settings.build }}
136
+ run : cd node && ${{ matrix.settings.build }}
140
137
if : ${{ !matrix.settings.docker }}
141
138
shell : bash
139
+ - name : Echo workspace
140
+ run : ls -a "${{ github.workspace }}/node"
142
141
- name : Upload artifact
143
142
uses : actions/upload-artifact@v4
144
143
with :
145
144
name : bindings-${{ matrix.settings.target }}
146
- path : ${{ env.APP_NAME }}.*.node
145
+ path : node/dist/ ${{ env.APP_NAME }}.*.node
147
146
if-no-files-found : error
148
147
build-freebsd :
149
148
runs-on : macos-12
@@ -181,16 +180,16 @@ jobs:
181
180
env
182
181
freebsd-version
183
182
pnpm install
184
- pnpm build
185
- pnpm test
183
+ pnpm --filter=node build
184
+ pnpm --filter=node test
186
185
rm -rf node_modules
187
186
rm -rf target
188
187
rm -rf .pnpm/cache
189
188
- name : Upload artifact
190
189
uses : actions/upload-artifact@v4
191
190
with :
192
191
name : bindings-freebsd
193
- path : ${{ env.APP_NAME }}.*.node
192
+ path : node/dist/ ${{ env.APP_NAME }}.*.node
194
193
if-no-files-found : error
195
194
test-macOS-windows-binding :
196
195
name : Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
@@ -221,12 +220,12 @@ jobs:
221
220
uses : actions/download-artifact@v4
222
221
with :
223
222
name : bindings-${{ matrix.settings.target }}
224
- path : .
223
+ path : ./node/dist
225
224
- name : List packages
226
225
run : ls -R .
227
226
shell : bash
228
227
- name : Test bindings
229
- run : pnpm test
228
+ run : cd node && pnpm test
230
229
test-linux-x64-gnu-binding :
231
230
name : Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
232
231
needs :
@@ -251,12 +250,12 @@ jobs:
251
250
uses : actions/download-artifact@v4
252
251
with :
253
252
name : bindings-x86_64-unknown-linux-gnu
254
- path : .
253
+ path : ./node/dist
255
254
- name : List packages
256
255
run : ls -R .
257
256
shell : bash
258
257
- name : Test bindings
259
- run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim pnpm test
258
+ run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim pnpm --filter=node test
260
259
test-linux-x64-musl-binding :
261
260
name : Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
262
261
needs :
@@ -283,12 +282,12 @@ jobs:
283
282
uses : actions/download-artifact@v4
284
283
with :
285
284
name : bindings-x86_64-unknown-linux-musl
286
- path : .
285
+ path : ./node/dist
287
286
- name : List packages
288
287
run : ls -R .
289
288
shell : bash
290
289
- name : Test bindings
291
- run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine pnpm test
290
+ run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine pnpm --filter=node test
292
291
test-linux-aarch64-gnu-binding :
293
292
name : Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
294
293
needs :
@@ -306,7 +305,7 @@ jobs:
306
305
uses : actions/download-artifact@v4
307
306
with :
308
307
name : bindings-aarch64-unknown-linux-gnu
309
- path : .
308
+ path : ./node/dist
310
309
- name : List packages
311
310
run : ls -R .
312
311
shell : bash
@@ -327,6 +326,7 @@ jobs:
327
326
options : " --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
328
327
run : |
329
328
set -e
329
+ cd node
330
330
pnpm test
331
331
ls -la
332
332
test-linux-aarch64-musl-binding :
@@ -340,7 +340,7 @@ jobs:
340
340
uses : actions/download-artifact@v4
341
341
with :
342
342
name : bindings-aarch64-unknown-linux-musl
343
- path : .
343
+ path : ./node/dist
344
344
- name : List packages
345
345
run : ls -R .
346
346
shell : bash
@@ -361,6 +361,7 @@ jobs:
361
361
options : " --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
362
362
run : |
363
363
set -e
364
+ cd node
364
365
pnpm test
365
366
test-linux-arm-gnueabihf-binding :
366
367
name : Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
@@ -379,7 +380,7 @@ jobs:
379
380
uses : actions/download-artifact@v4
380
381
with :
381
382
name : bindings-armv7-unknown-linux-gnueabihf
382
- path : .
383
+ path : ./node/dist
383
384
- name : List packages
384
385
run : ls -R .
385
386
shell : bash
@@ -399,6 +400,7 @@ jobs:
399
400
options : " --platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build"
400
401
run : |
401
402
set -e
403
+ cd node
402
404
pnpm test
403
405
ls -la
404
406
universal-macOS :
@@ -431,7 +433,7 @@ jobs:
431
433
uses : actions/upload-artifact@v4
432
434
with :
433
435
name : bindings-universal-apple-darwin
434
- path : ${{ env.APP_NAME }}.*.node
436
+ path : node/dist/ ${{ env.APP_NAME }}.*.node
435
437
if-no-files-found : error
436
438
publish :
437
439
name : Publish
0 commit comments