summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-30 17:09:07 -0400
committerGitHub <noreply@github.com>2023-05-30 17:09:07 -0400
commit047edf6a75133decf069e6118634caa76a455d7c (patch)
tree2045b050ade0f401f1a6074b1187170f5eb98d0e /.github
parent42a3f52e983e6b37ac1f69733a9347505e061e43 (diff)
ci: bump CI cache version on CLI version bump (#19318)
Automatically bump the CI cache version
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/ci.generate.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts
index c52ef011f..ef37374c4 100755
--- a/.github/workflows/ci.generate.ts
+++ b/.github/workflows/ci.generate.ts
@@ -2,6 +2,11 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import * as yaml from "https://deno.land/std@0.173.0/encoding/yaml.ts";
+// Bump this number when you want to purge the cache.
+// Note: the tools/release/01_bump_crate_versions.ts script will update this version
+// automatically via regex, so ensure that this line maintains this format.
+const cacheVersion = 32;
+
const Runners = (() => {
const ubuntuRunner = "ubuntu-22.04";
const ubuntuXlRunner = "ubuntu-22.04-xl";
@@ -15,9 +20,8 @@ const Runners = (() => {
windows: "windows-2022",
};
})();
-// bump the number at the start when you want to purge the cache
const prCacheKeyPrefix =
- "32-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-";
+ `${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;
const installPkgsCommand =
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
@@ -480,7 +484,7 @@ const ci = {
"~/.cargo/git/db",
].join("\n"),
key:
- "32-cargo-home-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}",
+ `${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ hashFiles('Cargo.lock') }}`,
},
},
{