Skip to content

fix: split Linux CI into per-arch jobs to prevent native module mismatch#19

Merged
abasiri merged 5 commits into
mainfrom
fix/linux-multi-arch-build
Mar 26, 2026
Merged

fix: split Linux CI into per-arch jobs to prevent native module mismatch#19
abasiri merged 5 commits into
mainfrom
fix/linux-multi-arch-build

Conversation

@abasiri

@abasiri abasiri commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #18

  • Split the Linux CI matrix entry into two separate jobs: ubuntu-latest (x64) and ubuntu-24.04-arm (arm64)
  • Each job now builds only its native architecture, ensuring better-sqlite3 and node-pty binaries match the package label
  • Mac and Windows are unaffected — they only have one target type each, so electron-builder sequences arch switches correctly

Root cause

When electron-builder builds multiple targets (AppImage + deb) for multiple architectures in a single invocation, it only rebuilds native modules when switching arches for the first target type. The second target type reuses whatever was last compiled. This caused the amd64 .deb to ship with arm64 better_sqlite3.node.

Test plan

  • Verify CI runs for both ubuntu-latest (x64) and ubuntu-24.04-arm (arm64)
  • Download the amd64 .deb and confirm file reports x86_64 for better_sqlite3.node
  • Download the arm64 .deb and confirm file reports aarch64 for better_sqlite3.node
  • Mac and Windows builds still succeed

🤖 Generated with Claude Code

abasiri and others added 5 commits March 24, 2026 20:34
… remove unused express

Addresses a crash (EXC_BREAKPOINT / NSRangeException) triggered by macOS display
reconfiguration in Chromium's native NSView layout code. Also eliminates 11 npm
audit vulnerabilities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tch (#18)

electron-builder rebuilds native modules when switching architectures for the
first target type (AppImage), but reuses the last-compiled binaries for
subsequent targets (deb). This caused the amd64 .deb to ship with arm64
better_sqlite3.node. Splitting into separate x64/arm64 runners ensures each
package gets natively compiled modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
electron-builder doesn't accept --arch as a flag. The correct syntax is
--x64 or --arm64 directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e host arch

The --x64/--arm64 CLI flags don't restrict electron-builder to a single
arch — it still builds all arches listed in package.json config. Instead,
remove the arch arrays from the Linux target config so electron-builder
defaults to the host architecture. Combined with the per-arch runner split,
each job natively builds only its own arch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abasiri abasiri merged commit 7956fd5 into main Mar 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.0.18 amd64 .deb contains arm64 native module (better_sqlite3.node) — crashes on x86_64 Linux

1 participant