mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-25 17:21:51 -07:00
ci: Cache pantry (hackage metadata) separately
This further reduces our usage of cache storage by caching the metadata
only once per repo. Now the metadata cache is ~250MB and the individual
caches with built dependencies are ~10M each.
Related: cfe99998fc
Related: https://github.com/xmonad/X11/pull/75
This commit is contained in:
16
.github/workflows/stack.yml
vendored
16
.github/workflows/stack.yml
vendored
@@ -60,14 +60,22 @@ jobs:
|
||||
sudo apt install -y ghc-${{ matrix.ghc }}
|
||||
echo /opt/ghc/${{ matrix.ghc }}/bin >> $GITHUB_PATH
|
||||
|
||||
- name: Cache Haskell package metadata
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.stack/pantry
|
||||
key: stack-pantry-${{ runner.os }}
|
||||
|
||||
- name: Cache Haskell dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.stack
|
||||
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.yaml) }}-${{ hashFiles('*.cabal') }}
|
||||
path: |
|
||||
~/.stack/*
|
||||
!~/.stack/pantry
|
||||
key: stack-${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.yaml) }}-${{ hashFiles('*.cabal') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.yaml) }}-
|
||||
${{ runner.os }}-${{ matrix.resolver }}-
|
||||
stack-${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.yaml) }}-
|
||||
stack-${{ runner.os }}-${{ matrix.resolver }}-
|
||||
|
||||
- name: Build and test
|
||||
run: |
|
||||
|
Reference in New Issue
Block a user