mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 05:28:42 +00:00
Use sccache for build cache and disable incremental mode in CI (#914)
Fixed #911 sccache cannot cache build artifacts if incremental mode is enabled. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c04b15dbc8
commit
42bffef98c
1 changed files with 11 additions and 5 deletions
16
.github/actions/just-setup/action.yml
vendored
16
.github/actions/just-setup/action.yml
vendored
|
@ -54,9 +54,15 @@ runs:
|
|||
shell: bash
|
||||
|
||||
- if: inputs.buildcache
|
||||
name: Configure build cache
|
||||
uses: actions/cache@v3
|
||||
name: Configure sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.2
|
||||
with:
|
||||
path: |
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-build-${{ hashFiles('rustc-version') }}-${{ hashFiles('**/Cargo.lock') }}-${{ inputs.cache-suffix }}
|
||||
version: "v0.4.0-pre.10"
|
||||
|
||||
- if: inputs.buildcache
|
||||
name: Export env for sccache to work
|
||||
shell: bash
|
||||
run: |
|
||||
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
|
||||
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
|
||||
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
|
||||
|
|
Loading…
Add table
Reference in a new issue