From e4c130d89b80c8c214df0f48af254023f5b5de15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=E1=BA=A3i?= Date: Tue, 14 Apr 2020 23:41:42 +0700 Subject: [PATCH] ci: Set restore-keys for cache (#4745) Before this commit, when Cargo.lock changes, cache is completely rebuilt, wasting time. After this commit, if cache for a specific Cargo.lock is not found, it will fallback to find cache of another Cargo.lock. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fcbacda66..d7381d9c48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,6 +110,10 @@ jobs: target/*/gn_out key: ${{ matrix.config.os }}-${{ matrix.config.kind }}-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ matrix.config.os }}-${{ matrix.config.kind }}-${{ hashFiles('Cargo.lock') }} + ${{ matrix.config.os }}-${{ matrix.config.kind }}- + ${{ matrix.config.os }}- - name: lint.py if: matrix.config.kind == 'lint'