@@ -158,7 +158,7 @@ jobs:
158
158
159
159
build-musl :
160
160
if : " !contains(github.event.head_commit.message, 'skip ci')"
161
- name : stable - linux-musl - node@10
161
+ name : stable - linux-musl - node@lts
162
162
runs-on : ubuntu-latest
163
163
164
164
steps :
@@ -168,7 +168,7 @@ jobs:
168
168
run : |
169
169
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
170
170
env :
171
- DOCKER_REGISTRY_URL : docker.pkg.github.com
171
+ DOCKER_REGISTRY_URL : ghcr.io
172
172
DOCKER_USERNAME : ${{ github.actor }}
173
173
DOCKER_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
174
174
@@ -181,18 +181,18 @@ jobs:
181
181
uses : actions/cache@v1
182
182
with :
183
183
path : ~/.cargo/registry
184
- key : stable-node-alpine-@10 -cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
184
+ key : stable-node-alpine-@lts -cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
185
185
186
186
- name : Cache cargo index
187
187
uses : actions/cache@v1
188
188
with :
189
189
path : ~/.cargo/git
190
- key : stable-node-alpine-@10 -cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
190
+ key : stable-node-alpine-@lts -cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
191
191
192
192
- name : Pull docker image
193
193
run : |
194
- docker pull docker.pkg.github.com /napi-rs/napi-rs/nodejs-rust:10 -alpine
195
- docker tag docker.pkg.github.com /napi-rs/napi-rs/nodejs-rust:10 -alpine builder
194
+ docker pull ghcr.io /napi-rs/napi-rs/nodejs-rust:lts -alpine
195
+ docker tag ghcr.io /napi-rs/napi-rs/nodejs-rust:lts -alpine builder
196
196
197
197
- name : ' Install dependencies'
198
198
run : yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
@@ -271,6 +271,82 @@ jobs:
271
271
name : bindings-linux-aarch64
272
272
path : packages/*/*.node
273
273
274
+ build-linux-aarch64-musl :
275
+ name : stable - aarch64-unknown-linux-musl - node@14
276
+ runs-on : ubuntu-latest
277
+
278
+ steps :
279
+ - run : docker run --rm --privileged multiarch/qemu-user-static:register --reset
280
+
281
+ - uses : actions/checkout@v2
282
+
283
+ - name : Setup node
284
+ uses : actions/setup-node@v2-beta
285
+ with :
286
+ node-version : 14
287
+ check-latest : true
288
+
289
+ - name : Install
290
+ uses : actions-rs/toolchain@v1
291
+ with :
292
+ toolchain : stable
293
+ profile : minimal
294
+ override : true
295
+
296
+ - name : Install aarch64 toolchain
297
+ run : rustup target add aarch64-unknown-linux-musl
298
+
299
+ - name : Generate Cargo.lock
300
+ uses : actions-rs/cargo@v1
301
+ with :
302
+ command : generate-lockfile
303
+
304
+ - name : Cache cargo registry
305
+ uses : actions/cache@v1
306
+ with :
307
+ path : ~/.cargo/registry
308
+ key : stable-linux-aarch64-musl-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
309
+
310
+ - name : Cache cargo index
311
+ uses : actions/cache@v1
312
+ with :
313
+ path : ~/.cargo/git
314
+ key : stable-linux-aarch64-musl-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
315
+
316
+ - name : Cache NPM dependencies
317
+ uses : actions/cache@v1
318
+ with :
319
+ path : node_modules
320
+ key : npm-cache-linux-aarch64-musl-node@14-${{ hashFiles('yarn.lock') }}
321
+
322
+ - name : Install cross compile toolchain
323
+ run : |
324
+ sudo apt-get update
325
+ sudo apt-get install gcc-aarch64-linux-gnu -y
326
+
327
+ - name : Install dependencies
328
+ run : yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
329
+
330
+ - name : Cross build aarch64
331
+ run : yarn build -- -- --target aarch64-unknown-linux-musl
332
+
333
+ - name : Run tests
334
+ uses : docker://multiarch/alpine:aarch64-latest-stable
335
+ with :
336
+ args : >
337
+ sh -c "sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories && \
338
+ apk add nodejs yarn && \
339
+ yarn install --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 && \
340
+ yarn build:ts && \
341
+ node ./scripts/simple-tests.js
342
+ "
343
+
344
+ - name : Upload artifact
345
+ uses : actions/upload-artifact@v2
346
+ with :
347
+ name : bindings-linux-aarch64-musl
348
+ path : packages/*/*.node
349
+
274
350
build-linux-arm7 :
275
351
name : stable - arm7-unknown-linux-gnu - node@14
276
352
runs-on : ubuntu-latest
@@ -444,6 +520,52 @@ jobs:
444
520
name : bindings-android-aarch64
445
521
path : packages/*/*.node
446
522
523
+ build-freebsd :
524
+ runs-on : macos-latest
525
+ name : Build FreeBSD
526
+ steps :
527
+ - uses : actions/checkout@v2
528
+ - name : Build
529
+ id : build
530
+
531
+ env :
532
+ DEBUG : ' napi:*'
533
+ RUSTUP_HOME : /usr/local/rustup
534
+ CARGO_HOME : /usr/local/cargo
535
+ RUSTUP_IO_THREADS : 1
536
+ with :
537
+ envs : ' DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS'
538
+ usesh : true
539
+ mem : 3000
540
+ prepare : |
541
+ pkg install -y curl node yarn npm python2
542
+ curl https://sh.rustup.rs -sSf --output rustup.sh
543
+ sh rustup.sh -y --profile minimal --default-toolchain stable
544
+ export PATH="/usr/local/cargo/bin:$PATH"
545
+ echo "~~~~ rustc --version ~~~~"
546
+ rustc --version
547
+ echo "~~~~ node -v ~~~~"
548
+ node -v
549
+ echo "~~~~ yarn --version ~~~~"
550
+ yarn --version
551
+ run : |
552
+ export PATH="/usr/local/cargo/bin:$PATH"
553
+ pwd
554
+ ls -lah
555
+ whoami
556
+ env
557
+ freebsd-version
558
+ yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
559
+ yarn build:ts
560
+ yarn build
561
+ yarn test
562
+
563
+ - name : Upload artifact
564
+ uses : actions/upload-artifact@v2
565
+ with :
566
+ name : bindings-freebsd-amd64
567
+ path : packages/*/*.node
568
+
447
569
test-binding :
448
570
name : Test bindings on ${{ matrix.os }} - node@${{ matrix.node }}
449
571
needs :
@@ -452,7 +574,7 @@ jobs:
452
574
fail-fast : false
453
575
matrix :
454
576
os : [ubuntu-18.04, macos-latest, windows-latest]
455
- node : ['10', ' 12', '14', '15 ']
577
+ node : ['12', '14', '16 ']
456
578
runs-on : ${{ matrix.os }}
457
579
458
580
steps :
@@ -495,7 +617,7 @@ jobs:
495
617
strategy :
496
618
fail-fast : false
497
619
matrix :
498
- node : ['10', ' 12', '14', '15 ']
620
+ node : ['12', '14', '16 ']
499
621
runs-on : ubuntu-latest
500
622
501
623
steps :
@@ -532,7 +654,7 @@ jobs:
532
654
strategy :
533
655
fail-fast : false
534
656
matrix :
535
- node : ['10', ' 12', '14', '15 ']
657
+ node : ['12', '14', '16 ']
536
658
537
659
steps :
538
660
- run : docker run --rm --privileged multiarch/qemu-user-static:register --reset
@@ -592,6 +714,8 @@ jobs:
592
714
- build-linux-arm7
593
715
- build-apple-silicon
594
716
- build-windows-i686
717
+ - build-linux-aarch64-musl
718
+ - build-freebsd
595
719
steps :
596
720
- uses : actions/checkout@v2
597
721
0 commit comments