2022-07-23 11:05:31 +00:00
|
|
|
name: cached-rust
|
|
|
|
description: Installs Rust, caching ~/.cargo and ./target
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
toolchain:
|
|
|
|
description: "Toolchain to install"
|
|
|
|
required: false
|
|
|
|
default: stable
|
|
|
|
|
|
|
|
components:
|
|
|
|
description: "Components to install"
|
|
|
|
required: false
|
|
|
|
default:
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2022-07-29 14:36:09 +00:00
|
|
|
- name: Rust Cache
|
2022-07-23 11:05:31 +00:00
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
2022-07-23 11:10:25 +00:00
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
2022-07-23 11:05:31 +00:00
|
|
|
./target
|
2022-09-29 15:06:03 +00:00
|
|
|
key: ${{ runner.os }}-${{ runner.arch }}-rust-${{ steps.install-rust.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
|
2022-09-29 14:34:20 +00:00
|
|
|
restore-keys: ${{ runner.os }}-${{ runner.arch }}-rust-${{ steps.install-rust.outputs.rustc_hash }}-
|
2022-07-23 11:05:31 +00:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ inputs.toolchain }}
|
|
|
|
profile: minimal
|
|
|
|
default: true
|
|
|
|
components: ${{ inputs.components }}
|