Skip to content

Commit 71b3412

Browse files
committed
Make: Enable Deno to run pre-builds
1 parent 1215418 commit 71b3412

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/prerelease.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ jobs:
140140
env:
141141
CC: gcc-12
142142
CXX: g++-12
143+
# `node-gyp-build` will look at this first; setting it prevents an
144+
# unintended rebuild and lets Deno just `dlopen` the prebuilt `.node`.
145+
PREBUILDS_ONLY: "1"
143146

144147
steps:
145148
- name: Checkout
@@ -167,8 +170,16 @@ jobs:
167170
with:
168171
deno-version: vx.x.x
169172

173+
# --allow-env : `node-gyp-build` pokes at `process.env`
174+
# --allow-ffi : Deno needs this to `dlopen` the `.node` addon
175+
# --unstable : Node-API/FFI loader still gated under this flag
170176
- name: Test with Deno
171-
run: deno test --allow-read
177+
run: >
178+
deno test
179+
--allow-read
180+
--allow-env=PREBUILDS_ONLY,npm_config_runtime,npm_config_target
181+
--allow-ffi
182+
--unstable
172183
173184
test_rust:
174185
name: Test Rust

0 commit comments

Comments
 (0)