cpu - 如何减少 Circle CI 或 Travis CI 上的 Elm 编译时间?

标签 cpu travis-ci elm circleci

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:

they basically swap out elm-make for a script that runs elm-make with sysconfcpus -n 2 so that elm-make becomes aware of the actual number of CPUs available

I 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/

相关文章:

java - 获取特定进程的CPU使用率

linux - 是否可以在 BIOS 中设置一个物理 cpu(假设我有多个)被忽略,这样除非我为它设置任务,否则不会安排任何事情?

github - Travis CI 可以在同一个 repo 的不同分支中使用加密文件吗?

java - 写入文件的 JUnit 测试在本地通过但在 Travis CI 上失败

android - Travis 解决 Android 许可证问题

elm - 使用具有不同程序功能的多个 elm 包

cpu - OpenCL 适合什么类型的代码域?

emulation - Z80 DAA 标志受到影响

haskell - 什么是 Elm 相当于 Haskell 的表演?

elm - 有没有办法将两个参数通过管道传递给 Elm 中的函数?