Skip to content

ci: build and publish macOS release binaries#947

Merged
praetoriansentry merged 1 commit into
mainfrom
add-macos-release-builds
Jul 3, 2026
Merged

ci: build and publish macOS release binaries#947
praetoriansentry merged 1 commit into
mainfrom
add-macos-release-builds

Conversation

@krlosMata

Copy link
Copy Markdown
Contributor

Summary

Adds macOS binaries to the release, matching the existing Linux ones.

  • New cross-darwin Makefile target builds a darwin binary for the host arch with the same version ldflags as the Linux builds (CGO enabled; static-linking flags dropped since macOS doesn't support them).
  • New macos-release workflow job builds natively on a matrix of macos-13 (Intel → darwin/amd64) and macos-14 (Apple Silicon → darwin/arm64), then tars and uploads to the same release.

Why native per-arch instead of cross-compiling from the Linux runner: the transitive vectorized-poseidon-gold dependency is CGO-only with no pure-Go fallback, so darwin can't be cross-compiled from Linux and each arch is built on its own runner.

Note: binaries are unsigned/un-notarized, same as the Linux ones.

Made with Cursor

Add a cross-darwin Makefile target and a macos-release workflow job that
builds darwin binaries natively on macOS runners. A CGO-only transitive
dependency (vectorized-poseidon-gold) prevents cross-compiling darwin from
the linux runner, so each architecture is built on its own runner: macos-13
(Intel/amd64) and macos-14 (Apple Silicon/arm64).

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@praetoriansentry praetoriansentry merged commit 78020ef into main Jul 3, 2026
16 of 17 checks passed
@praetoriansentry praetoriansentry deleted the add-macos-release-builds branch July 3, 2026 13:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds native macOS (darwin) release binaries to the existing tag-driven release pipeline, aligning distribution artifacts across Linux and macOS while accommodating a CGO-only dependency that prevents Linux-hosted cross-compilation.

Changes:

  • Add a cross-darwin Makefile target to build a darwin binary for the host macOS architecture with version ldflags.
  • Extend the release workflow with a macos-release matrix job (macos-13 amd64, macos-14 arm64) to build, tar, and upload macOS artifacts to the GitHub release.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Makefile Adds cross-darwin target to build darwin release binaries natively on macOS with CGO enabled.
.github/workflows/release.yml Adds a macOS release job that builds per-arch on macOS runners and uploads darwin tarballs to the release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +71 to +82
- name: Perform darwin build
run: make cross-darwin

- name: Compress binary
run: |
cd out
arch=$(go env GOARCH)
tar czf polycli_${GITHUB_REF#refs/tags/}_darwin_${arch}.tar.gz polycli_${GITHUB_REF#refs/tags/}_darwin_${arch}

- name: Get git tag
run: echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_ENV

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.

3 participants