From 03860dcb49bfecbf0340c4a4e3a8bae65b419e43 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sat, 3 Jan 2026 22:47:56 +0000 Subject: [PATCH] fix: skip linux/arm64 binary builds to avoid CGO cross-compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: - linux_amd64 runner was trying to build BOTH: - linux/amd64 (native - OK) - linux/arm64 (cross-compile with CGO - FAILS) - Error: gcc_arm64.S assembler errors when cross-compiling ARM64 on x86_64 - Workflow default platforms only include linux/amd64, not linux/arm64 Solution: - Added linux/arm64 to ignore list in both builds - Only build linux/amd64 binaries (native compilation on ubuntu-latest) - Docker images still provide linux/arm64 via multi-stage builds - Users get ARM64 support through Docker, not standalone binaries Build matrix now: - ✅ darwin/arm64 (macOS Apple Silicon) - native on macos-latest - ✅ linux/amd64 (Linux x86_64) - native on ubuntu-latest - ❌ linux/arm64 (skipped for binaries, available in Docker) This eliminates CGO cross-compilation while maintaining full platform support via Docker multi-arch images. --- .goreleaser.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d1410db..0278dfc 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -39,6 +39,8 @@ builds: ignore: - goos: darwin goarch: amd64 + - goos: linux + goarch: arm64 # Skip linux/arm64 binaries (Docker handles multi-arch) - id: migrate main: ./cmd/migrate @@ -63,6 +65,8 @@ builds: ignore: - goos: darwin goarch: amd64 + - goos: linux + goarch: arm64 # Skip linux/arm64 binaries (Docker handles multi-arch) # Archives for releases archives: