-
Notifications
You must be signed in to change notification settings - Fork 16
231 lines (197 loc) · 7.11 KB
/
packcheck.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# packcheck-0.5.1
# You can use any of the options supported by packcheck as environment
# variables here. See https://github.com/composewell/packcheck for all
# options and their explanation.
name: packcheck
#-----------------------------------------------------------------------------
# Events on which the build should be triggered
#-----------------------------------------------------------------------------
on:
push:
branches:
- master
pull_request:
#-----------------------------------------------------------------------------
# Build matrix
#-----------------------------------------------------------------------------
jobs:
build:
name: ${{ matrix.name }}
env:
# ------------------------------------------------------------------------
# Common options
# ------------------------------------------------------------------------
# GHC_OPTIONS: "-Werror"
CABAL_REINIT_CONFIG: y
LC_ALL: C.UTF-8
# ------------------------------------------------------------------------
# What to build
# ------------------------------------------------------------------------
# DISABLE_TEST: "y"
# DISABLE_BENCH: "y"
# DISABLE_DOCS: "y"
DISABLE_SDIST_BUILD: "y"
# DISABLE_SDIST_GIT_CHECK: "y"
# DISABLE_DIST_CHECKS: "y"
# ------------------------------------------------------------------------
# stack options
# ------------------------------------------------------------------------
# Note requiring a specific version of stack using STACKVER may fail due to
# github API limit while checking and upgrading/downgrading to the specific
# version.
#STACKVER: "1.6.5"
#STACK_UPGRADE: "y"
#RESOLVER: "lts-12"
# ------------------------------------------------------------------------
# cabal options
# ------------------------------------------------------------------------
CABAL_CHECK_RELAX: y
CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
# ------------------------------------------------------------------------
# Where to find the required tools
# ------------------------------------------------------------------------
PATH: /opt/ghc/bin:/sbin:/usr/sbin:/bin:/usr/bin
#TOOLS_DIR: /opt
# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
# ------------------------------------------------------------------------
# You can either commit the packcheck.sh script at this path in your repo or
# you can use it by specifying the PACKCHECK_REPO_URL option below in which
# case it will be automatically copied from the packcheck repo to this path
# during CI tests. In any case it is finally invoked from this path.
PACKCHECK: "./packcheck.sh"
# If you have not committed packcheck.sh in your repo at PACKCHECK
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
# ------------------------------------------------------------------------
# Final build variables
# ------------------------------------------------------------------------
PACKCHECK_COMMAND: ${{ matrix.command }} ${{ matrix.pack_options }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
name:
- 9.10.1
- 9.8.1
- 9.6.3
- 9.4.7
- 9.2.8
- 9.0.2
- 8.10.7
- 8.10.7+stack
- 8.8.4
- 8.6.5
- 8.4.4
- 8.2.2
- 8.0.2
include:
- name: 9.10.1
ghc-version: 9.10.1
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.10.1.0
- name: 9.8.1
ghc-version: 9.8.1
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.10.1.0
- name: 9.6.3
ghc-version: 9.6.3
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.10.1.0
- name: 9.4.7
ghc-version: 9.4.7
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.8.1.0
- name: 9.2.8
ghc-version: 9.2.8
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.6
- name: 9.0.2
ghc-version: 9.0.2
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.10.7
ghc-version: 8.10.7
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.8.4
ghc-version: 8.8.4
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.6.5
ghc-version: 8.6.5
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.4.4
ghc-version: 8.4.4
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.2.2
ghc-version: 8.2.2
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.0.2
ghc-version: 8.0.2
command: cabal-v2
runner: ubuntu-latest
cabal-version: 3.2
- name: 8.10.7+stack
ghc-version: 8.10.7
command: stack
runner: ubuntu-latest
cabal-version: 3.2
pack_options: >-
RESOLVER=lts-18.18
# - name: hlint
# command: cabal-v2
# runner: ubuntu-latest
# pack_options: >-
# HLINT_OPTIONS="lint"
# HLINT_TARGETS="Data"
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: ${{ matrix.cabal-version }}
- uses: actions/cache@v4
name: Cache common directories
with:
path: |
~/.cabal
~/.ghc
~/.local
~/.stack
key: ${{ matrix.ghc_version }}-${{ matrix.runner }}
- name: Run installer
if: ${{ matrix.installer != '' }}
run: ${{ matrix.installer }}
- name: Setup stack
if: ${{ matrix.command == 'stack' }}
run: |
# required for packcheck
sudo apt-get install -y curl
# required for outbound https for stack and for stack setup
sudo apt-get install -y netbase xz-utils make
- name: Download packcheck
run: |
# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
if test ! -e "$PACKCHECK"; then $CURL -sL -o "$PACKCHECK" $PACKCHECK_URL; fi;
chmod +x $PACKCHECK
- name: Run packcheck
run: |
bash -c "$PACKCHECK $PACKCHECK_COMMAND"