Skip to content

Run homebrew update when building images

Adrien Kohlbecker requested to merge ak/fix-bre into main

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 running brew 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 the toolchain, xcode and runner roles because each need to run the toolchain 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 the base stage into toolchain
  • 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 expecting brew 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

Merge request reports