Add workaround for Travis OSX taking hours to schedule at peak times
The other Travis builds are all done in ~10 mins (Appveyor in ~20) and then the Mac build sits and waits hours to get a VM.
Xref https://github.com/travis-ci/travis-ci/issues/6841
This comes and goes: fixed for a while, but then back to being really slow.
*** TODO auto-cancel older not-yet-scheduled jobs
https://docs.travis-ci.com/user/customizing-the-build/ Auto Cancellation Setting is in the Settings tab of each repository
Looks like it's already on.
*** TODO disable Mac for PR's and only run for master?
We could disable the Mac build for PR's and rely on the master run to test it, though then people have to go fix separately or revert: may still be worth it since commit process is painful waiting hours.
There's the TRAVIS_PULL_REQUEST env var but that doesn't help: we need a setting at the Travis level.
The only thing I've found that may work is this: https://docs.travis-ci.com/user/conditional-builds-stages-jobs/#Conditional-Builds if: type = push
We could set allow_failures
for osx build and fast_finish: true
but then we're clogging up the Travis OSX resources for all the builds on PR's yet not really using the results for any but the last one (and these days contributors seem to not bother testing locally and end up pushing a dozen commits fixing little style issues -- though if they're pushed quickly enough the auto-cancel from above should help).
Really what we want is the suggestion here to mark successful once everything else is done if mac has not yet started: https://github.com/travis-ci/travis-ci/issues/6841#issuecomment-280637937