mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-20 12:31:39 +03:00
32 lines
823 B
YAML
32 lines
823 B
YAML
|
name: 'AFFiNE Rust setup'
|
||
|
description: 'Rust setup, including cache configuration'
|
||
|
inputs:
|
||
|
target:
|
||
|
description: 'Cargo target'
|
||
|
required: true
|
||
|
toolchain:
|
||
|
description: 'Rustup toolchain'
|
||
|
required: false
|
||
|
default: 'stable'
|
||
|
|
||
|
runs:
|
||
|
using: 'composite'
|
||
|
steps:
|
||
|
- name: Setup Rust
|
||
|
uses: dtolnay/rust-toolchain@stable
|
||
|
with:
|
||
|
toolchain: ${{ inputs.toolchain }}
|
||
|
targets: ${{ inputs.target }}
|
||
|
|
||
|
- name: Cache cargo
|
||
|
uses: actions/cache@v3
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cargo/registry/index/
|
||
|
~/.cargo/registry/cache/
|
||
|
~/.cargo/git/db/
|
||
|
target/
|
||
|
key: cargo-cache-${{ runner.os }}-${{ inputs.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
|
||
|
restore-keys: |
|
||
|
cargo-cache-${{ runner.os }}-${{ inputs.toolchain }}-
|