name: Cache Rust dependencies on: push: branches: - master jobs: build: runs-on: ubuntu-22.04-node steps: - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 - name: Cache cargo registry uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 with: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - name: Build run: cargo build -r --verbose