Repository navigation
The image is published for linux/amd64 and linux/arm64 - #48
Conversation
Nothing in the tree is arch-specific: the compile is tsc and no runtime dependency carries a native binding. So the install and build stages run on the builder's own platform and only the runtime stage, which copies, is per target; the push is one index per tag, with nothing emulated. CI builds and checks the image for each platform, and refuses a lockfile whose runtime dependencies are bound to a platform, since the cross-build would ship the wrong binary. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Lore is reviewing this PR — a894228e-5565-4f7f-a01a-cde61ab48e14. Submit a review that requests changes to have Lore push a fix for it. Comment |
There was a problem hiding this comment.
Lore review — Approved
Correct multi-arch implementation; two minor nits on action pinning consistency and redundant CI step.
Must fix (0) · Consider (0) · Nits (2)
Reviewed by claude-sonnet-4-6
Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.
Posted by floor, visit 8b34ae85-2f35-40b0-83b0-31e547a36ed4.
| - uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 | ||
| - uses: docker/setup-buildx-action@v3 | ||
| - name: Build the image | ||
| uses: docker/build-push-action@v7 |
There was a problem hiding this comment.
nit: Pin docker/build-push-action to a SHA to match setup-qemu-action on the same job
| uses: docker/build-push-action@v7 | |
| uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 |
| # The Dockerfile builds node_modules on the builder's platform and ships it to every | ||
| # target, which is only right while no runtime dependency carries a native binding. | ||
| - name: No runtime dependency is platform-specific | ||
| run: node scripts/check-lockfile-portable.mjs |
There was a problem hiding this comment.
nit: check-lockfile-portable.mjs runs once per matrix job but is platform-independent; move it to a separate job both matrix jobs depend on, or at minimum note the duplication
| run: node scripts/check-lockfile-portable.mjs | |
| # in the matrix job, remove this step and add: | |
| # needs: [lockfile-check] | |
| # Then add a separate job: | |
| # lockfile-check: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v5 | |
| # - name: No runtime dependency is platform-specific | |
| # run: node scripts/check-lockfile-portable.mjs |
The floor image was amd64 only, because no workflow named a platform. It is now one index per tag of
linux/amd64andlinux/arm64, resolved per node at pull time.Nothing is emulated. The compile is
tscand every package in the lockfile with acpuorosfield is a dev dependency, so the runtimenode_modulesis the same on both architectures. The Dockerfile pins themanifests,buildandprod-depsstages to$BUILDPLATFORMand only theruntimestage, which just copies, is per target. The build takes the same time as before and needs no second runner, unlike the subsystem's native-runner matrix, which exists there because a D compile under QEMU is painfully slow.CI's docker job now runs once per platform and runs
scripts/check-image.shagainst the arm64 image under QEMU. A newscripts/check-lockfile-portable.mjsfails CI if a runtime dependency ever grows a native binding, since the cross-build would then ship an x64 binary into the arm64 image. The chart needs no change; its README says what is published.Verified locally: the arm64 image builds, reports
arm64, passes the image check, and the two-platform build's log shows every install and compile stage onlinux/amd64with only theruntimestage onlinux/arm64.🤖 Generated with Claude Code