From d70088fa0678729470a538d72f0834cc52cd377f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 18 Mar 2020 10:48:34 -0400 Subject: [PATCH] ci: Use github action's cache (#319) We don't have many crate deps, but this is free and reduces sccache load slightly. --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3dbb8b3..f677a346 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,23 @@ jobs: python-version: "2.7.x" architecture: x64 + # Cache https://github.com/actions/cache/blob/master/examples.md#rust---cargo + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - name: Install and start sccache shell: pwsh working-directory: ${{ runner.temp }}