ci: restore macOS Keychain backend via CGO-enabled darwin builds [INT-448]#100
Conversation
…-448] Split .goreleaser.yml into two builds: nrq-darwin (CGO_ENABLED=1, macos-15 runner, xcrun clang overrides per arch) and nrq-unix-win (CGO_ENABLED=0, linux+windows). nfpms pins ids:[nrq-unix-win] so deb/rpm never pull a darwin binary. Move the goreleaser release job to macos-15 and restructure it to verify-before-publish: goreleaser check → snapshot build → pre-publish gate (Security.framework + functional arm64 keychain/auto assertion) → publish. Fix all GNU sed -i invocations in the Homebrew tap step to perl -pi -e (BSD sed on macOS requires a backup-suffix; perl works on both). Add non-empty SHA assertions before writing tap files. Closes #99
|
No findings. The PR matches the INT-446 template and nrq-specific needs: The in-job Homebrew update is correctly after the real Verification note: write-heavy snapshot/build checks could not be run in this read-only sandbox; the static review plus |
Summary
.goreleaser.ymlintonrq-darwin(CGO_ENABLED=1,xcrun clangarch overrides, both amd64+arm64) andnrq-unix-win(CGO_ENABLED=0, linux+windows). Pinsnfpms.ids: [nrq-unix-win]so deb/rpm never pull a darwin binary (uses v2idsfilter, not deprecatedbuilds).goreleaserrelease job tomacos-15(pinned, notmacos-latest) so cgo+darwin builds work without cross-compilation from Linux.goreleaser check→goreleaser release --snapshot --clean→ pre-publish gate →goreleaser release --clean --release-notes.dist/artifacts.json(no filename globs); assertsfile/lipo -archsfor both arches; assertsSecurity.frameworklinked on amd64 (cross-arch necessary signal); runs a functional arm64 check with isolated HOME/XDG and seeded config — assertsbackend==keychain,backend_source==auto,credential_ref==newrelic-cli/default.sed -iinvocations in the Homebrew tap step →perl -pi -e(BSDsed -ion macOS requires a backup-suffix argument;perlworks identically on both).set -euo pipefailand non-empty SHA assertions before writing tap files, preventing silent empty-checksum cask commits.Closes #99
Test plan
goreleaser checkexits 0 on the changed config (verified locally)CGO_ENABLED=1 GOOS=darwin GOARCH=arm64/amd64builds succeed locally;fileshows correct Mach-O arches;otool -L amd64listsSecurity.frameworkbackend=keychain source=auto ref=newrelic-cli/default