ci: use official sccache github action

This commit is contained in:
Ryan Walters
2025-08-20 12:28:07 -05:00
parent fc47fd9fe9
commit 6c2c10c25d

View File

@@ -7,9 +7,6 @@ on:
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"
jobs:
build:
@@ -46,15 +43,14 @@ jobs:
components: rustfmt, clippy
targets: ${{ matrix.target }}
- name: Install sccache
uses: taiki-e/install-action@sccache
- name: Run sccache-cache only on non-release runs
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
uses: mozilla-actions/sccache-action@v0.0.9
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable("ACTIONS_RESULTS_URL", process.env.ACTIONS_RESULTS_URL || "");
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN || "");
- name: Set Rust caching env vars only on non-release runs
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- name: Rust cache
uses: Swatinem/rust-cache@v2