-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building with stack on Travis CI - dependency compilation fails sometimes #859
Comments
The problem is at the end with the error message:
A negative exit code means failure due to a signal, and signal 9 is OOM (out of memory). The problem is that you're running out of memory on Travis. It's nondeterministic since it depends on which libraries are being built at the same time. One option is to build the biggest memory users (SHA and mwc-random in this case it seems) in a pre-build step, with concurrent builds turned off:
I would recommend using a cached build. In order to do so, you'll need some newer Travis tricks. There's a Wiki page devoted to this: https://github.com/commercialhaskell/stack/wiki/Travis. As it happens, I just finished writing up one such Travis file an hour ago: https://github.com/commercialhaskell/all-cabal-hashes-tool/blob/master/.travis.yml. |
Thanks much! Trying this out right now and will let you know what happens. |
Pre-building the two biggest memory users solved the problem. Caching also worked and speeds up our builds tremendously. Thank you very much again for your super quick and very helpful answer! |
We are using stack to build the https://github.com/tamarin-prover/tamarin-prover cryptographic protocol verification tool. As part of our tests we run a build on Travis CI. Builds work perfect locally, but on Travis only work some of the time. Other times, the compilation fails on some dependency, usually the mwc-random package.
For a working build's log see:
https://travis-ci.org/tamarin-prover/tamarin-prover/builds/77341662
For a failing build's log see:
https://travis-ci.org/tamarin-prover/tamarin-prover/builds/77350525
It seems that maybe the order in which the packages build does matter, but that is just speculation.
Adding further detail, we are installing stack on Travis using
which works fine. Note that we are using the lts-2.22 resolver so we use GHC 7.8, as we do not support GHC 7.10 (with lts-3.0) due to other issues.
We also tried using the "cache" feature on Travis, hoping it would compile the dependencies once and for all, but apparently that does not work in combination with building via stack. At least adding
cache:
directories:
to the .travis.yml file had no effect, everything gets compiled from scratch again.
If there is any further information required from me that could help, please let me know.
The text was updated successfully, but these errors were encountered: