Skip to content

Fix linux-arm64 artifact shipping x64 Go binary - #21

Open
jackgopack4 wants to merge 1 commit into
FlagBrew:masterfrom
jackgopack4:fix/linux-arm64-goarch
Open

Fix linux-arm64 artifact shipping x64 Go binary#21
jackgopack4 wants to merge 1 commit into
FlagBrew:masterfrom
jackgopack4:fix/linux-arm64-goarch

Conversation

@jackgopack4

@jackgopack4 jackgopack4 commented May 9, 2026

Copy link
Copy Markdown

Summary

  • Adds goarch field to both Linux matrix entries (amd64 for linux-x64, arm64 for linux-arm64)
  • Passes GOARCH: ${{ matrix.goarch }} and CGO_ENABLED: 0 as env vars on the Linux Go build step
  • CGO_ENABLED: 0 is required for cross-compilation on the x64 runner; consistent with existing static build flags (-tags=netgo,osusergo,static_build, -ldflags '-d -s -w -extldflags=-static')

Fixes #12

Verification

All 4 matrix jobs passed on fork CI:

Binary arch confirmed with file:

  • linux-arm64/local-gpssELF 64-bit LSB executable, ARM aarch64
  • linux64/local-gpssELF 64-bit LSB executable, x86-64

Test plan

  • All 4 matrix jobs pass in fork CI
  • linux-arm64 artifact binary shows ELF 64-bit LSB executable, ARM aarch64 via file
  • linux64 artifact binary still shows x86-64 via file

Add goarch field to Linux matrix entries and pass GOARCH/CGO_ENABLED
env vars to the Linux Go build step so cross-compilation produces the
correct ARM64 binary on the x64 ubuntu-latest runner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BernardoGiordano

Copy link
Copy Markdown

Thanks. Added to my review todo-list.

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.

linux-arm64 CI artifact contains an x64 Go binary

2 participants