File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,20 +54,28 @@ jobs:
5454 include :
5555 - os : macos-latest
5656 target : x86_64-apple-darwin
57+ cross_compile : false
5758 - os : macos-latest
5859 target : aarch64-apple-darwin
60+ cross_compile : false
5961 - os : windows-latest
6062 target : x86_64-pc-windows-msvc
63+ cross_compile : false
6164 - os : windows-latest
6265 target : aarch64-pc-windows-msvc
66+ cross_compile : false
6367 - os : ubuntu-latest
6468 target : x86_64-unknown-linux-gnu
69+ cross_compile : false
6570 - os : ubuntu-latest
6671 target : x86_64-unknown-linux-musl
72+ cross_compile : true
6773 - os : ubuntu-latest
6874 target : aarch64-unknown-linux-gnu
75+ cross_compile : true
6976 - os : ubuntu-latest
7077 target : aarch64-unknown-linux-musl
78+ cross_compile : true
7179 runs-on : ${{ matrix.os }}
7280 steps :
7381 - uses : actions/checkout@v6
8795 - name : Install dependencies
8896 run : pnpm install
8997
98+ - name : Install Zig
99+ if : matrix.cross_compile
100+ uses : goto-bus-stop/setup-zig@v2
101+
90102 - name : Build native target
103+ if : ${{ !matrix.cross_compile }}
91104 run : pnpm exec napi build --platform --release --target ${{ matrix.target }}
92105
106+ - name : Build native target (cross)
107+ if : matrix.cross_compile
108+ run : pnpm exec napi build --platform --release --cross-compile --target ${{ matrix.target }}
109+
93110 - name : Upload native artifact
94111 uses : actions/upload-artifact@v4
95112 with :
You can’t perform that action at this time.
0 commit comments