Repository navigation
ci: set up Homebrew with a script instead of an action - #1288
Merged
Merged
Conversation
The organization Actions policy does not allow Homebrew/actions/setup-homebrew, so the integration and benchmark workflows stopped at startup. scripts/setup-macos-homebrew.sh uses an installed brew or installs Homebrew from a pinned, checksum-verified installer, then exports its shellenv to later steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Deployment failed for project d-inference with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
Contributor
Threat model review — advisoryReviewed head Review not completed for this head. Previous findings are superseded, not confirmed resolved. Reviewers: anthropic/claude-opus-5.5: incomplete (review unavailable); openai/gpt-6-astra: incomplete (review unavailable) Models: anthropic/claude-opus-5.5, openai/gpt-6-astra. Findings require human validation; this review never requests changes or blocks merging. |
Gajesh2007
approved these changes
Oct 1, 2026
10 tasks done
8 of 16 tasks
5 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Integration Tests and E2E Benchmarks workflows do not start. Since #1268 (6af40cc) they use
Homebrew/actions/setup-homebrew. Homebrew is not a verified creator, and the action is not on the organization allow list, so GitHub rejects the workflow file. Every run on master and on each PR ends instartup_failure. Examples: runs 36775820140 (Integration Tests) and 36775821321 (E2E Benchmarks).ci.ymldoes not use the action and still runs.This PR removes the action. A new script,
scripts/setup-macos-homebrew.sh, finds or installs Homebrew. It followsscripts/install-macos-github-cli.sh:set -euo pipefail, required-variable checks, a pinned download, and a SHA-256 check before it runs anything.Linked issue
None. Follow-up to #1268 and #1266.
What changed
scripts/setup-macos-homebrew.sh(new):brewif it is onPATH, at/opt/homebrew/bin/brewor at/usr/local/bin/brew.brew, it downloadsinstall.shfrom Homebrew/install commitf6632bc2e9afc0ba20cdee1f2d28bcd7672b3245and checks the SHA-256 that the script records. Then it runs the installer withNONINTERACTIVE=1andHOMEBREW_NO_ANALYTICS=1. The install path runs only on macOS.brew shellenv. It writesHOMEBREW_PREFIX,HOMEBREW_CELLARandHOMEBREW_REPOSITORYto$GITHUB_ENV, and<prefix>/binand<prefix>/sbinto$GITHUB_PATH..github/workflows/integration.ymland.github/workflows/benchmarks.yml: the "Set up Homebrew" step now runs the script.brew install postgresql@16and all other steps are unchanged. The PR adds no action.scripts/test-setup-macos-homebrew.sh(new): an offline test of the "already installed" path. It puts a fakebrewand a failingcurlin a temporary directory. It checks the$GITHUB_ENVand$GITHUB_PATHlines, that no download happens, and that a missingGITHUB_ENVfails. The "Release Integrity" job runs it next totest-prod-env-refresh.sh.docs/developer/build.md,docs/developer/test.md: replace the text from ci: initialize Homebrew for Blacksmith macOS E2E jobs #1268 about the action, and list the new test.CHANGELOG.md: one entry under "Unreleased — CI and contributor workflow".Diagrams
Before
After
flowchart LR classDef good fill:#e3f6e8,stroke:#2e8b57,color:#000 classDef step fill:#e8f0fe,stroke:#3366cc,color:#000 P["push or PR"]:::step --> W["integration.yml / benchmarks.yml"]:::step W --> S["run: scripts/setup-macos-homebrew.sh"]:::good S --> Q{"brew found?"}:::step Q -- yes --> E["write brew shellenv to<br/>GITHUB_ENV / GITHUB_PATH"]:::good Q -- no --> I["download pinned install.sh<br/>check SHA-256, run it"]:::step --> E E --> B["brew install postgresql@16<br/>E2E jobs run"]:::goodBlue: unchanged steps. Red: the failing path. Green: the new path.
Test plan
shellcheck scripts/setup-macos-homebrew.sh scripts/test-setup-macos-homebrew.sh: cleanactionlint .github/workflows/integration.yml .github/workflows/benchmarks.yml .github/workflows/ci.yml: clean./scripts/test-setup-macos-homebrew.sh: passes. When I disabled thePATHlookup in the script, the test failed.install.shat the pinned commit.python3 scripts/test-provider-ci-workflow.py: passesmake docs-impact-check BASE=origin/master,make docs-check(withlibs/mlx-swift-lmchecked out shallow): passstartup_failure. E2E Benchmarks must also start.Components touched
Protocol / interface changes
Documentation impact
docs/developer/build.md,docs/developer/test.md)Notes for reviewers
sudoon the runner, the same as the official installer. If a runner already hasbrew, the script downloads nothing.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.