Fix better-sqlite3 for ARM64 Linux

- Use ubuntu-24.04-arm for ARM64 Linux builds
- Add TARGET_ARCH support to electron-rebuild
- Add test workflow for ARM64 fix
This commit is contained in:
linull
2025-09-16 21:29:16 +08:00
parent 982d136151
commit 2e510f9dbb
4 changed files with 47 additions and 1 deletions

View File

@@ -24,13 +24,15 @@ function rebuildNativeDependencies(projectRoot: string) {
process.exit(1);
}
console.log(`Rebuilding ${projectRoot} with ${electronVersion}...`);
const targetArch = process.env.TARGET_ARCH || process.arch;
console.log(`Rebuilding ${projectRoot} with ${electronVersion} for ${targetArch}...`);
const resolvedPath = resolve(projectRoot);
rebuild({
projectRootPath: resolvedPath,
buildPath: resolvedPath,
electronVersion,
arch: targetArch,
force: true
});
}