From 8635fcacca0bc15706d4bf992b30b95fb8aa0062 Mon Sep 17 00:00:00 2001 From: Fumiaki Kinoshita Date: Wed, 26 Feb 2020 20:23:25 +0900 Subject: [PATCH] ci/haskell.yml: cache dependencies --- ci/haskell.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ci/haskell.yml b/ci/haskell.yml index fc6d8b3..4bc2d16 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -17,6 +17,19 @@ jobs: with: ghc-version: '8.8.2' 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 run: | cabal update @@ -24,4 +37,4 @@ jobs: - name: Build run: cabal build --enable-tests --enable-benchmarks all - name: Run tests - run: cabal test all \ No newline at end of file + run: cabal test all