-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (58 loc) · 1.66 KB
/
ci.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
name: CI
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('**/stack.yaml.lock') }}-${{ hashFiles('**/package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-${{ hashFiles('**/stack.yaml.lock') }}-
${{ runner.os }}-stack-
- uses: haskell/actions/setup@v2
with:
ghc-version: "9.4.6"
enable-stack: true
stack-version: "latest"
- name: Build
run: stack build
- name: Run tests
run: stack test
- name: Run with --version
run: stack run -- --version
- name: Build statically linked
run: stack build --flag git-brunch:static
cabal:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
name: Cache cabal
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-cabal-
- uses: haskell/actions/setup@v2
with:
ghc-version: "9.4.6"
enable-stack: false
cabal-version: "latest"
- run: cabal update
- name: Build
run: cabal build
- name: Run tests
run: cabal test