mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
fix: prevent x64 native module rebuild on ARM64 CI runner
On ubuntu-24.04-arm runners, electron-builder's post-build @electron/rebuild incorrectly tries to restore native modules to x64 architecture. The ARM64 g++ compiler doesn't support the -m64 flag, causing the build to fail. Setting npm_config_arch=arm64 ensures node-gyp correctly identifies the host architecture, preventing the erroneous x64 rebuild.
This commit is contained in:
@@ -66,6 +66,10 @@ jobs:
|
||||
env:
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: ${{ matrix.name == 'macos' && 'false' || '' }}
|
||||
ELECTRON_BUILDER_PUBLISH: "never"
|
||||
# On ARM64 runners, electron-builder's post-build @electron/rebuild incorrectly
|
||||
# tries to restore native modules to x64, but the ARM g++ doesn't support -m64.
|
||||
# Setting npm_config_arch ensures node-gyp uses the correct host architecture.
|
||||
npm_config_arch: ${{ matrix.name == 'linux-arm64' && 'arm64' || '' }}
|
||||
run: npm run ${{ matrix.pack_script }}
|
||||
|
||||
- name: Upload artifacts
|
||||
|
||||
Reference in New Issue
Block a user