Issue: brew Formula installation fails due to being outdated

I didn’t check when it actually started, but one of our projects started failing on macOS due to missing gfortran: https://travis-ci.org/cp2k/dbcsr/jobs/547314948

The culprit seems to be brew not installing any dependencies since it’s outdated:

[...]
Installing Homebrew Packages
8.16s$ rvm $brew_ruby do brew bundle --verbose --global
/usr/local/bin/brew tap homebrew/bundle
==> Tapping homebrew/bundle
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
remote: Enumerating objects: 81, done.
remote: Counting objects: 100% (81/81), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 81 (delta 7), reused 24 (delta 4), pack-reused 0
Unpacking objects: 100% (81/81), done.
Tapped 0 formulae (172 files, 244KB)
Error: Your Homebrew is outdated. Please run `brew update`.
Error: Kernel.exit

The workaround is to add update: True to homebrew/package (along with caching $HOME/Library/Caches/Homebrew to speed it up a bit), but still takes a lot longer than before.

Rest of the discussion here

Tittle says XCode 8.3 but it probably affects other versions as well.

@karliss thanks. Yes, seems to be the same issue.