然后尝试了一下#sccache 折腾了好几个小时还是没跑起来,要么是可以在docker里外接别的存储服务,要么可以是在github action runner宿主机里直接用github自带的cache系统,但是要在github action中的docker build里用sccache就各种出问题。
Dear #rust folks, it looks like #sccache is failing to handle or rebuild a crate which uses a build.rs to generate sources into OUT_DIR.
For some reason, after getting built the first time, the cache then fails to include the generated code in OUT_DIR as well, resulting in subsequent builds failing.
Has anyone dealt with this before?
I want to use #Lychee (a link check written in #Rust) on #CircleCI. Doing just `cargo install lychee` took 5min, so I searched the internet and got advised I should use #sccache to cache dependencies or what.
Now it takes 13min, because `cargo install sccache` takes 7min and `cargo install lychee` takes 5.5min 🤦♂️
Anyone has an idea how to install a Rust thing to a machine in a reasonable time or how to cache the binary or something?
No więc walczę z upierdliwą paczką Rusta w #Gentoo, której testy się sypią, cholera wie dlaczego. Częścią walki jest konieczność budowania w kółko od zera tej samej paczki. Zainstalowałem więc #SCCache, żeby to trochę przyspieszyć. Ogólnie, nie jest to szczególnie użyteczne narzędzie, bo działa tylko wtedy, kiedy za każdym razem ścieżki do plików są identyczne, ale w tym szczególnym przypadku powinno pomóc. I na początku pomagało.
A potem zaczęło się dziać coś dziwnego. SCCache uruchamia sobie jakiś proces w tle. Kiedy ninja kończy już z jednym wywołaniem `cargo build`, to ten proces sobie wisi w tle i blokuje ninję przed budowaniem kolejnego celu. I za każdym razem muszę ręcznie ten proces ubijać. Tyle z przyspieszenia.
So I'm fighting this damn #RustLang package whose test suite fails in #Gentoo for no apparent reason. My fight involves rebuilding the damn thing repeatedly, so I've installed #SCCache to speed this up. While it's not very useful in general, since it requires exact path match, it certainly sounded like something that would speed up repeatedly building the same damn thing. And it did, at first.
Then something weird started happening. SCCache keeps spawning a background process. Whenever ninja is done doing a specific `cargo build` invocation, this process remains hanging and prevents ninja from proceeding. I need to SIGTERM it every single time it happens. So much for speedup.
A new mentorship program for #sccache is on the way!
This time, I'll be mentoring on how to implement a storage check bypass in sccache. It will be an easy #RustLang task for newcomers. Interested?
Apply by commenting on the issue. I'll get in touch with you
We're using sccache v0.7.6, we have a lot of builds running in parallel and each run invokes sccache which in turn tries to do a sccache RW check by reading and writing .sccache_check dummy file. W...

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various...
I haven't seen announced here in the fediverse yet, but version 0.6.0 of #sccache was just released:
https://github.com/mozilla/sccache/releases/tag/v0.6.0
sccache is a compilation-caching tool that can massively speed up your builds (and save power!) both locally and in CI. It supports both C/C++ and Rust and is very easy to use. If you're compiling a lot of stuff everyday you should definitely give it a try.
@xuanwo 对于你的《为什么你该试试 Sccache?》一文,我有了一个疑惑:#sccache 是以文件为单位的,那会不会遇到 #GithubActionCacheService 的 rate limit 呢?
Magic #Nix Cache 的文档里提到,超过 #GHA Cache limit 时会遇到429错误。你的博文里也提到,旧的 #rust cache 粒度更粗,不用担心 #Github action cache limit.
ref:
https://xuanwo.io/reports/2023-04/
https://github.com/DeterminateSystems/magic-nix-cache-action/