4242 check-latest : true
4343 cache : yarn
4444 - name : Install rust
45- uses : actions-rust-lang/setup- rust-toolchain@v1
45+ uses : dtolnay/ rust-toolchain@stable
4646 with :
47+ toolchain : stable
4748 components : rustfmt
4849 - name : Install taplo
4950 run : cargo install taplo-cli --locked
5960 steps :
6061 - uses : actions/checkout@v4
6162 - name : Install rust
62- uses : actions-rust-lang/setup- rust-toolchain@v1
63+ uses : dtolnay/ rust-toolchain@stable
6364 with :
65+ toolchain : stable
6466 components : clippy
6567 - name : Run clippy
6668 run : cargo clippy
7981 - host : windows-latest
8082 target : x86_64-pc-windows-msvc
8183 build : yarn build --target x86_64-pc-windows-msvc
84+ - host : windows-latest
85+ target : aarch64-pc-windows-msvc
86+ build : yarn build --target aarch64-pc-windows-msvc
8287 - host : ubuntu-latest
8388 target : x86_64-unknown-linux-gnu
8489 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
9196 set -e &&
9297 apk add perl &&
9398 yarn build
99+ - host : ubuntu-latest
100+ target : aarch64-unknown-linux-gnu
101+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
102+ build : |-
103+ # `perl` needs for building openssl
104+ set -e &&
105+ apt-get update &&
106+ apt-get install -y perl &&
107+ unset CC_aarch64_unknown_linux_gnu &&
108+ unset CXX_aarch64_unknown_linux_gnu &&
109+ yarn build --target aarch64-unknown-linux-gnu
110+ - host : ubuntu-latest
111+ target : aarch64-unknown-linux-musl
112+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
113+ build : |-
114+ # `perl` needs for building openssl
115+ set -e &&
116+ apk add perl &&
117+ rustup target add aarch64-unknown-linux-musl &&
118+ yarn build --target aarch64-unknown-linux-musl
119+ - host : ubuntu-latest
120+ target : aarch64-linux-android
121+ build : yarn build --target aarch64-linux-android
122+ - host : ubuntu-latest
123+ target : armv7-linux-androideabi
124+ build : yarn build --target armv7-linux-androideabi
94125 name : stable - ${{ matrix.settings.target }} - node@20
95126 runs-on : ${{ matrix.settings.host }}
96127 steps :
@@ -103,10 +134,11 @@ jobs:
103134 check-latest : true
104135 cache : yarn
105136 - name : Install rust
106- uses : actions-rust-lang/setup- rust-toolchain@v1
137+ uses : dtolnay/ rust-toolchain@stable
107138 if : ${{ !matrix.settings.docker }}
108139 with :
109- target : ${{ matrix.settings.target }}
140+ toolchain : stable
141+ targets : ${{ matrix.settings.target }}
110142 - name : Cache cargo
111143 uses : actions/cache@v4
112144 with :
@@ -175,8 +207,6 @@ jobs:
175207 shell : bash
176208 - name : Test bindings
177209 run : yarn vitest run
178- env :
179- TEST_GITHUB_TOKEN : ${{ secrets.TEST_GITHUB_TOKEN }}
180210 test-windows-binding :
181211 name : Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
182212 needs :
@@ -211,8 +241,6 @@ jobs:
211241 shell : bash
212242 - name : Test bindings
213243 run : yarn vitest run
214- env :
215- TEST_GITHUB_TOKEN : ${{ secrets.TEST_GITHUB_TOKEN }}
216244 test-linux-x64-gnu-binding :
217245 name : Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
218246 needs :
@@ -243,7 +271,7 @@ jobs:
243271 run : ls -R .
244272 shell : bash
245273 - name : Test bindings
246- run : docker run --rm -e TEST_GITHUB_TOKEN=${{ secrets.TEST_GITHUB_TOKEN }} - v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn vitest run
274+ run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn vitest run
247275 test-linux-x64-musl-binding :
248276 name : Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
249277 needs :
@@ -276,4 +304,43 @@ jobs:
276304 run : ls -R .
277305 shell : bash
278306 - name : Test bindings
279- run : docker run --rm -e TEST_GITHUB_TOKEN=${{ secrets.TEST_GITHUB_TOKEN }} -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn vitest run
307+ run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn vitest run
308+ test-linux-aarch64-gnu-binding :
309+ name : Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
310+ needs :
311+ - build
312+ strategy :
313+ fail-fast : false
314+ matrix :
315+ node :
316+ - ' 18'
317+ - ' 20'
318+ runs-on : ubuntu-latest
319+ steps :
320+ - uses : actions/checkout@v4
321+ - name : Download artifacts
322+ uses : actions/download-artifact@v4
323+ with :
324+ name : bindings-aarch64-unknown-linux-gnu
325+ path : .
326+ - name : List packages
327+ run : ls -R .
328+ shell : bash
329+ - name : Install dependencies
330+ run : |
331+ yarn config set supportedArchitectures.cpu "arm64"
332+ yarn config set supportedArchitectures.libc "glibc"
333+ yarn install
334+ - name : Set up QEMU
335+ uses : docker/setup-qemu-action@v3
336+ with :
337+ platforms : arm64
338+ - run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
339+ - name : Setup and run tests
340+ uses : addnab/docker-run-action@v3
341+ with :
342+ image : node:${{ matrix.node }}-slim
343+ options : ' --user 0:0 --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
344+ run : |
345+ set -e
346+ yarn vitest run
0 commit comments