-
Notifications
You must be signed in to change notification settings - Fork 32
144 lines (139 loc) · 4.21 KB
/
other.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: other
on:
- push
- pull_request
defaults:
run:
shell: bash
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [windows-latest, macOS-latest]
ghc: ['9.2', '9.4', '9.6', '9.8', 'latest']
## macos-14 (arm, as of 2024-05-03 macos-latest) fails with ghc <= 9.0
include:
- os: windows-latest
ghc: '8.0'
- os: macos-13
ghc: '8.0'
- os: windows-latest
ghc: '8.2'
- os: macos-13
ghc: '8.2'
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-update: true
- uses: actions/cache@v4
name: Cache cabal stuff
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-ghc-${{ steps.setup-haskell-cabal.outputs.ghc-version }}
- name: Build
run: |
cabal sdist -o . all
cabal get zlib-*.tar.gz
echo "packages: ./$(ls zlib-clib-*.tar.gz | sed 's/\.tar\.gz//')/" > cabal.project
rm zlib-clib*.tar.gz
echo " ./$(ls zlib-*.tar.gz | sed 's/\.tar\.gz//')/" >> cabal.project
cabal build all
- name: Test
run: |
cabal test all
- name: Haddock
if: matrix.ghc != '8.0'
run: |
cabal haddock all
bundled-c-zlib:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
ghc: ['latest']
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-update: true
- uses: actions/cache@v4
name: Cache cabal stuff
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-ghc-${{ steps.setup-haskell-cabal.outputs.ghc-version }}
- name: Build
run: |
cabal sdist -o . all
cabal get zlib-*.tar.gz
echo "packages: ./$(ls zlib-clib-*.tar.gz | sed 's/\.tar\.gz//')/" > cabal.project
rm zlib-clib*.tar.gz
echo " ./$(ls zlib-*.tar.gz | sed 's/\.tar\.gz//')/" >> cabal.project
cabal build -c 'zlib +bundled-c-zlib' all
- name: Test
run: |
cabal test -c 'zlib +bundled-c-zlib' all
- name: Haddock
run: |
cabal haddock all
wasi:
runs-on: ubuntu-latest
env:
GHC_WASM_META_REV: c0aa3bb7d88bb6ec809210e17658dd1ed64ba66c
strategy:
matrix:
ghc: ['9.6', '9.8', '9.10']
fail-fast: false
steps:
- name: setup-ghc-wasm32-wasi
run: |
cd $(mktemp -d)
curl -L https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/$GHC_WASM_META_REV/ghc-wasm-meta.tar.gz | tar xz --strip-components=1
./setup.sh
~/.ghc-wasm/add_to_github_path.sh
env:
FLAVOUR: ${{ matrix.ghc }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.ghc-wasm/.cabal/store
key: wasi-${{ runner.os }}-${{ env.GHC_WASM_META_REV }}-flavour-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: |
wasi-${{ runner.os }}-${{ env.GHC_WASM_META_REV }}-flavour-${{ matrix.ghc }}-
- name: Build
run: |
mv cabal.project.wasi cabal.project.local
wasm32-wasi-cabal build --enable-tests all
wasm32-wasi-cabal list-bin test:tests
- name: Test
run: |
cd zlib
wasmtime.sh $(wasm32-wasi-cabal list-bin test:tests)
i386:
runs-on: ubuntu-latest
container:
image: i386/ubuntu:bionic
steps:
- name: Install
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
- uses: actions/checkout@v1
- name: Test
run: |
source ~/.ghcup/env
cabal update
cabal test all