From 89a7d6d6fdf9d7efc48eef51de099dbc3f651328 Mon Sep 17 00:00:00 2001 From: Fumiaki Kinoshita Date: Thu, 13 Feb 2020 16:24:06 +0900 Subject: [PATCH 1/2] ci/haskell.yml: properly build dependencies, tests and benchmarks --- ci/haskell.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/haskell.yml b/ci/haskell.yml index 3952e56..fc6d8b3 100644 --- a/ci/haskell.yml +++ b/ci/haskell.yml @@ -20,10 +20,8 @@ jobs: - name: Install dependencies run: | cabal update - cabal install --only-dependencies --enable-tests + cabal build --only-dependencies --enable-tests --enable-benchmarks - name: Build - run: | - cabal configure --enable-tests - cabal build + run: cabal build --enable-tests --enable-benchmarks all - name: Run tests - run: cabal test + run: cabal test all \ No newline at end of file From 8635fcacca0bc15706d4bf992b30b95fb8aa0062 Mon Sep 17 00:00:00 2001 From: Fumiaki Kinoshita Date: Wed, 26 Feb 2020 20:23:25 +0900 Subject: [PATCH 2/2] 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