add cache to rustfmt
@@ -14,6 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
+ - name: Cache cargo registry
+ uses: actions/cache@v1
+ with:
+ path: ~/.cargo/registry
+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
+ - name: Cache cargo index
+ uses: actions/cache@v1
+ with:
+ path: ~/.cargo/git
+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
+ - name: Cache cargo build
+ uses: actions/cache@v1
+ with:
+ path: target
+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
- name: rustfmt
uses: docker://rust:latest
with:
