Skip to content

Commit

Permalink
ci: reuse more previous caches (Nix & Stack)
Browse files Browse the repository at this point in the history
  • Loading branch information
develop7 authored and wolfgangwalther committed Feb 5, 2024
1 parent 310d040 commit a45058b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/actions/setup-nix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ runs:
with:
key: cache-nix-${{ runner.os }}-id-${{ inputs.cache-id }}-${{ hashFiles('nix/**/*.nix', '.github/actions/setup-nix/*') }}
restore-keys: |
cache-nix-${{ runner.os }}-common-
cache-nix-${{ runner.os }}-id-${{ inputs.cache-id }}-
cache-nix-${{ runner.os }}-id-common-
cache-nix-${{ runner.os }}-
- uses: cachix/cachix-action@v14
with:
name: postgrest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ jobs:
uses: ./.github/actions/setup-nix
with:
tools: tests withTools
# It seems like they are installing the same set of derivations, so we can assign them the same cache id.
# This would decrease the amount of caches dowloaded on merge cache step and will prevent disk space issues.
cache-id: common

- name: Run spec tests
Expand Down Expand Up @@ -202,6 +200,8 @@ jobs:
with:
path: ${{ matrix.cache }}
key: cache-stack-${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}
restore-keys: |
cache-stack-${{ runner.os }}-
- name: Install dependencies
if: ${{ matrix.deps }}
run: ${{ matrix.deps }}
Expand Down

0 comments on commit a45058b

Please sign in to comment.