elm compilation is very slow on ci (circle/travis). I personally suffer from >30m build times on circle for a rather small elm project. https://github.com/elm-lang/elm-compiler/issues/1473 suggests "CPU count detection is the problem" and recommends using libsysconfcpus
to return 1 CPU in lieu of the actual detected amount. Is there another way to mitigate this long compilation time?
From https://elmlang.slack.com/archives/general/p1484149451013255
@rtfeldman:
there's a known speed problem with both Circle and Travis because they misreport their number of CPUs, but there's a workaround: add the equivalent of these to your Circle config:
- https://github.com/elm-community/elm-test/blob/master/.travis.yml#L6
- https://github.com/elm-community/elm-test/blob/master/.travis.yml#L22-L30
- https://github.com/elm-community/elm-test/blob/master/.travis.yml#L39-L41 (edited)
they basically swap out
elm-make
for a script that runselm-make
withsysconfcpus -n 2
so thatelm-make
becomes aware of the actual number of CPUs availableI talked with the Circle folks a bit about this, and the tl;dr is that they're not interested in fixing it, but it may fix itself in a future release of some upstream stuff they're using
Consider setting:
sudo: true
in your .travis.yml
. It cut a Haskell build of mine from 18 minutes down to 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With