Upgrade CI to use sccache v0.4.0 for caching (#934)

Remove `mozilla-actions/sccache-action@v0.0.2` and instead use `taiki-ie/install-action` to install `sccache`, since we already use `taiki-e/install-action` for installing crates.

This PR also refactor just-setup.yml and use pass `GITHUB_TOKEN` to `taiki-e/install-action` which uses `cargo-binstall` for installing `cargo-auditable` and `sccache`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-03-26 17:28:35 +11:00 committed by GitHub
parent a27d5aebf6
commit a403c99d3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 10 deletions

View file

@ -52,6 +52,10 @@ jobs:
- uses: ./.github/actions/just-setup
with:
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
env:
# just-setup use binstall to install sccache,
# which works better when we provide it with GITHUB_TOKEN.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: just ci-install-deps
- run: just test
@ -78,6 +82,10 @@ jobs:
- uses: ./.github/actions/just-setup
with:
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
env:
# just-setup use binstall to install sccache,
# which works better when we provide it with GITHUB_TOKEN.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: just ci-install-deps
- run: just check
@ -92,6 +100,10 @@ jobs:
- uses: ./.github/actions/just-setup
with:
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
env:
# just-setup use binstall to install sccache,
# which works better when we provide it with GITHUB_TOKEN.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: just check
@ -105,6 +117,10 @@ jobs:
- uses: ./.github/actions/just-setup
with:
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
env:
# just-setup use binstall to install sccache,
# which works better when we provide it with GITHUB_TOKEN.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: just check

View file

@ -45,6 +45,10 @@ jobs:
with:
cache-suffix: release-${{ matrix.t }}
tools: cargo-auditable
env:
# just-setup use binstall to install sccache and cargo-auditable,
# which works better when we provide it with GITHUB_TOKEN.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: just toolchain rust-src
- run: just ci-install-deps