feat: add Linux x64 and arm64 Homebrew support#104
feat: add Linux x64 and arm64 Homebrew support#104yetmike wants to merge 6 commits intosteipete:mainfrom
Conversation
- Add buildLinuxX64() and buildLinuxArm64() using bun-linux-x64/arm64 targets - Extract sha256() helper that uses shasum on macOS and sha256sum on Linux - Refactor buildPlatform() shared logic for all platforms - Add detectNativePlatform() to auto-detect the build host - Support --platform <macos-arm64|linux-x64|linux-arm64> flag for cross-compilation - Support --all flag to build every platform in one run - E2E tests only run on the native platform binary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add sha256_file() helper that works on both macOS (shasum) and Linux (sha256sum) - Update phase_tap to download and verify all 3 platform tarballs: macos-arm64, linux-x64, linux-arm64 - Rewrite formula using on_macos/on_linux blocks instead of a single flat url+sha256 - Derive GitHub repo from git remote so forks automatically use their own releases - Formula is fully regenerated on each tap update for consistency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .github/workflows/build-binary.yml builds linux-x64 and linux-arm64 on every push/PR using native ubuntu-latest and ubuntu-24.04-arm runners - On tag push (v*): uploads Linux tarballs to the GitHub release alongside the macOS artifact steipete publishes manually - No macOS runner added — steipete's existing local build:bun:test flow is untouched - RELEASING.md updated to document the new multi-platform workflow and the scripts/release.sh tap helper for updating the formula Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the GitHub Actions workflow in favour of cross-compiling all three platform binaries locally in a single step: pnpm build:bun:all:test Bun supports cross-compilation, so macOS arm64, linux-x64 and linux-arm64 tarballs are all produced from the release machine. macOS is smoke-tested natively; Linux targets are cross-compiled and uploaded together with the extension zips in `gh release create`. Changes: - Remove .github/workflows/build-binary.yml - Add build:bun:all and build:bun:all:test scripts to package.json - Update RELEASING.md: step 3 now runs build:bun:all:test, step 7 uploads all three tarballs, Homebrew section updated accordingly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When --all is used, each platform overwrites dist-bun/summarize. By building the native platform last, dist-bun/summarize ends up as the locally runnable binary so --test can smoke-test it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fix: Each build overwrites Verified on Linux x64: |
…ing empty sha256 If a platform tarball is absent from the release (e.g. macos-arm64 when building from Linux), the Python formula generator now omits that on_macos/on_linux block entirely rather than writing sha256 "". This makes the formula valid and installable even when only a subset of platform tarballs exist. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fix: Tested the full flow on Linux (where no macOS tarball exists in the release):
On steipete's Mac, all three tarballs will be present so all three blocks will appear in the formula. |
|
Note on cross-compilation: One outstanding item in the test plan that requires a Mac: verify the macOS binary cross-compiled from Linux actually runs on Apple Silicon. Everything else has been tested on Linux x64. |
|
Hi @steipete @yetmike no other skills failed during onboarding. And |
|
Homebrew is only meant for macOS. Use npm for other OSes |
|
Homebrew does support Linux Let me check the openclaw errors and come with the fix |
Summary
Adds prebuilt Linux binaries so
brew install steipete/tap/summarizeworks on Linux x64 and arm64, not just macOS.Three small, focused changes — no CI added, everything stays in the existing manual release flow.
Follow-up: steipete/homebrew-tap#18 restructures the formula with
on_macos/on_linuxblocks. Merge this PR first, cut a release, then merge that one.scripts/build-bun.jsbuildLinuxX64()/buildLinuxArm64()usingbun-linux-x64/bun-linux-arm64compile targetsbuildPlatform()helper (all three platforms share identical logic)sha256()helper —shasum -a 256on macOS,sha256sumon LinuxdetectNativePlatform()— auto-detects host so the existingpnpm build:bun:teston macOS is completely unchanged--platform <macos-arm64|linux-x64|linux-arm64>flag for a single platform--allflag to build all three in one run; native platform is always built last sodist-bun/summarizeis the runnable binary for smoke tests--teston--allonly runs smoke tests against the native binarypackage.jsonTwo new scripts that mirror the existing
build:bun/build:bun:testconvention:scripts/release.sh tapsha256_file()helper works on macOS (shasum) and Linux (sha256sum)on_macos/on_linuxblocks (no more manual editing)git remote get-url origin— works for any fork automaticallyRELEASING.mdStep 3 now reads:
Step 7 (
gh release create) now includes all three Bun tarballs alongside the extension zips.Step 8 (tap) now says to run
bash scripts/release.sh tapinstead of editing the formula by hand.How cross-compilation works
Bun supports cross-compilation out of the box. Running
pnpm build:bun:all:teston your Mac:bun-darwin-arm64→dist-bun/summarize-macos-arm64-v<ver>.tar.gzbun-linux-arm64→dist-bun/summarize-linux-arm64-v<ver>.tar.gzbun-linux-x64natively... wait, wrong — on macOS the native ismacos-arm64, built last. On Linux x64 the native islinux-x64, built last. The native platform is always last so smoke tests run on the correct binary.Test plan
pnpm build:bun:all:teston Linux x64 — all three tarballs built, smoke test + E2E pass on the x64 binarybrew tap yetmike/tap && brew install summarize && summarize --versionon Linux — workspnpm build:bun:all:teston macOS — builds all three tarballs, smoke-tests macOS binarybash scripts/release.sh tapfills in real sha256s and rewrites formula correctlypnpm build:bun:teston macOS still works exactly as before (no regression)🤖 Generated with Claude Code