serai/.github/actions/cached-rust/action.yml
2022-07-23 07:10:25 -04:00

33 lines
741 B
YAML

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:
- name: Rust cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: ${{ runner.os }}-${{ runner.arch }}-rust-${{ inputs.toolchain }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
profile: minimal
default: true
components: ${{ inputs.components }}