Skip to content

Full cross-platform support: OS-matrix CI, goreleaser releases, multi-arch Docker - #9

Merged
emoss08 merged 1 commit into
mainfrom
claude/custom-cdc-review-zth3ax
Aug 11, 2026
Merged

emoss08 merged 1 commit into
mainfrom
claude/custom-cdc-review-zth3ax

Conversation

@emoss08

@emoss08 emoss08 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Makes GTC's cross-platform story a tested, released guarantee. The codebase is pure Go with CGO_ENABLED=0, so it already compiles for every major platform — verified locally for all six targets (linux, darwin, windows × amd64, arm64). This PR adds the enforcement and distribution around that:

CI (every PR)

  • The test suite now runs on Linux, Windows, and macOS runners.
  • A dedicated job cross-compiles all six OS/arch targets, so a platform regression can't merge.
  • Format/vet/-race checks stay on the Linux job (where the race detector and shell syntax are reliable).

Releases (push a v* tag)

  • .goreleaser.yaml (validated with goreleaser check) + a tag-triggered workflow publish GitHub release archives for every OS/arch — .zip on Windows, .tar.gz elsewhere — bundling README, LICENSE, and the example sink config, with checksums and a generated changelog. Released binary is named gtc.
  • A multi-arch Docker image (linux/amd64 + arm64) is pushed to ghcr.io/emoss08/gtc with semver and latest tags, authenticated with the built-in GITHUB_TOKEN — no secrets to configure.

Binary & docs

  • The Dockerfile cross-compiles via BUILDPLATFORM/TARGETOS/TARGETARCH, so docker buildx works for any target.
  • New --version flag and a startup version log line, stamped at release time via -ldflags -X main.version (verified locally).
  • README gains an install section (releases / Docker / source) plus a Windows PowerShell quick start; CLAUDE.md records the cross-platform contract for future changes.

Type of change

  • Bug fix
  • New feature / sink
  • Documentation
  • Refactor / chore

Checklist

  • go test ./... passes (including -race)
  • gofmt / go vet are clean
  • All six GOOS/GOARCH targets build locally with CGO_ENABLED=0; goreleaser check passes; --version prints the stamped version
  • README.md / CLAUDE.md updated
  • Delivery semantics untouched — build/release tooling only, plus the version flag

Notes for the reviewer

  • The Windows/macOS matrix jobs run go test ./... without -race to keep them fast and toolchain-independent; the Linux lint job still runs the full race-enabled suite.
  • First release: after merging, git tag v0.1.0 && git push origin v0.1.0 produces the binaries and the ghcr image. The ghcr package will be private by default on first push — flip it to public in the package settings if you want anonymous docker pull.

🤖 Generated with Claude Code

https://claude.ai/code/session_019dEj24Ta2o9QxzW9ZrSPtb


Generated by Claude Code

…rch Docker

GTC is pure Go with CGO disabled, so it already compiles everywhere;
this makes that a tested, released guarantee:

- CI now runs the test suite on Linux, Windows, and macOS runners and
  cross-compiles all six release targets (linux/darwin/windows on
  amd64/arm64) on every PR, so a platform regression can't land.
  Format/vet/race checks stay on the Linux job.
- goreleaser config + a tag-triggered release workflow: pushing a v* tag
  publishes archives for every OS/arch (zip on Windows, tar.gz
  elsewhere) with checksums and a generated changelog, binaries named
  gtc and stamped with the version.
- The Dockerfile is now multi-arch aware (BUILDPLATFORM cross-compile
  via TARGETOS/TARGETARCH); the release workflow pushes a
  linux/amd64+arm64 image to ghcr.io/emoss08/gtc with semver and latest
  tags.
- The binary reports its version: --version flag, startup log line,
  injected via -ldflags -X main.version.
- README gains install options (releases, Docker, source) and a Windows
  PowerShell quick start; CLAUDE.md documents the cross-platform
  contract.

Verified locally: all six GOOS/GOARCH targets build with CGO_ENABLED=0,
goreleaser config passes `goreleaser check`, full test suite green, and
--version prints the stamped version.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dEj24Ta2o9QxzW9ZrSPtb
@emoss08
emoss08 merged commit 865579e into main Aug 11, 2026
6 checks passed
@emoss08
emoss08 deleted the claude/custom-cdc-review-zth3ax branch August 11, 2026 01:17
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