-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.64 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on: [push, pull_request]
jobs:
validate:
name: GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ghc: ['8.10', '9.0', '9.2', '9.4', '9.6']
cabal: ['3.4', '3.6']
env:
CONFIG: "--enable-tests --enable-doc --builddir=build/no-full-width-positions"
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Determine Dependencies
run: |
cabal update
cabal freeze
- name: Check Cache
uses: actions/cache@v2
with:
path: |
~/.cabal/store
build/no-full-width-positions
build/full-width-positions
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-
- name: Build
run: cabal build parsley $CONFIG
- name: Test (-full-width-positions)
run: |
cabal test parsley-core $CONFIG
cabal test parsley $CONFIG
- name: Test (+full-width-positions)
run: |
rm cabal.project.freeze
cabal test parsley-core --flag full-width-positions $CONFIG --builddir=build/full-width-positions
cabal test parsley --flag full-width-positions $CONFIG --builddir=build/full-width-positions
- name: Doc
run: cabal haddock parsley $CONFIG