-
Notifications
You must be signed in to change notification settings - Fork 41
72 lines (66 loc) · 2.14 KB
/
gettested.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
61
62
63
64
65
66
67
68
69
70
71
72
name: Get-Tested
on:
- push
- pull_request
jobs:
generate-matrix:
name: 'Generate matrix from cabal'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: kleidukos/get-tested@0.1.7.1
with:
cabal-file: hgeometry/hgeometry.cabal
ubuntu-version: 'latest'
version: 0.1.7.0
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout base repo
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
- name: Configure
run: |
ARCHITECTURE=$(uname -m)
echo "ARCH=$ARCHITECTURE" >> $GITHUB_ENV
echo ${{ env.ARCH }}
cabal configure --enable-tests --enable-benchmarks
- name: Restore Cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
- name: Install dependencies
run: cabal build --dependencies-only -j2 hgeometry
- name: Build
run: cabal build all
- name: Test
run: cabal test all --test-show-details=direct
- name: cabal check
run: |
cd $GITHUB_WORKSPACE/hgeometry-combinatorial
cabal -vnormal check
cd $GITHUB_WORKSPACE/hgeometry
cabal -vnormal check
- name: haddock
run: |
cabal haddock all
- name: save Cache
uses: actions/cache/save@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-