Skip to content

Commit

Permalink
ci: Update caching key for Pants
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jun 6, 2022
1 parent dcdf9c4 commit cc1e259
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/cache@v3
- name: Apply cache for Pants
uses: actions/cache@v3
id: cache
with:
# pants-specific cache
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
key: ${{ runner.os }}-${{ hashFiles('pants*.toml', '**/*.lock') }}-
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -57,15 +58,16 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/cache@v3
- name: Apply cache for Pants
uses: actions/cache@v3
id: cache
with:
# pants-specific cache
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
key: ${{ runner.os }}-${{ hashFiles('pants*.toml', '**/*.lock') }}-
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -103,15 +105,16 @@ jobs:
with:
fetch-depth: 2
submodules: true
- uses: actions/cache@v3
- name: Apply cache for Pants
uses: actions/cache@v3
id: cache
with:
# pants-specific cache
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
key: ${{ runner.os }}-${{ hashFiles('pants*.toml', '**/*.lock') }}-
- name: Create LFS file hash list
run: git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
Expand Down Expand Up @@ -155,15 +158,16 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/cache@v3
- name: Apply cache for Pants
uses: actions/cache@v3
id: cache
with:
# pants-specific cache
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
key: ${{ runner.os }}-${{ hashFiles('pants*.toml', '**/*.lock') }}-
- name: Create LFS file hash list
run: git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
Expand Down

0 comments on commit cc1e259

Please sign in to comment.