Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ jobs:
with:
node-version: 22
cache: npm
# onnxruntime-node would download its NVIDIA (CUDA) add-on on Linux, hundreds of MB Duct never uses.
- run: npm ci
env:
ONNXRUNTIME_NODE_INSTALL: skip
- run: npm run build
- run: node scripts/check-runtime-deps.mjs
- run: npx electron-builder ${{ matrix.args }} --publish never
Expand Down
7 changes: 5 additions & 2 deletions scripts/after-pack.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ exports.default = async function afterPack(context) {
for (const napi of readdirSync(bin)) {
for (const os of readdirSync(join(bin, napi))) {
for (const cpu of readdirSync(join(bin, napi, os))) {
if (os === platform && cpu === arch) kept++
else rmSync(join(bin, napi, os, cpu), { recursive: true, force: true })
if (os === platform && cpu === arch) {
kept++
// GPU add-ons (CUDA, TensorRT): transcription runs on the CPU.
for (const f of readdirSync(join(bin, napi, os, cpu))) if (/providers_(cuda|tensorrt|rocm)/i.test(f)) rmSync(join(bin, napi, os, cpu, f), { force: true })
} else rmSync(join(bin, napi, os, cpu), { recursive: true, force: true })
}
if (!readdirSync(join(bin, napi, os)).length) rmSync(join(bin, napi, os), { recursive: true, force: true })
}
Expand Down
Loading