-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (51 loc) · 1.67 KB
/
ubuntuCI.yml
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
58
59
60
name: ubuntu-ci
on: [push, pull_request]
jobs:
build:
name: Build on ubuntu-18.04:ghc-${{ matrix.ghc }}:cabal-${{ matrix.cabal }}
runs-on: ubuntu-18.04
strategy:
matrix:
ghc: ['8.6', '8.8', '8.10']
cabal: ['2.4', '3.2']
exclude:
# GHC 8.8+ only works with cabal v3+
- ghc: 8.8
cabal: 2.4
- ghc: 8.10
cabal: 2.4
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions/cache@v2
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-
- name: Setup Haskell
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal v2-update
- name: sdist
run: |
mkdir -p $HOME/sdist
cabal v2-sdist --output-dir $HOME/sdist
- name: unpack
run: |
rm -rf $GITHUB_WORKSPACE/*
find $HOME/sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE -xzvf {} --strip 1 \;
- name: build
run: cabal v2-build --upgrade-dependencies --enable-tests --enable-benchmarks
- if: "matrix.cabal < '3'"
run: cabal v2-test
- if: "matrix.cabal >= '3'"
run: cabal v2-test --test-show-details=direct
- run: cabal check
- run: cabal v2-haddock