Skip to content

Commit dcf5201

Browse files
authored
Merge pull request #398 from haskell/jneira/add-stack-ci
Add build stack step
2 parents ff3d09c + b3af323 commit dcf5201

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/haskell.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ghc-version: ${{ matrix.ghc }}
2020
cabal-version: '3.6'
2121

22-
- name: Cache
22+
- name: Cabal cache
2323
uses: actions/cache@v1
2424
env:
2525
cache-name: cache-cabal
@@ -28,12 +28,24 @@ jobs:
2828
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
2929
restore-keys: |
3030
${{ runner.os }}-build-${{ env.cache-name }}-
31-
${{ runner.os }}-build-
32-
${{ runner.os }}-
31+
32+
- name: Stack cache
33+
uses: actions/cache@v1
34+
env:
35+
cache-name: cache-stack
36+
with:
37+
path: ~/.stack
38+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/stack.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-build-${{ env.cache-name }}-
3341
3442
- name: Cabal update
3543
run: cabal update
36-
- name: Build
44+
- name: Build using cabal
3745
run: cabal build all
3846
- name: Test
3947
run: cabal test all
48+
# stack build uses stack.yaml which actually uses ghc-8.10.7
49+
- if: matrix.ghc == '8.10.7' && runner.os == 'Linux'
50+
name: Build using stack
51+
run: stack build

0 commit comments

Comments
 (0)