elm 编译在 ci (circle/travis) 上非常慢。我个人在一个相当小的 elm 项目中遭受了超过 30m 的循环构建时间。 https://github.com/elm-lang/elm-compiler/issues/1473建议“CPU 计数检测是问题所在”,并建议使用 libsysconfcpus 返回 1 个 CPU,而不是实际检测到的数量。还有其他方法可以减轻这么长的编译时间吗?
最佳答案
来自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
关于cpu - 如何减少 Circle CI 或 Travis CI 上的 Elm 编译时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41603460/