Skip to content

Commit a05c588

Browse files
authored
Switch to github workflow (#237)
1 parent 8be6c46 commit a05c588

File tree

3 files changed

+52
-37
lines changed

3 files changed

+52
-37
lines changed

.github/workflows/workflow.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on: [push, pull_request]
2+
3+
name: build
4+
5+
jobs:
6+
build: # TODO: split by OS
7+
strategy:
8+
fail-fast: false
9+
max-parallel: 3
10+
matrix:
11+
ghc: ['8.8', '8.10', '9.0', '9.2']
12+
os: [ubuntu-latest, macOS-latest, windows-latest]
13+
# exclude:
14+
# # GHC 8.8+ only works with cabal v3+
15+
# - ghc: 8.8.4
16+
# cabal: 2.4.1.0
17+
runs-on: ${{ matrix.os }}
18+
name: ${{ matrix.os }} ghc-${{ matrix.ghc }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- uses: haskell/actions/setup@v1
23+
with:
24+
ghc-version: ${{ matrix.ghc }}
25+
cabal-version: ${{ matrix.cabal }}
26+
27+
- if: matrix.os == 'ubuntu-latest'
28+
run: sudo apt install -y libsdl2-dev
29+
30+
- if: matrix.os == 'macOS-latest'
31+
run: brew install pkg-config SDL2
32+
33+
- run: cabal build --only-dependencies -j2
34+
35+
- if: matrix.os != 'windows-latest'
36+
run: cabal build
37+
38+
- if: matrix.os == 'windows-latest'
39+
uses: msys2/setup-msys2@v2
40+
with:
41+
path-type: inherit
42+
update: true
43+
install: >-
44+
mingw-w64-x86_64-pkg-config
45+
mingw-w64-x86_64-SDL2
46+
- if: matrix.os == 'windows-latest'
47+
shell: msys2 {0}
48+
run: cabal build

.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

cabal.project

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages: .
2+
3+
package sdl2
4+
ghc-options: -Wall -Wcompat

0 commit comments

Comments
 (0)