Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am trying to test a package build on travis-ci.org, but am coming up against a timeout with pip install scipy:

Installing collected packages: scipy
  Running setup.py install for scipy
    Running command /home/travis/virtualenv/python2.6.9/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Fn2gmJ/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hWDx9L-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python2.6.9/include/site/python2.6


No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.

The build has been terminated

(extract from a recent build log).

How can I build scipy >= 0.11 on Travis without a timeout?

like image 219
Duncan Macleod Avatar asked Feb 26 '15 15:02

Duncan Macleod


People also ask

How do you speed up Travis CI?

To speed up a test suite, you can break it up into several parts using Travis CI's build matrix feature. Say you want to split up your unit tests and your integration tests into two different build jobs. They'll run in parallel and fully utilize the available build capacity for your account.

Which of the following file is used to configure the Travis CI?

Configuration. Travis CI is configured by adding a file named . travis. yml , which is a YAML format text file, to the root directory of the repository.


2 Answers

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.

like image 194
Philipp Eisenhauer Avatar answered Sep 20 '22 04:09

Philipp Eisenhauer


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.

like image 35
fernandopso Avatar answered Sep 19 '22 04:09

fernandopso