From 6c2c10c25d5f54b057bd7265cc72c758d91ba413 Mon Sep 17 00:00:00 2001 From: Ryan Walters Date: Wed, 20 Aug 2025 12:28:07 -0500 Subject: [PATCH] ci: use official sccache github action --- .github/workflows/ci.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06e617f..c024e0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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