1
1
# This GitHub workflow config has been generated by a script via
2
2
#
3
- # haskell-ci 'github' './ attoparsec.cabal' '--no- benchmarks' '--branches ' 'master '
3
+ # haskell-ci 'github' 'attoparsec.cabal' '--benchmarks-jobs ' '>=7.8 '
4
4
#
5
5
# To regenerate the script (for example after adjusting tested-with) run
6
6
#
7
7
# haskell-ci regenerate
8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.12.1
11
+ # version: 0.14
12
12
#
13
- # REGENDATA ("0.12.1 ",["github","./ attoparsec.cabal","--no- benchmarks","--branches ","master "])
13
+ # REGENDATA ("0.14 ",["github","attoparsec.cabal","--benchmarks-jobs ",">=7.8 "])
14
14
#
15
15
name : Haskell-CI
16
16
on :
17
- push :
18
- branches :
19
- - master
20
- pull_request :
21
- branches :
22
- - master
17
+ - push
18
+ - pull_request
23
19
jobs :
24
20
linux :
25
21
name : Haskell-CI - Linux - ${{ matrix.compiler }}
26
22
runs-on : ubuntu-18.04
23
+ timeout-minutes :
24
+ 60
27
25
container :
28
- image : buildpack-deps:xenial
26
+ image : buildpack-deps:bionic
29
27
continue-on-error : ${{ matrix.allow-failure }}
30
28
strategy :
31
29
matrix :
32
30
include :
33
- - compiler : ghc-9.0.1
31
+ - compiler : ghc-9.2.1
32
+ compilerKind : ghc
33
+ compilerVersion : 9.2.1
34
+ setup-method : ghcup
34
35
allow-failure : false
35
- - compiler : ghc-8.10.4
36
+ - compiler : ghc-9.0.2
37
+ compilerKind : ghc
38
+ compilerVersion : 9.0.2
39
+ setup-method : ghcup
40
+ allow-failure : false
41
+ - compiler : ghc-8.10.7
42
+ compilerKind : ghc
43
+ compilerVersion : 8.10.7
44
+ setup-method : ghcup
36
45
allow-failure : false
37
46
- compiler : ghc-8.8.4
47
+ compilerKind : ghc
48
+ compilerVersion : 8.8.4
49
+ setup-method : hvr-ppa
38
50
allow-failure : false
39
51
- compiler : ghc-8.6.5
52
+ compilerKind : ghc
53
+ compilerVersion : 8.6.5
54
+ setup-method : hvr-ppa
40
55
allow-failure : false
41
56
- compiler : ghc-8.4.4
57
+ compilerKind : ghc
58
+ compilerVersion : 8.4.4
59
+ setup-method : hvr-ppa
42
60
allow-failure : false
43
61
- compiler : ghc-8.2.2
62
+ compilerKind : ghc
63
+ compilerVersion : 8.2.2
64
+ setup-method : hvr-ppa
44
65
allow-failure : false
45
66
- compiler : ghc-8.0.2
67
+ compilerKind : ghc
68
+ compilerVersion : 8.0.2
69
+ setup-method : hvr-ppa
46
70
allow-failure : false
47
71
- compiler : ghc-7.10.3
72
+ compilerKind : ghc
73
+ compilerVersion : 7.10.3
74
+ setup-method : hvr-ppa
48
75
allow-failure : false
49
76
- compiler : ghc-7.8.4
77
+ compilerKind : ghc
78
+ compilerVersion : 7.8.4
79
+ setup-method : hvr-ppa
50
80
allow-failure : false
51
81
- compiler : ghc-7.6.3
82
+ compilerKind : ghc
83
+ compilerVersion : 7.6.3
84
+ setup-method : hvr-ppa
52
85
allow-failure : false
53
86
- compiler : ghc-7.4.2
87
+ compilerKind : ghc
88
+ compilerVersion : 7.4.2
89
+ setup-method : hvr-ppa
54
90
allow-failure : false
55
91
fail-fast : false
56
92
steps :
57
93
- name : apt
58
94
run : |
59
95
apt-get update
60
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
61
- apt-add-repository -y 'ppa:hvr/ghc'
62
- apt-get update
63
- apt-get install -y $CC cabal-install-3.4
96
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
97
+ if [ "${{ matrix.setup-method }}" = ghcup ]; then
98
+ mkdir -p "$HOME/.ghcup/bin"
99
+ curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
100
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
101
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
102
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
103
+ else
104
+ apt-add-repository -y 'ppa:hvr/ghc'
105
+ apt-get update
106
+ apt-get install -y "$HCNAME"
107
+ mkdir -p "$HOME/.ghcup/bin"
108
+ curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
109
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
110
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
111
+ fi
64
112
env :
65
- CC : ${{ matrix.compiler }}
113
+ HCKIND : ${{ matrix.compilerKind }}
114
+ HCNAME : ${{ matrix.compiler }}
115
+ HCVER : ${{ matrix.compilerVersion }}
66
116
- name : Set PATH and environment variables
67
117
run : |
68
118
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
69
- echo "LANG=C.UTF-8" >> $GITHUB_ENV
70
- echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
71
- echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
72
- HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
73
- HCNAME=ghc
74
- HC=$HCDIR/bin/$HCNAME
75
- echo "HC=$HC" >> $GITHUB_ENV
76
- echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
77
- echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
78
- echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
119
+ echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
120
+ echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
121
+ echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
122
+ HCDIR=/opt/$HCKIND/$HCVER
123
+ if [ "${{ matrix.setup-method }}" = ghcup ]; then
124
+ HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
125
+ echo "HC=$HC" >> "$GITHUB_ENV"
126
+ echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
127
+ echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
128
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
129
+ else
130
+ HC=$HCDIR/bin/$HCKIND
131
+ echo "HC=$HC" >> "$GITHUB_ENV"
132
+ echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
133
+ echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
134
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
135
+ fi
136
+
79
137
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
80
- echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
81
- echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
82
- echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV
83
- echo "HEADHACKAGE=false" >> $GITHUB_ENV
84
- echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
85
- echo "GHCJSARITH=0" >> $GITHUB_ENV
138
+ echo "HCNUMVER=$HCNUMVER" >> " $GITHUB_ENV"
139
+ echo "ARG_TESTS=--enable-tests" >> " $GITHUB_ENV"
140
+ if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=-- disable-benchmarks" >> " $GITHUB_ENV" ; fi
141
+ echo "HEADHACKAGE=false" >> " $GITHUB_ENV"
142
+ echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> " $GITHUB_ENV"
143
+ echo "GHCJSARITH=0" >> " $GITHUB_ENV"
86
144
env :
87
- CC : ${{ matrix.compiler }}
145
+ HCKIND : ${{ matrix.compilerKind }}
146
+ HCNAME : ${{ matrix.compiler }}
147
+ HCVER : ${{ matrix.compilerVersion }}
88
148
- name : env
89
149
run : |
90
150
env
@@ -107,6 +167,10 @@ jobs:
107
167
repository hackage.haskell.org
108
168
url: http://hackage.haskell.org/
109
169
EOF
170
+ cat >> $CABAL_CONFIG <<EOF
171
+ program-default-options
172
+ ghc-options: $GHCJOBS +RTS -M3G -RTS
173
+ EOF
110
174
cat $CABAL_CONFIG
111
175
- name : versions
112
176
run : |
@@ -145,7 +209,8 @@ jobs:
145
209
- name : generate cabal.project
146
210
run : |
147
211
PKGDIR_attoparsec="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/attoparsec-[0-9.]*')"
148
- echo "PKGDIR_attoparsec=${PKGDIR_attoparsec}" >> $GITHUB_ENV
212
+ echo "PKGDIR_attoparsec=${PKGDIR_attoparsec}" >> "$GITHUB_ENV"
213
+ rm -f cabal.project cabal.project.local
149
214
touch cabal.project
150
215
touch cabal.project.local
151
216
echo "packages: ${PKGDIR_attoparsec}" >> cabal.project
@@ -190,3 +255,16 @@ jobs:
190
255
run : |
191
256
rm -f cabal.project.local
192
257
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
258
+ - name : prepare for constraint sets
259
+ run : |
260
+ rm -f cabal.project.local
261
+ - name : constraint set text-2
262
+ run : |
263
+ if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' --dependencies-only -j2 all ; fi
264
+ if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' all ; fi
265
+ if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' all ; fi
266
+ - name : constraint set text-1
267
+ run : |
268
+ if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text < 2' --dependencies-only -j2 all ; fi
269
+ if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text < 2' all ; fi
270
+ if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text < 2' all ; fi
0 commit comments