Disable homebrew cleanup on macOS CI
Homebrew’s brew cleanup
saves disk space by deleting old versions of packages.
From time to time, CI macOS images get out of date with Homebrew, and auto-cleanup is triggered unintentionally upon brew install
during a CI run.
There is no benefit to this on CI.
Disable Homebrew auto cleanup
by setting environment variable HOMEBREW_NO_INSTALL_CLEANUP=1
.
On GitHub Actions, this is accomplished near the top of the particular .github/workflows/*.yml file:
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1