mirror of
https://github.com/denoland/deno.git
synced 2024-12-31 11:34:15 -05:00
chore(ci): fix ci to restore the cache (#18215)
This commit is contained in:
parent
fb021d7cef
commit
1c285ac214
2 changed files with 6 additions and 5 deletions
9
.github/workflows/ci.generate.ts
vendored
9
.github/workflows/ci.generate.ts
vendored
|
@ -10,6 +10,9 @@ const Runners = {
|
||||||
macos: "macos-12",
|
macos: "macos-12",
|
||||||
windows: `\${{ ${windowsRunnerCondition} }}`,
|
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 =
|
const installPkgsCommand =
|
||||||
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
|
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
|
||||||
|
@ -442,8 +445,7 @@ const ci = {
|
||||||
"!./target/*/*.tar.gz",
|
"!./target/*/*.tar.gz",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
key: "never_saved",
|
key: "never_saved",
|
||||||
"restore-keys":
|
"restore-keys": cacheKeyPrefix,
|
||||||
"19-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -857,8 +859,7 @@ const ci = {
|
||||||
"!./target/*/*.zip",
|
"!./target/*/*.zip",
|
||||||
"!./target/*/*.tar.gz",
|
"!./target/*/*.tar.gz",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
key:
|
key: cacheKeyPrefix + "${{ github.sha }}",
|
||||||
"18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -274,7 +274,7 @@ jobs:
|
||||||
!./target/*/*.zip
|
!./target/*/*.zip
|
||||||
!./target/*/*.tar.gz
|
!./target/*/*.tar.gz
|
||||||
key: never_saved
|
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
|
- 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/'')))'
|
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
|
uses: ./.github/mtime_cache
|
||||||
|
|
Loading…
Reference in a new issue