17

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?

fernandopso
  • 633
  • 6
  • 11
Duncan Macleod
  • 1,045
  • 11
  • 21
  • relevant Travis issue for pre-installed `scipy` support: https://github.com/travis-ci/travis-ci/issues/2650 – 0 _ Jan 03 '16 at 14:29

3 Answers3

19

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.

Limon Monte
  • 52,539
  • 45
  • 182
  • 213
12

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.

fernandopso
  • 633
  • 6
  • 11
0

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).

Community
  • 1
  • 1
IsaacS
  • 3,551
  • 6
  • 39
  • 61