fix: build Windows ARM64 Opus with supported toolchain

This commit is contained in:
illusia committed 2026-10-08 11:05:13 +08:00
1 parent 39413cf840
commit aad7833509
3 files changed
+186 -2

No files matched your search

+14 -2
View File
@@ -51,8 +51,20 @@ jobs:
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm run prepare:sdk
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if ((node -p "process.arch") -eq "arm64") {
$env:npm_config_node_gyp = Join-Path (Get-Location) "node_modules/node-gyp/bin/node-gyp.js"
$opusDirectory = Join-Path (Get-Location) "node_modules/@discordjs/opus"
Push-Location $opusDirectory
try {
node ..\node-pre-gyp\bin\node-pre-gyp install --fallback-to-build
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally {
Pop-Location
}
} else {
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
npm --prefix web ci --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$currentVersion = node -p "require('./package.json').version"