-
Notifications
You must be signed in to change notification settings - Fork 86
48 lines (40 loc) · 1.24 KB
/
workflow.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
on: [push, pull_request]
name: build
jobs:
build: # TODO: split by OS
strategy:
fail-fast: false
max-parallel: 3
matrix:
ghc: ['8.8', '8.10', '9.0', '9.2']
os: [ubuntu-latest, macOS-latest, windows-latest]
# exclude:
# # GHC 8.8+ only works with cabal v3+
# - ghc: 8.8.4
# cabal: 2.4.1.0
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ghc-${{ matrix.ghc }}
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- if: matrix.os == 'ubuntu-latest'
run: sudo apt update; sudo apt install -y libsdl2-dev
- if: matrix.os == 'macOS-latest'
run: brew install pkg-config SDL2
- run: cabal build --only-dependencies -j2
- if: matrix.os != 'windows-latest'
run: cabal build
- if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
path-type: inherit
update: true
install: >-
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-SDL2
- if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: cabal build