Very very slow osx builds


I stopped the build after 12 minutes as it was still installing packages and spending a lot of time on packages I have not even requested.

Using the default image, I am forced to set update: true, but this takes forever too.

What is the best way to install packages on the osx image without spending all the credits?

Why not use the latest image then? The default image has an EOL version of MacOS, it’s going to give you trouble.

You can cache Homebrew metadata, but it’s nontrivial.

If you look at the travis file, I am using

osx_image: xcode12.5

This is better than the default image, but after 12 minutes it is still doing some “home brew system maintenance”.

I can improve the code in that SO answer into a turn-key solution if someone commissions me…

Consider adding HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 environment variable, like I mentioned here. Also add HOMEBREW_NO_AUTO_UPDATE=1 to be safe. Both are documented.