-
Notifications
You must be signed in to change notification settings - Fork 1
176 lines (150 loc) · 5.33 KB
/
haskell.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
# packcheck-0.7.0
# 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"
GHCUP_VERSION: 0.1.20.0
DOCSPEC_URL: https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz
DOCSPEC_OPTIONS: "--timeout 60"
CABAL_REINIT_CONFIG: y
LC_ALL: C.UTF-8
STACK_UPGRADE: "y"
CABAL_CHECK_RELAX: y
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com
PACKCHECK: "./packcheck.sh"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.7.0"
BUILD: ${{ matrix.build }}
GHCVER: ${{ matrix.ghc_version }}
#RESOLVER: ${{ matrix.resolver }}
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
CABAL_PROJECT: ${{ matrix.cabal_project }}
#DISABLE_DOCS: ${{ matrix.disable_docs }}
#DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
#DISABLE_SDIST_BUILD: "y"
HLINT_VERSION: 3.6.1
HLINT_OPTIONS: ${{ matrix.hlint_options }}
HLINT_TARGETS: ${{ matrix.hlint_targets }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: 9.8.1-Werror
ghc_version: 9.8.1
build: cabal
runner: ubuntu-latest
cabal-version: 3.10.2.0
cabal_project: cabal.project.d/master-Werror
- name: 9.8.1-doctest
runner: ubuntu-latest
ghc_version: 9.8.1
build: cabal
cabal-version: 3.10.2.0
cabal_project: cabal.project.d/master
disable_test: "y"
disable_bench: "y"
disable_docs: "y"
disable_sdist_build: "y"
enable_docspec: "y"
- name: hlint
build: hlint
hlint_options: "lint"
hlint_targets: "src test Benchmark"
runner: ubuntu-latest
cabal-version: 3.2
cabal_project: cabal.project.d/master
- name: 9.6.3-macos
runner: macos-latest
ghc_version: 9.6.3
build: cabal
cabal-version: 3.10.1.0
cabal_project: cabal.project.d/master
- name: 9.4.4-streamly-0.9.0
runner: ubuntu-latest
ghc_version: 9.4.4
build: cabal
cabal-version: 3.8.1.0
cabal_project: cabal.project.d/streamly-0.9.0
- name: 9.4.4-streamly-0.10.0
runner: ubuntu-latest
ghc_version: 9.4.4
build: cabal
cabal-version: 3.8.1.0
cabal_project: cabal.project.d/streamly-0.10.0
- name: 9.2.7+fusion-plugin
runner: ubuntu-latest
ghc_version: 9.2.7
build: cabal
cabal-version: 3.6
cabal_project: cabal.project.d/master
cabal-build-options: --flag fusion-plugin
- name: 8.10.7+macOS
runner: macos-latest
ghc_version: 8.10.7
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.d/master
- name: 8.8.4
runner: ubuntu-latest
ghc_version: 8.8.4
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.d/master
- name: 8.6.5
runner: ubuntu-latest
ghc_version: 8.6.5
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.d/master
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
name: Restore cache
with:
path: |
~/.local
~/.cabal
~/.stack
.stack-work
key: ${{ runner.os }}-${{ matrix.name }}
- name: Download packcheck
run: |
# If a custom stack-yaml is specified, replace the default with that
#if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
#unset STACK_YAML
if test ! -e "$PACKCHECK"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
chmod +x $PACKCHECK
elif test ! -x "$PACKCHECK"
then
chmod +x $PACKCHECK
fi
- name: Run packcheck
run: |
bash -c "$PACKCHECK $BUILD"