CI Perf Lint

avoid-brew-update-on-hosted-macos

What it flags

Flags GitHub-hosted macOS jobs that run brew update or brew upgrade during CI.

Why it matters

GitHub-hosted macOS runner images are refreshed regularly and already include a broad Homebrew-backed toolset. Updating Homebrew during every CI run can add avoidable setup time, trigger larger dependency upgrades, and make builds less reproducible.

This is especially noisy in iOS and macOS app workflows, where the expensive path is usually Xcode, simulator, dependency resolution, or build/test work rather than refreshing Homebrew metadata.

It also applies to common build toolchains. Before upgrading packages such as Java, LLVM, GCC, CMake, Ninja, Maven, or Gradle in CI, check the selected runner image’s Included Software list to see whether a suitable version is already present.

Current heuristic

The rule requires all of the following:

The rule does not flag brew install by itself.

When to ignore it

Ignore this finding when:

Suggested verification

Sources