Description
Actual behaviour
OSX builds error with Timeout (20 minutes) reached. Terminating "brew install -v ffmpeg --without-x264 --without-xvid --without-gpl"
Sample failure: https://travis-ci.org/native-api/opencv-python/jobs/447134752
Diagnostics
I'm playing around with diagnostics in https://github.com/native-api/opencv-python/tree/remove_ffmpeg_options
-
It looks like you don't get build output due to after_failure output gets truncated unless sleep is used travis-ci/travis-ci#6018 . Worked that around by ditching
travis_wait
and appending1>&2
in https://github.com/native-api/opencv-python/commit/88cb879befe249f821ac0af487e178d77fbf3e8c -
The log https://api.travis-ci.org/v3/job/449531767/log.txt shows that
ffmpeg
compilation just takes too long, and not only it is built, but a few dependencies as well, includingcmake
.The reason, I guess, is that either a prebuilt bottle for
ffmpeg
for Travis environment no longer exists, or because the switches you pass tobrew install ffmpeg
no longer exist.
The best fix would probably be to cache everything: https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
I'm currently trying to cache everything brew
possible -- retain download cache, make bottles from built packages for later use. Not sure if it's safe to cache installed packages (/usr/local/Cellar
and usr/local/opt
, maybe /usr/local
in its entirety), will try it only if the former is not sufficient.
Unfortunately, if we must build everything from source at some point, we'll have to do builds in a few stages: make some envvar like CACHE_BOOTSTRAP
and run only a part of the work, saving results into the cache; them run without the variable, using the cache to do the rest.