Skip to content

Commit

Permalink
Fix caching in actions (#6)
Browse files Browse the repository at this point in the history
* Inline cache paths in actions

* Bust cache on workflow changes

* Fix path to workflows

* Fix another path
  • Loading branch information
motiz88 authored Jul 23, 2023
1 parent fda4082 commit 66436fb
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ on:

jobs:
build:
env:
WORKSPACE_CACHE_PATHS: |
.
!src
!!src/out
!!src/.cipd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -19,10 +13,14 @@ jobs:
- name: Restore gclient workspace cache
uses: actions/cache/restore@v3
with:
path: ${{ env.WORKSPACE_CACHE_PATHS }}
key: ${{ runner.os }}-gclient-workspace-${{ hashFiles('src/DEPS') }}
path: |
.
!src
!!src/out
!!src/.cipd
key: ${{ runner.os }}-${{ hashFiles('src/.github/workflows/*') }}-gclient-workspace-${{ hashFiles('src/DEPS') }}
restore-keys: |
${{ runner.os }}-gclient-workspace-
${{ runner.os }}-${{ hashFiles('src/.github/workflows/*') }}-gclient-workspace-
- name: setup-depot-tools
uses: newkdev/setup-depot-tools@v1.0.1
- name: Sync gclient workspace
Expand All @@ -41,6 +39,10 @@ jobs:
- name: Save gclient workspace cache
uses: actions/cache/save@v3
with:
path: ${{ env.WORKSPACE_CACHE_PATHS }}
key: ${{ runner.os }}-gclient-workspace-${{ hashFiles('src/DEPS') }}
path: |
.
!src
!!src/out
!!src/.cipd
key: ${{ runner.os }}-${{ hashFiles('src/.github/workflows/*') }}-gclient-workspace-${{ hashFiles('src/DEPS') }}

0 comments on commit 66436fb

Please sign in to comment.