-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.38 KB
/
haskell.yml
File metadata and controls
57 lines (48 loc) · 1.38 KB
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: Haskell CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc: ['8.10.7']
os: [ubuntu-latest, macOS-latest]
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
steps:
- if: matrix.os == 'macOS-latest'
run: |
brew install llvm@12
brew link llvm@12
- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v6
id: postgres
with:
database: testdb
- uses: actions/checkout@v4
- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'
- name: Configure stack
run: |
stack config set system-ghc --global true
stack config set install-ghc --global false
- name: Cache
uses: actions/cache@v4
env:
cache-name: cache-stack
with:
path: ~/.stack
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/stack.yaml') }}-${{ hashFiles('**/stack.yaml.lock') }}-${{ hashFiles('**/package.yaml') }}
- name: Build dependencies
run: stack build --only-dependencies
- name: Build
run: stack build