feat: add cross-compile build scripts and smoke tests [2/4] - #47
Conversation
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds reusable GitHub Actions workflows 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@wyattjoh Is this an invalid target or a platform-specific issue? |
|
Not an invalid target -- The build script ( That said, we could pin a minimum Bun version in CI or add a version check to the build script if you'd prefer an explicit guard. What do you think? |
3bcc5ea to
cb764f6
Compare
Add scripts to cross-compile the CLI binary for 8 platform targets (linux/darwin/windows × x64/arm64), plus reusable CI workflows for building and smoke-testing binaries across stable/canary/snapshot channels.
cb764f6 to
fb82e61
Compare
|
Replaced the runtime version check with For building locally: |
Summary
#43 sets up the monorepo with a wrapper shim that resolves platform-specific binaries, but we can only build a binary for the local machine today. To actually ship
npx clerk, we need to produce binaries for every platform users run on.This PR adds the cross-compilation pipeline:
scripts/build.ts-- compiles the CLI viabun build --compilefor 8 platform targets (darwin-arm64, darwin-x64, linux-arm64, linux-arm64-musl, linux-x64, linux-x64-musl, windows-x64, windows-arm64), with binary format verification usingfileoutputscripts/releaser/targets.ts-- single source of truth for target definitions, Bun target mappings, and verify patternsbuild-binaries.yml-- reusable CI workflow that matrix-builds all targets on the appropriate runner OSsmoke-test.yml-- reusable CI workflow that runs the compiled binary on native runners to catch runtime issues (e.g. missing shared libraries) before publishingAlso extends root lint/format scripts to cover the new
scripts/directory and adds*.bun-buildto.gitignore.Merge instructions
This is part of a 4-PR stack (#43, #47, #45, #46). After squash-merging this PR, retarget #45 to
mainbefore deleting this branch, then:Then merge #45, and repeat.
Test plan
format:check,lint,build,testbun run build:compile:allcompletes for the local platform targetbuild-binaries.ymlmatrix againsttargets.tsdefinitionsSummary by CodeRabbit