-
Notifications
You must be signed in to change notification settings - Fork 70
61 lines (58 loc) · 2.02 KB
/
haskell-ci.yaml
File metadata and controls
61 lines (58 loc) · 2.02 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
58
59
60
61
name: Haskell CI
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc: ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.8', '9.4.8', '9.6.7', '9.8.4', '9.10.3', '9.12.2', '9.14.1']
steps:
- uses: actions/checkout@v6
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
- name: Cache
uses: actions/cache@v5
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}
- name: Rename package to allow building test suite
run: |
sed -i 's/\(name:\s*binary\)/\1-cabal-is-broken/' binary.cabal
sed -i 's/\(binary\),/\1-cabal-is-broken,/' binary.cabal
- name: Build
run: cabal build
- name: Build tests
run: cabal build --enable-tests
- name: Test
run: cabal test --enable-tests
- name: Build benchmarks
run: cabal build --enable-benchmarks
- name: Haddock
run: cabal haddock
build-i386:
runs-on: ubuntu-latest
container:
image: i386/ubuntu
steps:
- uses: actions/checkout@v1 # newer version don't work
- name: Install GHCup
run: |
apt-get update -y
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
echo "$HOME/.cabal/bin:$HOME/.ghcup/bin" >> "$GITHUB_PATH"
- name: Rename package to allow building test suite
run: |
sed -i 's/\(name:\s*binary\)/\1-cabal-is-broken/' binary.cabal
sed -i 's/\(binary\),/\1-cabal-is-broken,/' binary.cabal
- name: Build
run: cabal build
- name: Test
run: cabal test --enable-tests