Skip to content

Commit 312d612

Browse files
authored
ci: add x86_64-unknown-freebsd target (#226)
1 parent 6d097a7 commit 312d612

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/release-napi.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,49 @@ jobs:
159159
path: |
160160
napi/*.node
161161
napi/*.wasm
162+
163+
build-freebsd:
164+
runs-on: ubuntu-latest
165+
name: Build FreeBSD
166+
steps:
167+
- uses: actions/checkout@v4
168+
- name: Build
169+
id: build
170+
uses: cross-platform-actions/[email protected]
171+
env:
172+
DEBUG: napi:*
173+
RUSTUP_IO_THREADS: 1
174+
with:
175+
operating_system: freebsd
176+
version: '14.0'
177+
memory: 8G
178+
cpu_count: 3
179+
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
180+
shell: bash
181+
run: |
182+
sudo pkg install -y -f curl node libnghttp2 npm
183+
curl https://sh.rustup.rs -sSf --output rustup.sh
184+
sh rustup.sh -y --profile minimal --default-toolchain stable
185+
source "$HOME/.cargo/env"
186+
echo "~~~~ rustc --version ~~~~"
187+
rustc --version
188+
echo "~~~~ node -v ~~~~"
189+
node -v
190+
pwd
191+
ls -lah
192+
whoami
193+
env
194+
corepack enable
195+
pnpm install
196+
pnpm build --target x86_64-unknown-freebsd
197+
rm -rf node_modules
198+
rm -rf target
199+
- name: Upload artifact
200+
uses: actions/upload-artifact@v4
201+
with:
202+
name: bindings-freebsd
203+
path: napi/*.node
204+
if-no-files-found: error
162205

163206
publish:
164207
name: Publish NAPI

npm/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"aarch64-pc-windows-msvc",
3333
"x86_64-unknown-linux-gnu",
3434
"x86_64-unknown-linux-musl",
35+
"x86_64-unknown-freebsd",
3536
"aarch64-unknown-linux-gnu",
3637
"aarch64-unknown-linux-musl",
3738
"armv7-unknown-linux-gnueabihf",

0 commit comments

Comments
 (0)