Skip to content

build: add linux arm64 prebuilt package release support#107

Merged
benvinegar merged 1 commit intomodem-dev:mainfrom
aliou:feat/linux-arm64-prebuilt-packages
Mar 24, 2026
Merged

build: add linux arm64 prebuilt package release support#107
benvinegar merged 1 commit intomodem-dev:mainfrom
aliou:feat/linux-arm64-prebuilt-packages

Conversation

@aliou
Copy link
Copy Markdown
Contributor

@aliou aliou commented Mar 24, 2026

Hello again!

This adds linux arm64 to the built pipeline. I tried to figure out if there was a particular reason this wasn't already the case but couldn't find one, please lmk if there's something I missed!

For context, I work on some projects from inside a Lima vm on my mac, which by defaults re-uses the same arch but on linux.

summary by gpt 5.3

Summary

Add Linux ARM64 (aarch64) to the prebuilt release pipeline so hunkdiff can publish a native hunkdiff-linux-arm64 package.

Changes

  • Update prebuilt package matrix:
    • scripts/prebuilt-package-helpers.ts
    • add hunkdiff-linux-arm64 spec
  • Update release workflow:
    • .github/workflows/release-prebuilt-npm.yml
    • add hunkdiff-linux-arm64 build job on ubuntu-24.04-arm
  • Update tests:
    • test/prebuilt-package-helpers.test.ts
    • expect linux/arm64 to resolve
    • include linux arm64 in stable sort expectation

Why

Source build on Linux ARM64 already works (validated in lima-default), but prebuilt publishing did not include linux arm64. This aligns packaging with actual runtime support.

Validation

  • bun run typecheck
  • bun test test/prebuilt-package-helpers.test.ts
  • bash ./scripts/build-bin.sh
  • bun ./scripts/stage-prebuilt-npm.ts
  • bun ./scripts/check-prebuilt-pack.ts

Notes

  • No behavior changes for existing platforms.
  • This only extends prebuilt package coverage.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 24, 2026

Greptile Summary

This PR extends the prebuilt binary release pipeline to include a native Linux ARM64 package (hunkdiff-linux-arm64), enabling users running on Linux aarch64 (e.g. Lima VMs on Apple Silicon) to consume a prebuilt binary rather than building from source.

The change touches all three layers consistently:

  • Workflow (.github/workflows/release-prebuilt-npm.yml): adds a new matrix entry using the ubuntu-24.04-arm GitHub-hosted runner, which natively produces the ARM64 artifact without any cross-compilation.
  • Package helpers (scripts/prebuilt-package-helpers.ts): inserts the new PlatformPackageSpec into PLATFORM_PACKAGE_MATRIX in alphabetical order, so all existing generic lookup / staging / publish scripts pick it up automatically with zero further changes.
  • Tests (test/prebuilt-package-helpers.test.ts): correctly flips the linux/arm64 resolution from an expected throw to a successful lookup, and adds the new package name to the stable sort expectation.

No behaviour changes for existing platforms; this is a pure additive extension.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, additive change with no risk to existing platform builds.
  • All three changed files are in perfect sync: the workflow adds the native ARM64 runner, the helper matrix gains the matching spec, and the tests are updated to reflect the new expected behaviour. The change is purely additive, all existing matrix entries are untouched, and the generic downstream scripts (stage, publish, GitHub release) consume PLATFORM_PACKAGE_MATRIX dynamically so they automatically gain ARM64 support without modification.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release-prebuilt-npm.yml Adds hunkdiff-linux-arm64 build job using the ubuntu-24.04-arm GitHub-hosted runner; integrates cleanly with the existing matrix pattern and all downstream jobs.
scripts/prebuilt-package-helpers.ts Adds hunkdiff-linux-arm64 entry to PLATFORM_PACKAGE_MATRIX in alphabetical order; no logic changes required since the existing lookup functions already handle it generically.
test/prebuilt-package-helpers.test.ts Updates two tests: changes linux/arm64 from an expected throw to a successful resolution, and adds hunkdiff-linux-arm64 to the stable sort expectation; both changes are correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    T[Tag push / workflow_dispatch] --> M[build-binaries matrix]

    M --> J1[hunkdiff-darwin-arm64\nmacos-14]
    M --> J2[hunkdiff-darwin-x64\nmacos-15-intel]
    M --> J3[hunkdiff-linux-x64\nubuntu-latest]
    M --> J4[hunkdiff-linux-arm64\nubuntu-24.04-arm\n🆕 NEW]

    J1 & J2 & J3 & J4 --> SR[stage-release\nubuntu-latest]
    SR --> PUB[publish\nubuntu-latest]
    PUB --> GHR[create-github-release]
Loading

Reviews (1): Last reviewed commit: "build: add linux arm64 prebuilt package ..." | Re-trigger Greptile

@benvinegar
Copy link
Copy Markdown
Member

@aliou Thanks - yep just an oversight.

@benvinegar benvinegar merged commit 7bb5dc9 into modem-dev:main Mar 24, 2026
3 checks passed
@aliou aliou deleted the feat/linux-arm64-prebuilt-packages branch March 24, 2026 17:58
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.

2 participants