Skip to content

Commit 45f779d

Browse files
added cabal ci
1 parent 55ce0cb commit 45f779d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/cabal.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests Cabal
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'src/**'
9+
- 'test/**'
10+
- 'quickjs/**'
11+
- 'stack.yaml'
12+
- 'quickjs-hs.cabal'
13+
pull_request:
14+
branches:
15+
- master
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
cabal: ["3.2"]
23+
ghc: ["8.6.5", "8.8.3", "8.10.1"]
24+
env:
25+
CONFIG: "--enable-tests --enable-benchmarks"
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-haskell@v1.1.2
29+
id: setup-haskell-cabal
30+
with:
31+
ghc-version: ${{ matrix.ghc }}
32+
cabal-version: ${{ matrix.cabal }}
33+
- run: cabal v2-update
34+
- run: cabal v2-freeze $CONFIG
35+
- uses: actions/cache@v2
36+
with:
37+
path: |
38+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
39+
dist-newstyle
40+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
41+
restore-keys: |
42+
${{ runner.os }}-${{ matrix.ghc }}-
43+
- run: cabal v2-build $CONFIG
44+
- run: cabal v2-test $CONFIG

0 commit comments

Comments
 (0)