@@ -49,24 +49,68 @@ jobs:
4949 include :
5050 - os : windows-latest
5151 target : x86_64-pc-windows-msvc
52+ build : |
53+ pnpm build --target x86_64-pc-windows-msvc
54+
5255 - os : windows-latest
5356 target : aarch64-pc-windows-msvc
57+ build : |
58+ pnpm build --target aarch64-pc-windows-msvc
59+
5460 - os : ubuntu-latest
5561 target : x86_64-unknown-linux-gnu
62+ build : |
63+ pnpm build --target x86_64-unknown-linux-gnu --use-napi-cross
64+
5665 - os : ubuntu-latest
5766 target : x86_64-unknown-linux-musl
67+ build : |
68+ pnpm build --target x86_64-unknown-linux-musl -x
69+
5870 - os : ubuntu-latest
5971 target : aarch64-unknown-linux-gnu
72+ build : |
73+ pnpm build --target aarch64-unknown-linux-gnu --use-napi-cross
74+
6075 - os : ubuntu-latest
6176 target : aarch64-unknown-linux-musl
77+ build : |
78+ pnpm build --target aarch64-unknown-linux-musl -x
79+
6280 - os : ubuntu-latest
6381 target : armv7-unknown-linux-gnueabihf
82+ build : |
83+ pnpm build --target armv7-unknown-linux-gnueabihf --use-napi-cross
84+
6485 - os : macos-latest
6586 target : x86_64-apple-darwin
87+ build : |
88+ pnpm build --target x86_64-apple-darwin
89+
6690 - os : macos-latest
6791 target : aarch64-apple-darwin
92+ build : |
93+ pnpm build --target aarch64-apple-darwin
94+
6895 - os : ubuntu-latest
6996 target : wasm32-wasip1-threads
97+ build : |
98+ pnpm build --target wasm32-wasip1-threads
99+
100+ - os : ubuntu-latest
101+ target : s390x-unknown-linux-gnu
102+ build : |
103+ export CFLAGS="-fuse-ld=lld"
104+ pnpm build --target s390x-unknown-linux-gnu --use-napi-cross
105+
106+ - os : ubuntu-latest
107+ target : riscv64gc-unknown-linux-gnu
108+ build : |
109+ sudo apt-get update
110+ sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu -y
111+ export CC=riscv64-linux-gnu-gcc
112+ export CXX=riscv64-linux-gnu-g++
113+ pnpm build --target riscv64gc-unknown-linux-gnu
70114
71115 name : Package ${{ matrix.target }}
72116 runs-on : ${{ matrix.os }}
@@ -82,25 +126,16 @@ jobs:
82126 with :
83127 version : 0.13.0
84128
85- - name : Build with zig cross
86- if : ${{ contains(matrix.target, 'musl') }}
87- run : pnpm build -x --target ${{ matrix.target }}
88-
89- - name : Build with napi cross
90- if : ${{ contains(matrix.target, 'gnu') }}
91- env :
92- CC : clang # for mimalloc
93- run : pnpm build --use-napi-cross --target ${{ matrix.target }}
94-
95129 - name : Build
96- if : ${{ !contains(matrix.target, 'gnu') && !contains(matrix.target, 'musl') }}
130+ run : ${{ matrix.build }}
131+ shell : bash
97132 env :
98133 CC : clang # for mimalloc
99- run : pnpm build --target ${{ matrix.target }}
100134
101135 - name : Upload artifacts
102136 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
103137 with :
138+ if-no-files-found : ' error'
104139 name : bindings-${{ matrix.target }}
105140 path : |
106141 napi/*.node
0 commit comments