Skip to content

Commit

Permalink
refactor: simplify caching setup, add a restore key to actually cache…
Browse files Browse the repository at this point in the history
… besides 1 run
  • Loading branch information
PastaPastaPasta committed Aug 1, 2024
1 parent cc5347f commit ed8a879
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/guix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,21 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Restore Guix cache and depends
- name: Cache Guix and depends
id: guix-cache-restore
uses: actions/cache/restore@v3
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/dash/depends/built
${{ github.workspace }}/dash/depends/sources
${{ github.workspace }}/dash/depends/work
key: ${{ runner.os }}-guix
key: ${{ runner.os }}-guix-${{ github.event.pull_request.head.sha }}
restore-keys: |
${{ runner.os }}-guix-${{ github.event.pull_request.head.sha }}
${{ runner.os }}-guix-
- name: Create .cache folder if missing
if: steps.guix-cache-restore.outputs.cache-hit != 'true'
Expand All @@ -80,17 +85,6 @@ jobs:
exit 1
fi
- name: Save Guix cache and depends
id: guix-cache-save
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/dash/depends/built
${{ github.workspace }}/dash/depends/sources
${{ github.workspace }}/dash/depends/work
key: ${{ steps.guix-cache-restore.outputs.cache-primary-key }}

- name: Compute SHA256 checksums
run: |
./dash/contrib/containers/guix/scripts/guix-check ${{ github.workspace }}/dash

0 comments on commit ed8a879

Please sign in to comment.