mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
chore(ci): save a cargo cache specifically for linting (#18219)
This commit is contained in:
parent
29c9a5c90d
commit
f603ebba77
2 changed files with 9 additions and 8 deletions
11
.github/workflows/ci.generate.ts
vendored
11
.github/workflows/ci.generate.ts
vendored
|
@ -11,8 +11,8 @@ const Runners = {
|
|||
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 prCacheKeyPrefix =
|
||||
"18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-";
|
||||
|
||||
const installPkgsCommand =
|
||||
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
|
||||
|
@ -445,7 +445,7 @@ const ci = {
|
|||
"!./target/*/*.tar.gz",
|
||||
].join("\n"),
|
||||
key: "never_saved",
|
||||
"restore-keys": cacheKeyPrefix,
|
||||
"restore-keys": prCacheKeyPrefix,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -844,7 +844,8 @@ const ci = {
|
|||
// In main branch, always create a fresh cache
|
||||
name: "Save cache build output (main)",
|
||||
uses: "actions/cache/save@v3",
|
||||
if: "matrix.job == 'test' && github.ref == 'refs/heads/main'",
|
||||
if:
|
||||
"(matrix.job == 'test' || matrix.job == 'lint') && github.ref == 'refs/heads/main'",
|
||||
with: {
|
||||
path: [
|
||||
"./target",
|
||||
|
@ -852,7 +853,7 @@ const ci = {
|
|||
"!./target/*/*.zip",
|
||||
"!./target/*/*.tar.gz",
|
||||
].join("\n"),
|
||||
key: cacheKeyPrefix + "${{ github.sha }}",
|
||||
key: prCacheKeyPrefix + "${{ github.sha }}",
|
||||
},
|
||||
},
|
||||
]),
|
||||
|
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -274,7 +274,7 @@ jobs:
|
|||
!./target/*/*.zip
|
||||
!./target/*/*.tar.gz
|
||||
key: never_saved
|
||||
restore-keys: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-'
|
||||
restore-keys: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
|
||||
- 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
|
||||
|
@ -547,14 +547,14 @@ jobs:
|
|||
draft: true
|
||||
- name: Save cache build output (main)
|
||||
uses: actions/cache/save@v3
|
||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''test'' && github.ref == ''refs/heads/main''))'
|
||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && ((matrix.job == ''test'' || matrix.job == ''lint'') && github.ref == ''refs/heads/main''))'
|
||||
with:
|
||||
path: |-
|
||||
./target
|
||||
!./target/*/gn_out
|
||||
!./target/*/*.zip
|
||||
!./target/*/*.tar.gz
|
||||
key: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}'
|
||||
key: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
|
||||
publish-canary:
|
||||
name: publish canary
|
||||
runs-on: ubuntu-22.04
|
||||
|
|
Loading…
Reference in a new issue