@@ -44,16 +44,37 @@ jobs:
44
44
build : |
45
45
yarn build --target aarch64-apple-darwin
46
46
strip -x *.node
47
- # - host: ubuntu-latest
48
- # target: aarch64-unknown-linux-gnu
49
- # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
50
- # build: yarn build --target aarch64-unknown-linux-gnu
47
+ - host : ubuntu-latest
48
+ target : aarch64-unknown-linux-gnu
49
+ # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
50
+ build : |
51
+ # We don't actually need zig currently
52
+ # curl --output zig-linux-x86_64-0.13.0.tar.xz https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz
53
+ # tar xf zig-linux-x86_64-0.13.0.tar.xz
54
+ # export PATH=$PATH:$(pwd)/zig-linux-x86_64-0.13.0
55
+ # zig version
56
+
57
+ # install gcc compiler for aarch64
58
+ sudo apt update
59
+ sudo apt install gcc-aarch64-linux-gnu
60
+
61
+ aarch64-linux-gnu-gcc --version
62
+
63
+ # Download libsodium
64
+ mkdir libsodium
65
+ curl -L --output ./libsodium/LATEST.tar.gz https://github.com/matthme/holochain-binaries/releases/download/libsodium-releases/LATEST.tar.gz
66
+ curl -L --output ./libsodium/LATEST.tar.gz.minisig https://github.com/matthme/holochain-binaries/releases/download/libsodium-releases/LATEST.tar.gz.minisig
67
+ curl -L --output ./libsodium/libsodium-1.0.19-stable.zip https://github.com/matthme/holochain-binaries/releases/download/libsodium-releases/libsodium-1.0.19-stable.zip
68
+ curl -L --output ./libsodium/libsodium-1.0.19-stable.zip.minisig https://github.com/matthme/holochain-binaries/releases/download/libsodium-releases/libsodium-1.0.19-stable.zip.minisig
69
+
70
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc SODIUM_DIST_DIR="$(pwd)/libsodium" yarn build --target aarch64-unknown-linux-gnu
71
+
51
72
# - host: ubuntu-latest
52
73
# target: armv7-unknown-linux-gnueabihf
53
74
# setup: |
54
75
# sudo apt-get update
55
76
# sudo apt-get install gcc-arm-linux-gnueabihf -y
56
- # build: yarn build --target armv7-unknown-linux-gnueabihf
77
+ # build: yarn build --zig -- target armv7-unknown-linux-gnueabihf
57
78
58
79
name : stable - ${{ matrix.settings.target }} - node@20
59
80
runs-on : ${{ matrix.settings.host }}
@@ -90,11 +111,6 @@ jobs:
90
111
with :
91
112
go-version : ' stable'
92
113
93
- # - uses: goto-bus-stop/setup-zig@v2
94
- # if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'armv7-unknown-linux-musleabihf' }}
95
- # with:
96
- # version: 0.11.0
97
-
98
114
- name : Setup toolchain
99
115
run : ${{ matrix.settings.setup }}
100
116
if : ${{ matrix.settings.setup }}
@@ -212,47 +228,49 @@ jobs:
212
228
- name : Test bindings
213
229
run : docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test
214
230
215
- # test-linux-aarch64-gnu-binding:
216
- # name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
217
- # needs:
218
- # - build
219
- # strategy:
220
- # fail-fast: false
221
- # matrix:
222
- # node:
223
- # - '18'
224
- # - '20'
225
- # runs-on: ubuntu-latest
226
- # steps:
227
- # - uses: actions/checkout@v4
228
- # - name: Download artifacts
229
- # uses: actions/download-artifact@v4
230
- # with:
231
- # name: bindings-aarch64-unknown-linux-gnu
232
- # path: .
233
- # - name: List packages
234
- # run: ls -R .
235
- # shell: bash
236
- # - name: Install dependencies
237
- # run: |
238
- # yarn config set supportedArchitectures.cpu "arm64"
239
- # yarn config set supportedArchitectures.libc "glibc"
240
- # yarn install
241
- # - name: Set up QEMU
242
- # uses: docker/setup-qemu-action@v3
243
- # with:
244
- # platforms: arm64
245
- # - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
246
- # - name: Setup and run tests
247
- # uses: addnab/docker-run-action@v3
248
- # with:
249
- # image: node:${{ matrix.node }}-slim
250
- # options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
251
- # run: |
252
- # set -e
253
- # yarn test
254
- # ls -la
231
+ test-linux-aarch64-gnu-binding :
232
+ name : Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
233
+ needs :
234
+ - build
235
+ strategy :
236
+ fail-fast : false
237
+ matrix :
238
+ node :
239
+ - ' 18'
240
+ - ' 20'
241
+ runs-on : ubuntu-latest
242
+ steps :
243
+ - uses : actions/checkout@v4
244
+ - name : Download artifacts
245
+ uses : actions/download-artifact@v4
246
+ with :
247
+ name : bindings-aarch64-unknown-linux-gnu
248
+ path : .
249
+ - name : List packages
250
+ run : ls -R .
251
+ shell : bash
252
+ - name : Install dependencies
253
+ run : |
254
+ yarn config set supportedArchitectures.cpu "arm64"
255
+ yarn config set supportedArchitectures.libc "glibc"
256
+ yarn install
257
+ - name : Set up QEMU
258
+ uses : docker/setup-qemu-action@v3
259
+ with :
260
+ platforms : arm64
261
+ - run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
262
+ - name : Setup and run tests
263
+ uses : addnab/docker-run-action@v3
264
+ with :
265
+ image : node:${{ matrix.node }}-slim
266
+ options : ' --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
267
+ run : |
268
+ set -e
269
+ yarn test
270
+ ls -la
255
271
272
+ # Adding this will also require adding an npm folder and adding the target triple to the
273
+ # root package.json: https://github.com/napi-rs/napi-rs/issues/1545
256
274
# test-linux-arm-gnueabihf-binding:
257
275
# name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
258
276
# needs:
@@ -299,6 +317,7 @@ jobs:
299
317
needs :
300
318
- test-macOS-windows-binding
301
319
- test-linux-x64-gnu-binding
320
+ - test-linux-aarch64-gnu-binding
302
321
steps :
303
322
- uses : actions/checkout@v4
304
323
- name : Setup node
0 commit comments