How can I install something on Travis CI without a timeout?

ぃ、小莉子 提交于 2019-11-27 09:03:29
Philipp Eisenhauer

The solution is straightforward. Just prefix the installation command with travis_wait. More details are available at https://docs.travis-ci.com/user/common-build-problems.

The default timeout per command on Travis is 10 minutes and when you use the function travis_wait only, the timeout is 20 minutes. If your build need wait more than 20 minutes, you can pass a number of minutes to function travis_wait, exemple:

$ travis_wait 30 pip install scipy

This is a function undocumented in Travis, but it is suggested by Hiro Asari from Travis on github issue.

IsaacS

You could also use an approach from here, if using the commands like travis_wait provided by Travis CI isn't an option.

In my case I wanted to keep Travis running while defining steps in separate shell scripts where I had no idea how to use Travis-provided commands. The approach above worked out pretty well (if interested see the pull request).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!