Run homebrew update when building images
What does this MR do?
- Runs
brew update
as part of the pipeline. Some of our snapshots shipped with brew checkouts that were intentionally years older. We actually only need the old checkout to install the pinned dependencies, and we can ship images with an up-to-date checkout, so users can start installing dependencies right away. Otherwise runningbrew update
from our old checkout took more than 10min of build time. - Doing it is a bit tricky with specs, because
brew test
only works if the latest version of a formula is installed. We thus can't update brew in either thetoolchain
,xcode
andrunner
roles because each need to run thetoolchain
specs (the latter two because they can start with a toolchain snapshot). - I'm thus forced to add a new pipeline stage after
runner
. To compensate, I merged thebase
stage intotoolchain
- Homebrew only supports 3 versions of macOS. So for High Sierra and Mojave, I update them to the latest supported version
- Do not set
HOMEBREW_NO_AUTO_UPDATE=1
on OSes after Mojave. This is something our users can set themselves if they want faster builds, but that can create issues for people expectingbrew install ...
to just work as it does on their machine. Still enable it on legacy releases - Update gitlab-runner to 15.0
Edited by Adrien Kohlbecker