@@ -15,11 +15,19 @@ install:
15 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
15 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
16 - travis_retry cabal update
16 - travis_retry cabal update
17 - cabal sandbox init
17 - cabal sandbox init
18+ # Run with limited concurrency
19+ # Travis container infrastructure seems to expose all host CPUs (16?), thus
20+ # cabal and ghc tries to use them all. Which is bad idea on a shared box.
21+ # See also: https://ghc.haskell.org/trac/ghc/ticket/9221
23+ # We probably want to be running with larger heap sizes when there are lots
24+ # of cores, to counteract the synchronization overhead of stop-the-world GC
25+ # across many cores. e.g. +RTS -A32m at least.
18− - cabal install --only-dependencies --enable-tests
26+ - cabal install --only-dependencies --enable-tests -j2 --ghc-options='+RTS -A32m -RTS'
19− - cabal install hpc-coveralls
27+ - cabal install hpc-coveralls -j2
21 - ./travis/configure.sh
29 - ./travis/configure.sh
22− - cabal build
30+ - cabal build -j2 --ghc-options='+RTS -A32m -RTS'
23 - cabal test
31 - cabal test
24 - ./travis/test-install.sh
32 - ./travis/test-install.sh
25after_script:
33after_script: