Starting late last night (or earlier this morning), our macOS build using the XCode 8.3 image started failing on the Homebrew install package step with the message:
Error: Your Homebrew is outdated. Please run brew update.
Error: Kernel.exit
Adding update: true for updating Homebrew does resolve the error, but it significantly increases the build time by 26 minutes (6 minutes for running brew update, and installing packages takes an extra 20 minutes, probably updating a bunch of other installed packages).
Do you need the Xcode 8.3 image, or do you just want a 10.12 image? If the latter, the Xcode 9.2 image will work better for you.
Homebrew tends to force you (and CI) to be on the bleeding edge, and the use of older images (which are unlikely to be updated) could prove problematic.
I’ve started getting the same error using the XCode 9.4 image (the current default macOS image, which runs macOS 10.13) on a different project, so I don’t think changing to a different image will be sufficient.
If set, do not check for broken dependents after installing, upgrading or reinstalling formulae.
… which seems reasonable to use in Travis CI because a lot of packages are preinstalled for user convenience, but the typical project will only need some of them (or, even better, will explicitly list its top-level dependencies in its .travis.yml or .Brewfile).