summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.generate.ts36
-rw-r--r--.github/workflows/ci.yml22
2 files changed, 29 insertions, 29 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts
index 2186902cc..615a48fe4 100644
--- a/.github/workflows/ci.generate.ts
+++ b/.github/workflows/ci.generate.ts
@@ -362,25 +362,8 @@ const ci = {
},
},
{
- // In main branch, always creates fresh cache
- name: "Cache build output (main)",
- uses: "actions/cache/save@v3",
- if:
- "(matrix.profile == 'release' || matrix.profile == 'fastci') && github.ref == 'refs/heads/main'",
- with: {
- path: [
- "./target",
- "!./target/*/gn_out",
- "!./target/*/*.zip",
- "!./target/*/*.tar.gz",
- ].join("\n"),
- key:
- "18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}",
- },
- },
- {
// Restore cache from the latest 'main' branch build.
- name: "Cache build output (PR)",
+ name: "Restore cache build output (PR)",
uses: "actions/cache/restore@v3",
if:
"github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",
@@ -790,6 +773,23 @@ const ci = {
draft: true,
},
},
+ {
+ // In main branch, always creates fresh cache
+ name: "Save cache build output (main)",
+ uses: "actions/cache/save@v3",
+ if:
+ "(matrix.profile == 'release' || matrix.profile == 'fastci') && github.ref == 'refs/heads/main'",
+ with: {
+ path: [
+ "./target",
+ "!./target/*/gn_out",
+ "!./target/*/*.zip",
+ "!./target/*/*.tar.gz",
+ ].join("\n"),
+ key:
+ "18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}",
+ },
+ },
]),
],
},
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fb18722d6..99763cc73 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -240,17 +240,7 @@ jobs:
~/.cargo/git/db
key: '18-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
if: steps.exit_early.outputs.EXIT_EARLY != 'true'
- - name: Cache build output (main)
- uses: actions/cache/save@v3
- if: steps.exit_early.outputs.EXIT_EARLY != 'true' && ((matrix.profile == 'release' || matrix.profile == 'fastci') && 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 }}'
- - name: Cache build output (PR)
+ - name: Restore cache build output (PR)
uses: actions/cache/restore@v3
if: 'steps.exit_early.outputs.EXIT_EARLY != ''true'' && (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/''))'
with:
@@ -532,6 +522,16 @@ jobs:
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
+ - name: Save cache build output (main)
+ uses: actions/cache/save@v3
+ if: steps.exit_early.outputs.EXIT_EARLY != 'true' && ((matrix.profile == 'release' || matrix.profile == 'fastci') && 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 }}'
publish-canary:
name: publish canary
runs-on: ubuntu-20.04