gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 01:37:07 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com