created | daily | tags | origin | similar to | opposite of | leads to | ||
---|---|---|---|---|---|---|---|---|
2025-04-01 |
[[2025-04-01, Wk 14 - Tue]] |
|
|
sccache
is a modular build cache for compiled languages. It supports different
programming languages and different storage backends. This makes it a
particularly flexible tool.
brew install sccache
mkdir -p "$HOME/.cargo/"
touch "$HOME/.cargo/config.toml"
Then add this to $HOME/.cargo/config.toml
:
[build]
rustc-wrapper = "/path/to/sccache"
Caches can fail or get stale. To force a cache reset run:
SCCACHE_RECACHE=1 cargo build
- name: Run sccache-cache only on non-release runs
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
uses: mozilla-actions/[email protected]
- name: Set Rust caching env vars only on non-release runs
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV