Skip to content

Commit ca320cd

Browse files
committed
Add CI
1 parent 4f2528e commit ca320cd

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

.github/workflows/ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Haskell CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macOS-13, windows-latest]
17+
ghc: ['9.4', '9.6', '9.8', '9.10', '9.12']
18+
include:
19+
- os: ubuntu-latest
20+
ghc: '8.10'
21+
- os: ubuntu-latest
22+
ghc: '9.0'
23+
- os: ubuntu-latest
24+
ghc: '9.2'
25+
- os: macOS-latest
26+
ghc: "9.4"
27+
- os: macOS-latest
28+
ghc: "9.6"
29+
- os: macOS-latest
30+
ghc: "9.8"
31+
- os: macOS-latest
32+
ghc: "9.10"
33+
- os: macOS-latest
34+
ghc: "9.12"
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- uses: msys2/setup-msys2@v2
39+
if: matrix.os == 'windows-latest'
40+
with:
41+
update: true
42+
install: >-
43+
autotools
44+
curl
45+
gettext
46+
gettext-devel
47+
libtool
48+
tar
49+
xz
50+
51+
- name: Install dependencies (Ubuntu)
52+
if: runner.os == 'Linux'
53+
run: |
54+
sudo apt-get -y update
55+
sudo apt-get -y install libtinfo6 libncurses6 autopoint
56+
57+
- name: Set up Homebrew
58+
if: runner.os == 'macOS'
59+
id: set-up-homebrew
60+
uses: Homebrew/actions/setup-homebrew@master
61+
62+
- name: Install dependencies (macOS)
63+
if: runner.os == 'macOS'
64+
run: |
65+
brew install autoconf autoconf-archive automake gettext libtool
66+
brew link libtool
67+
68+
- uses: haskell/ghcup-setup@v1
69+
with:
70+
ghc: ${{ matrix.ghc }}
71+
cabal: latest
72+
73+
- name: Build
74+
run: |
75+
set -eux
76+
cabal update
77+
cabal check
78+
cabal sdist all
79+
cabal unpack ./dist-newstyle/sdist/libffi-clib-*.tar.gz
80+
cd libffi-clib-*/
81+
autoreconf -i
82+
cabal build
83+
shell: bash
84+
85+
i386:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Checkout code
89+
uses: actions/checkout@v4
90+
91+
- name: Run build (32 bit linux)
92+
uses: docker://hasufell/i386-alpine-haskell:3.12
93+
with:
94+
args: sh -c "apk add gettext gettext-dev autoconf automake libtool && cabal update && autoreconf -i && cabal build"
95+

0 commit comments

Comments
 (0)