2024-01-07 10:45:40 -05:00
|
|
|
name: Cache Rust dependencies
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-22.04-node
|
|
|
|
steps:
|
2024-01-07 10:46:14 -05:00
|
|
|
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
|
2024-01-07 10:45:40 -05:00
|
|
|
|
|
|
|
- name: Cache cargo registry
|
2024-01-07 10:46:14 -05:00
|
|
|
uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
|
2024-01-07 10:45:40 -05:00
|
|
|
with:
|
|
|
|
path: ~/.cargo/registry
|
|
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Cache cargo index
|
2024-01-07 10:46:14 -05:00
|
|
|
uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
|
2024-01-07 10:45:40 -05:00
|
|
|
with:
|
|
|
|
path: ~/.cargo/git
|
|
|
|
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Cache cargo build
|
2024-01-07 10:46:14 -05:00
|
|
|
uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
|
2024-01-07 10:45:40 -05:00
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cargo build -r --verbose
|