mirror of
https://github.com/Smithay/smithay.git
synced 2024-09-28 03:21:14 +02:00
ci: use cargo-cache to maintain the registry cache small
This commit is contained in:
parent
c69ca56ff8
commit
e943c4f246
1 changed files with 21 additions and 0 deletions
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
|
@ -58,6 +58,27 @@ jobs:
|
|||
~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-registry-${{ steps.date.outputs.date }}
|
||||
restore-keys: ${{ runner.os }}-cargo-registry-
|
||||
- name: Get cargo-cache latest version
|
||||
id: cargocacheversion
|
||||
run: echo "::set-output name=version::$(cargo search 'cargo-cache' --limit 1 | head -n 1 | cut -d ' ' -f 3 | cut -d '"' -f 2)"
|
||||
- name: Cargo binaries cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/cargo-cache
|
||||
~/.cargo/.crates.toml
|
||||
~/.cargo/.crates2.json
|
||||
key: ${{ runner.os }}-cargo-binaries-${{ steps.cargocacheversion.outputs.version }}
|
||||
- name: Install cargo-cache
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cargo-cache --version ${{ steps.cargocacheversion.outputs.version }}
|
||||
- name: Clean cargo cache of old items
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: cache
|
||||
args: clean-unref
|
||||
- name: Get rustc version for caching
|
||||
id: rustcversion
|
||||
run: echo "::set-output name=version::$(rustc --version | cut -d ' ' -f 2)"
|
||||
|
|
Loading…
Reference in a new issue