ci/haskell.yml: cache dependencies

This commit is contained in:
Fumiaki Kinoshita
2020-04-02 16:31:01 +09:00
parent 89a7d6d6fd
commit 8635fcacca
+14 -1
View File
@@ -17,6 +17,19 @@ jobs:
with: with:
ghc-version: '8.8.2' ghc-version: '8.8.2'
cabal-version: '3.0' cabal-version: '3.0'
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies - name: Install dependencies
run: | run: |
cabal update cabal update
@@ -24,4 +37,4 @@ jobs:
- name: Build - name: Build
run: cabal build --enable-tests --enable-benchmarks all run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests - name: Run tests
run: cabal test all run: cabal test all