-
Notifications
You must be signed in to change notification settings - Fork 86
111 lines (99 loc) · 2.69 KB
/
simple.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Simple
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
native:
name: "Simple: GHC ${{ matrix.ghc }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
ghc: ['9.6.5','9.8.2']
fail-fast: false
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.10.3.0'
- name: Cache
uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: cabal build all --enable-tests
- name: Test
run: cabal test all --enable-tests --test-show-details=direct
alpine-32bit:
name: Alpine Linux, musl, 32-bit
runs-on: ubuntu-latest
env:
CC: "gcc"
strategy:
matrix:
ghc: ['9.6.5']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Setup Alpine Linux"
uses: jirutka/setup-alpine@v1
with:
arch: x86
branch: v3.17
packages: >
binutils-gold
curl
gcc
g++
git
gmp-dev
libc-dev
libffi-dev
make
musl-dev
ncurses-dev
openssh-client
perl
tar
zlib-dev
zlib-static
- name: "Setup"
shell: alpine.sh {0}
run: |
gcc --version
make --version
curl https://downloads.haskell.org/ghcup/0.1.22.0/i386-linux-ghcup-0.1.22.0 > ghcup
chmod a+x ghcup
whoami
echo $HOME
GHCUP_INSTALL_BASE_PREFIX=$HOME ./ghcup install cabal 3.10.3.0 --set
GHCUP_INSTALL_BASE_PREFIX=$HOME ./ghcup install ghc ${{matrix.ghc }} --set
- name: Update
shell: alpine.sh {0}
run: |
export PATH=$HOME/.ghcup/bin:$PATH
cabal update
- name: Build
shell: alpine.sh {0}
run: |
export PATH=$HOME/.ghcup/bin:$PATH
cabal build all --enable-tests
- name: Test
shell: alpine.sh {0}
run: |
export PATH=$HOME/.ghcup/bin:$PATH
cabal test all --enable-tests --test-show-details=direct