Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Library/Homebrew/github_runner_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ def generate_runners!

skip_intel_runner = !@all_supported && macos_version > NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER
skip_intel_runner &&= @dependent_matrix || @testing_formulae.none? do |testing_formula|
testing_formula.formula.bottle_specification.tag?(Utils::Bottles.tag(macos_version.to_sym))
bottle_spec = testing_formula.formula.bottle_specification
bottle_spec.tag?(Utils::Bottles.tag(macos_version.to_sym), no_older_versions: true) &&
!bottle_spec.tag?(Utils::Bottles.tag(:all), no_older_versions: true)
Comment on lines +233 to +235
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Utils::Bottles.tag(...) creates new Utils::Bottles::Tag objects; calling it twice per formula per macOS version here adds avoidable allocations. Consider precomputing the macos_tag (once per macos_version) and the all_tag (once outside the loop) and reusing them inside the none? block.

Copilot uses AI. Check for mistakes.
end
Comment on lines 231 to 236
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

This change alters runner selection for formulae with :all bottles (and for newer macOS versions beyond NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER), but there doesn’t appear to be spec coverage for this branch in Library/Homebrew/test/github_runner_matrix_spec.rb. Please add tests that (1) assert newer Intel runners are skipped for an :all bottle and (2) assert they are still included when an exact macOS tag bottle exists.

Copilot uses AI. Check for mistakes.
next if skip_intel_runner

Expand Down
Loading