Skip to content

Commit 7bdde19

Browse files
authored
Merge pull request #10 from bvanjoi/next
release: 0.0.7
2 parents 1e875d6 + fe71dc9 commit 7bdde19

File tree

11 files changed

+5325
-2231
lines changed

11 files changed

+5325
-2231
lines changed

.github/workflows/Publish.yml

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ env:
99
- main
1010
paths:
1111
- 'package.json'
12-
1312
jobs:
1413
build:
1514
strategy:
@@ -18,20 +17,17 @@ jobs:
1817
settings:
1918
- host: macos-latest
2019
target: x86_64-apple-darwin
21-
architecture: x64
2220
build: |
2321
yarn build
2422
strip -x *.node
2523
- host: windows-latest
2624
build: yarn build
2725
target: x86_64-pc-windows-msvc
28-
architecture: x64
2926
- host: windows-latest
3027
build: |
3128
yarn build --target i686-pc-windows-msvc
3229
yarn test
3330
target: i686-pc-windows-msvc
34-
architecture: x86
3531
- host: ubuntu-latest
3632
target: x86_64-unknown-linux-gnu
3733
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
@@ -61,7 +57,6 @@ jobs:
6157
yarn build --target aarch64-unknown-linux-gnu &&
6258
aarch64-unknown-linux-gnu-strip *.node
6359
- host: ubuntu-latest
64-
architecture: x64
6560
target: armv7-unknown-linux-gnueabihf
6661
setup: |
6762
sudo apt-get update
@@ -70,27 +65,26 @@ jobs:
7065
yarn build --target=armv7-unknown-linux-gnueabihf
7166
arm-linux-gnueabihf-strip *.node
7267
- host: ubuntu-latest
73-
architecture: x64
7468
target: aarch64-linux-android
7569
build: |
7670
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
7771
export CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
7872
export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
73+
export AR="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
7974
export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
8075
yarn build --target aarch64-linux-android
81-
${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip *.node
76+
${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
8277
- host: ubuntu-latest
83-
architecture: x64
8478
target: armv7-linux-androideabi
8579
build: |
8680
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
8781
export CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
8882
export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
83+
export AR="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
8984
export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
9085
yarn build --target armv7-linux-androideabi
91-
${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip *.node
86+
${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
9287
- host: ubuntu-latest
93-
architecture: x64
9488
target: aarch64-unknown-linux-musl
9589
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
9690
build: |-
@@ -99,7 +93,6 @@ jobs:
9993
yarn build --target aarch64-unknown-linux-musl &&
10094
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
10195
- host: windows-latest
102-
architecture: x64
10396
target: aarch64-pc-windows-msvc
10497
build: yarn build --target aarch64-pc-windows-msvc
10598
name: stable - ${{ matrix.settings.target }} - node@16
@@ -113,7 +106,6 @@ jobs:
113106
node-version: 16
114107
check-latest: true
115108
cache: yarn
116-
architecture: ${{ matrix.settings.architecture }}
117109
- name: Install
118110
uses: actions-rs/toolchain@v1
119111
if: ${{ !matrix.settings.docker }}
@@ -137,14 +129,26 @@ jobs:
137129
- name: Cache NPM dependencies
138130
uses: actions/cache@v3
139131
with:
140-
path: node_modules
132+
path: .yarn/cache
141133
key: npm-cache-build-${{ matrix.settings.target }}-node@16
142134
- name: Setup toolchain
143135
run: ${{ matrix.settings.setup }}
144136
if: ${{ matrix.settings.setup }}
145137
shell: bash
138+
- name: Setup node x86
139+
if: matrix.settings.target == 'i686-pc-windows-msvc'
140+
run: yarn config set supportedArchitectures.cpu "ia32"
141+
shell: bash
146142
- name: Install dependencies
147-
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
143+
run: yarn install
144+
- name: Setup node x86
145+
uses: actions/setup-node@v3
146+
if: matrix.settings.target == 'i686-pc-windows-msvc'
147+
with:
148+
node-version: 16
149+
check-latest: true
150+
cache: yarn
151+
architecture: x86
148152
- name: Build in docker
149153
uses: addnab/docker-run-action@v3
150154
if: ${{ matrix.settings.docker }}
@@ -199,7 +203,7 @@ jobs:
199203
whoami
200204
env
201205
freebsd-version
202-
yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
206+
yarn install
203207
yarn build
204208
strip -x *.node
205209
yarn test
@@ -237,10 +241,10 @@ jobs:
237241
- name: Cache NPM dependencies
238242
uses: actions/cache@v3
239243
with:
240-
path: node_modules
244+
path: .yarn/cache
241245
key: npm-cache-test-${{ matrix.settings.target }}-${{ matrix.node }}
242246
- name: Install dependencies
243-
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
247+
run: yarn install
244248
- name: Download artifacts
245249
uses: actions/download-artifact@v3
246250
with:
@@ -274,10 +278,10 @@ jobs:
274278
- name: Cache NPM dependencies
275279
uses: actions/cache@v3
276280
with:
277-
path: node_modules
281+
path: .yarn/cache
278282
key: npm-cache-test-linux-x64-gnu-${{ matrix.node }}
279283
- name: Install dependencies
280-
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
284+
run: yarn install
281285
- name: Download artifacts
282286
uses: actions/download-artifact@v3
283287
with:
@@ -311,10 +315,12 @@ jobs:
311315
- name: Cache NPM dependencies
312316
uses: actions/cache@v3
313317
with:
314-
path: node_modules
318+
path: .yarn/cache
315319
key: npm-cache-test-x86_64-unknown-linux-musl-${{ matrix.node }}
316320
- name: Install dependencies
317-
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
321+
run: |
322+
yarn config set supportedArchitectures.libc "musl"
323+
yarn install
318324
- name: Download artifacts
319325
uses: actions/download-artifact@v3
320326
with:
@@ -351,10 +357,13 @@ jobs:
351357
- name: Cache NPM dependencies
352358
uses: actions/cache@v3
353359
with:
354-
path: node_modules
360+
path: .yarn/cache
355361
key: npm-cache-test-linux-aarch64-gnu-${{ matrix.node }}
356362
- name: Install dependencies
357-
run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
363+
run: |
364+
yarn config set supportedArchitectures.cpu "arm64"
365+
yarn config set supportedArchitectures.libc "glibc"
366+
yarn install
358367
- name: Setup and run tests
359368
uses: addnab/docker-run-action@v3
360369
with:
@@ -383,10 +392,13 @@ jobs:
383392
- name: Cache NPM dependencies
384393
uses: actions/cache@v3
385394
with:
386-
path: node_modules
395+
path: .yarn/cache
387396
key: npm-cache-test-linux-aarch64-musl-${{ matrix.node }}
388397
- name: Install dependencies
389-
run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
398+
run: |
399+
yarn config set supportedArchitectures.cpu "arm64"
400+
yarn config set supportedArchitectures.libc "musl"
401+
yarn install
390402
- name: Setup and run tests
391403
uses: addnab/docker-run-action@v3
392404
with:
@@ -422,10 +434,12 @@ jobs:
422434
- name: Cache NPM dependencies
423435
uses: actions/cache@v3
424436
with:
425-
path: node_modules
437+
path: .yarn/cache
426438
key: npm-cache-test-linux-arm-gnueabihf-${{ matrix.node }}
427439
- name: Install dependencies
428-
run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
440+
run: |
441+
yarn config set supportedArchitectures.cpu "arm"
442+
yarn install
429443
- name: Setup and run tests
430444
uses: addnab/docker-run-action@v3
431445
with:

0 commit comments

Comments
 (0)