summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-03-15 18:03:07 -0400
committerGitHub <noreply@github.com>2023-03-15 22:03:07 +0000
commit1c285ac214ff843a04e76fd6e9669bd8e809748c (patch)
treef889056d79e9bfb8ab02278f3721a9e5f34606ab
parentfb021d7ceff3f8b1d7cdb0c2bdd75ea07c0428d2 (diff)
chore(ci): fix ci to restore the cache (#18215)
-rwxr-xr-x.github/workflows/ci.generate.ts9
-rw-r--r--.github/workflows/ci.yml2
2 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts
index 1d68439d6..35367adb8 100755
--- a/.github/workflows/ci.generate.ts
+++ b/.github/workflows/ci.generate.ts
@@ -10,6 +10,9 @@ const Runners = {
macos: "macos-12",
windows: `\${{ ${windowsRunnerCondition} }}`,
};
+// bump the number at the start when you want to purge the cache
+const cacheKeyPrefix =
+ "18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-";
const installPkgsCommand =
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
@@ -442,8 +445,7 @@ const ci = {
"!./target/*/*.tar.gz",
].join("\n"),
key: "never_saved",
- "restore-keys":
- "19-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-",
+ "restore-keys": cacheKeyPrefix,
},
},
{
@@ -857,8 +859,7 @@ const ci = {
"!./target/*/*.zip",
"!./target/*/*.tar.gz",
].join("\n"),
- key:
- "18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}",
+ key: cacheKeyPrefix + "${{ github.sha }}",
},
},
]),
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 61a2ac6b6..fbffd8ba7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -274,7 +274,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
- restore-keys: '19-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-'
+ restore-keys: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-'
- name: Apply and update mtime cache
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (!startsWith(github.ref, ''refs/tags/'')))'
uses: ./.github/mtime_cache