From f478dc2492cb3bb400aeafa26ac10e2987d3d9cb Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 21 May 2020 16:22:09 +0300 Subject: [PATCH] examples: Only cache non-redundant cargo state As the packed crate sources are stored under ~/.cargo/registry/cache, it's redundant to archive the unpacked sources. The sufficient local state of the git dependencies is in ~/.cargo/git/db. Cargo automatically checks out the source trees if missing. --- examples.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples.md b/examples.md index 21a5f6c..5572988 100644 --- a/examples.md +++ b/examples.md @@ -432,8 +432,9 @@ When dependencies are installed later in the workflow, we must specify the same uses: actions/cache@v2 with: path: | - ~/.cargo/registry - ~/.cargo/git + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db key: cargo-deps-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v2