Skip to content

Commit

Permalink
Cache libman packages in pipelines (#1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Oct 30, 2024
1 parent 577a6ec commit 80e66ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ jobs:
- name: Get cached packages
uses: actions/cache/restore@v4
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/packages.lock.json') }}
path: |
~/.nuget/packages
~/.local/share/.librarymanager/cache
key: ${{ hashFiles('**/packages.lock.json', '**/libman.json') }}

- name: Docker build & push
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ jobs:
id: cache-packages-restore
uses: actions/cache/restore@v4
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/packages.lock.json') }}
path: |
~/.nuget/packages
~/.local/share/.librarymanager/cache
key: ${{ hashFiles('**/packages.lock.json', '**/libman.json') }}

- name: Restore
run: just restore
Expand All @@ -140,7 +142,9 @@ jobs:
id: cache-packages-save
uses: actions/cache/save@v4
with:
path: ~/.nuget/packages
path: |
~/.nuget/packages
~/.local/share/.librarymanager/cache
key: ${{ steps.cache-packages-restore.outputs.cache-primary-key }}
if: steps.cache-packages-restore.outputs.cache-hit != 'true'

Expand Down

0 comments on commit 80e66ef

Please sign in to comment.