Skip to content

Add macOS ARM64/x86_64 brew-ready release bundle and signing flow#319

Merged
hoffmang9 merged 23 commits into
mainfrom
feat/macos-brew-bundle-portability
Feb 24, 2026
Merged

Add macOS ARM64/x86_64 brew-ready release bundle and signing flow#319
hoffmang9 merged 23 commits into
mainfrom
feat/macos-brew-bundle-portability

Conversation

@hoffmang9
Copy link
Copy Markdown
Member

@hoffmang9 hoffmang9 commented Feb 21, 2026

Summary

  • add a macOS ARM64 release bundle in vdf-client-hw.yml with deterministic bin/ payload and private FTDI dylibs in libexec/chiavdf/
  • switch HW binary macOS runtime lookup to @loader_path/../libexec/chiavdf, enforce install-name/rpath portability checks, and publish zip + sha256 + signing status assets to releases
  • remove mandatory ad-hoc signing from get-libft4222.sh, keep xattr cleanup, and retain CHIAVDF_ADHOC_SIGN_FTDI=1 as an explicit local troubleshooting escape hatch
  • add Chia-style signing/notarization controls: secrets probe, conditional cert import, release-time sign+notarize when secrets exist, and unsigned fallback artifact when they do not
  • document bundle layout and signing behavior in assets/macos-release-bundle.md

Test plan

  • bash -n scripts/get-libft4222.sh
  • workflow YAML parse check for .github/workflows/vdf-client-hw.yml
  • local build: make optimized=1 -f src/Makefile.vdf-client vdf_client vdf_bench emu_hw_test emu_hw_vdf_client hw_test hw_vdf_client
  • local runtime smoke (non-ASIC): src/emu_hw_test 1 2000, src/emu_hw_vdf_client --list, src/vdf_bench square 10000
  • src/vdf_client --help emits usage and exits non-zero as expected without required args

Made with Cursor


Note

Medium Risk
Touches CI release automation for macOS packaging, signing, and notarization; misconfiguration or secret availability could break release builds or produce incorrectly signed assets.

Overview
Adds a macOS Homebrew-ready release bundle to build-packages.yml, assembling a deterministic zip layout (binaries + private FTDI dylibs), rewriting rpaths to @loader_path/../libexec/chiavdf, and enforcing portability checks via otool.

Introduces conditional Apple code-signing and optional notarization: secrets are probed, certificates imported only when present, release runs require signing/notarization secrets, and non-release runs can emit an -unsigned bundle; the workflow now uploads macOS zips/sha256/signing status/codesign summaries to artifacts and releases (with --clobber), and adds a workflow_dispatch input to request notarization.

Updates scripts/get-libft4222.sh to stop mandatory ad-hoc signing on macOS (now optional via CHIAVDF_ADHOC_SIGN_FTDI=1) while also clearing com.apple.quarantine, and adds assets/macos-release-bundle.md documenting the bundle layout and signing behavior.

Written by Cursor Bugbot for commit 8e2e06e. This will update automatically on new commits. Configure here.

Package Homebrew-friendly macOS artifacts with libexec/chiavdf dylibs, switch hardware binary rpaths to @loader_path-relative lookup, and move ad-hoc signing to an optional local escape hatch while adding release-time signing/notarization upload paths.
Run secret detection, cert import, bundle assembly, and codesign on all optimized macOS ARM64 CI jobs; keep notarization release-only and continue publishing the macOS bundle artifact for non-release runs with run-id versioning.
Comment thread src/Makefile.vdf-client Outdated
Comment thread .github/workflows/vdf-client-hw.yml Outdated
Replace ripgrep-based checks in the macOS ARM64 bundle assembly step with portable grep equivalents so the workflow runs on macOS runners that do not have rg installed by default.
Comment thread .github/workflows/vdf-client-hw.yml Outdated
Comment thread .github/workflows/vdf-client-hw.yml Outdated
Comment thread .github/workflows/build-packages.yml
hoffmang9 and others added 3 commits February 21, 2026 22:36
Add a STATIC_GMP make toggle and wire macos-13-arm64 workflow builds to pass static GMP archives so release/local CI binaries avoid dynamic Homebrew GMP runtime dependencies.
This restores dynamic GMP handling and leaves a TODO to make GMP a formal prerequisite once the Homebrew cask/tap wiring is in place.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve workflow conflicts by keeping the macOS ARM64 brew-bundle steps while adopting upstream multi-arch Ubuntu artifact and packaging updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread .github/workflows/build-packages.yml
Comment thread .github/workflows/build-packages.yml
hoffmang9 and others added 2 commits February 23, 2026 16:13
Avoid failing/noisy install_name_tool delete_rpath calls by changing rpaths only when present or missing, keeping bundle assembly logs clean while preserving portable loader paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread .github/workflows/build-packages.yml
Ensure the macOS ARM64 bundle signs both executables and bundled FTDI dylibs, verifies all shipped Mach-O artifacts carry valid Developer ID signatures, and publishes a codesign -dv summary artifact for release auditing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread .github/workflows/build-packages.yml Outdated
hoffmang9 and others added 3 commits February 23, 2026 16:39
Avoid passing unmatched macOS codesign-summary globs to gh release upload so unsigned release builds can still publish artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Allow macOS bundle signature verification to pass when codesign output omits Authority lines but strict verification succeeds and TeamIdentifier is present.

Co-authored-by: Cursor <cursoragent@cursor.com>
Run the macOS bundle/sign/upload flow for both Intel and ARM64 so release and CI outputs include both brew-tap distributables.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hoffmang9 hoffmang9 changed the title Add macOS ARM64 brew-ready release bundle and signing flow Add macOS ARM64/x86_64 brew-ready release bundle and signing flow Feb 24, 2026
hoffmang9 and others added 2 commits February 23, 2026 17:11
Enforce release-time checks for Apple signing and notarization secrets so macOS artifacts fail fast unless they are signed and notarized, while keeping non-release runs permissive.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a workflow_dispatch input to explicitly request macOS notarization and route the existing checks/gates through that request path so manual runs can exercise notarization behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread .github/workflows/build-packages.yml Outdated
hoffmang9 and others added 3 commits February 23, 2026 17:50
Publish Homebrew-friendly macOS asset aliases and include per-arch URLs, hashes, and gmp runtime dependency data in the glue trigger payload.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use flat top-level JSON fields for formula inputs so downstream workflow_dispatch wiring can consume values without nested parsing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pass only release_version in the glue trigger payload since the downstream homebrew workflow derives URLs and hashes from that input.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread .github/workflows/build-packages.yml Outdated
hoffmang9 and others added 2 commits February 23, 2026 18:57
…load

Require release builds to have signing and notarization secrets up front so tagged releases fail fast if notarization cannot run, and keep non-release unsigned fallback behavior unchanged. Also send only release_version in the Homebrew trigger metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
Revert the glue trigger json_data to use github.event.release.tag_name directly for parity with main. Thanks @cmmarslender for guiding me to the right answer.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread .github/workflows/build-packages.yml
@hoffmang9 hoffmang9 merged commit fcf5e9a into main Feb 24, 2026
101 of 104 checks passed
@hoffmang9 hoffmang9 deleted the feat/macos-brew-bundle-portability branch February 24, 2026 03:50
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