1
1
# This Travis job script has been generated by a script via
2
2
#
3
- # haskell-ci 'text.cabal'
3
+ # haskell-ci '--config=cabal.haskell-ci' 'cabal.project'
4
+ #
5
+ # To regenerate the script (for example after adjusting tested-with) run
6
+ #
7
+ # haskell-ci regenerate
4
8
#
5
9
# For more information, see https://github.com/haskell-CI/haskell-ci
6
10
#
7
- # version: 0.3.20190521
11
+ # version: 0.10.1
8
12
#
13
+ version : ~> 1.0
9
14
language : c
15
+ os : linux
10
16
dist : xenial
11
17
git :
12
18
# whether to recursively clone submodules
15
21
directories :
16
22
- $HOME/.cabal/packages
17
23
- $HOME/.cabal/store
24
+ - $HOME/.hlint
18
25
before_cache :
19
26
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
20
27
# remove files that are regenerated by 'cabal update'
@@ -24,68 +31,67 @@ before_cache:
24
31
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
25
32
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
26
33
- rm -rfv $CABALHOME/packages/head.hackage
27
- matrix :
34
+ jobs :
28
35
include :
36
+ - compiler : ghc-8.10.1
37
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.1","cabal-install-3.2"]}}
38
+ os : linux
39
+ - compiler : ghc-8.8.3
40
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}
41
+ os : linux
29
42
- compiler : ghc-8.6.5
30
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
43
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
44
+ os : linux
31
45
- compiler : ghc-8.4.4
32
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
46
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}
47
+ os : linux
33
48
- compiler : ghc-8.2.2
34
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
49
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}
50
+ os : linux
35
51
- compiler : ghc-8.0.2
36
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
52
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}
53
+ os : linux
37
54
- compiler : ghc-7.10.3
38
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.3","cabal-install-2.4"]}}
55
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.3","cabal-install-3.2"]}}
56
+ os : linux
39
57
- compiler : ghc-7.8.4
40
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-2.4"]}}
58
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.2"]}}
59
+ os : linux
41
60
- compiler : ghc-7.6.3
42
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.3","cabal-install-2.4"]}}
61
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.6.3","cabal-install-3.2"]}}
62
+ os : linux
43
63
- compiler : ghc-7.4.2
44
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.4.2","cabal-install-2.4"]}}
64
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.4.2","cabal-install-3.2"]}}
65
+ os : linux
45
66
- compiler : ghc-7.2.2
46
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.2.2","cabal-install-2.4"]}}
67
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.2.2","cabal-install-3.2"]}}
68
+ os : linux
47
69
- compiler : ghc-7.0.4
48
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.0.4","cabal-install-2.4"]}}
70
+ addons : {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.0.4","cabal-install-3.2"]}}
71
+ os : linux
49
72
before_install :
50
73
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
74
+ - WITHCOMPILER="-w $HC"
75
+ - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
51
76
- HCPKG="$HC-pkg"
52
77
- unset CC
53
78
- CABAL=/opt/ghc/bin/cabal
54
79
- CABALHOME=$HOME/.cabal
55
80
- export PATH="$CABALHOME/bin:$PATH"
56
81
- TOP=$(pwd)
57
- - HCNUMVER=$(( $($ {HC} --numeric-version|sed -E 's/([0-9] +)\.([0-9] +)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
82
+ - " HCNUMVER=$($ {HC} --numeric-version|perl -ne '/^( \\ d +)\\ .( \\ d +)\\ .( \\ d+)( \\ .( \\ d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') "
58
83
- echo $HCNUMVER
59
- - CABAL="$CABAL -vnormal+nowrap+markoutput "
84
+ - CABAL="$CABAL -vnormal+nowrap"
60
85
- set -o pipefail
61
- - |
62
- echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
63
- echo 'BEGIN { state = "output"; }' >> .colorful.awk
64
- echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
65
- echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
66
- echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
67
- echo ' if (state == "cabal") {' >> .colorful.awk
68
- echo ' print blue($0)' >> .colorful.awk
69
- echo ' } else {' >> .colorful.awk
70
- echo ' print $0' >> .colorful.awk
71
- echo ' }' >> .colorful.awk
72
- echo '}' >> .colorful.awk
73
- - cat .colorful.awk
74
- - |
75
- color_cabal_output () {
76
- awk -f $TOP/.colorful.awk
77
- }
78
- - echo text | color_cabal_output
79
- install :
80
- - ${CABAL} --version
81
- - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
82
86
- TEST=--enable-tests
83
87
- BENCH=--enable-benchmarks
84
- - GHCHEAD=${GHCHEAD-false}
88
+ - if [ $HCNUMVER -lt 70400 ] ; then BENCH=--disable-benchmarks ; fi
89
+ - HEADHACKAGE=false
85
90
- rm -f $CABALHOME/config
86
91
- |
87
92
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
88
93
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
94
+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
89
95
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
90
96
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
91
97
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
@@ -98,61 +104,93 @@ install:
98
104
echo " prefix: $CABALHOME" >> $CABALHOME/config
99
105
echo "repository hackage.haskell.org" >> $CABALHOME/config
100
106
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
107
+ install :
108
+ - ${CABAL} --version
109
+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
110
+ - |
111
+ echo "program-default-options" >> $CABALHOME/config
112
+ echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
101
113
- cat $CABALHOME/config
102
114
- rm -fv cabal.project cabal.project.local cabal.project.freeze
103
115
- travis_retry ${CABAL} v2-update -v
104
116
# Generate cabal.project
105
117
- rm -rf cabal.project cabal.project.local cabal.project.freeze
106
118
- touch cabal.project
107
119
- |
108
- echo 'packages: "."' >> cabal.project
120
+ echo "packages: ." >> cabal.project
121
+ echo "packages: tests" >> cabal.project
122
+ echo "packages: th-tests" >> cabal.project
123
+ if [ $HCNUMVER -ge 71000 ] ; then echo "packages: benchmarks" >> cabal.project ; fi
124
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package text' >> cabal.project ; fi
125
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
126
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package text-tests' >> cabal.project ; fi
127
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
128
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package th-tests' >> cabal.project ; fi
129
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
130
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package text-benchmarks' >> cabal.project ; fi
131
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
109
132
- |
110
- echo "write-ghc-environment-files: always" >> cabal.project
111
- - " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(text)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
133
+ - " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(parsec|text|text-benchmarks|text-tests|th-tests)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
112
134
- cat cabal.project || true
113
135
- cat cabal.project.local || true
114
136
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
115
- - ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output
137
+ - if [ -f "tests/configure.ac" ]; then (cd "tests" && autoreconf -i); fi
138
+ - if [ -f "th-tests/configure.ac" ]; then (cd "th-tests" && autoreconf -i); fi
139
+ - if [ -f "benchmarks/configure.ac" ]; then (cd "benchmarks" && autoreconf -i); fi
140
+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
116
141
- " cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
117
142
- rm cabal.project.freeze
118
- - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
119
- - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
120
143
script :
121
144
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
122
145
# Packaging...
123
- - ${CABAL} v2-sdist all | color_cabal_output
146
+ - ${CABAL} v2-sdist all
124
147
# Unpacking...
125
148
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
126
- - cp -av th-tests ${DISTDIR}/th-tests.src
127
149
- cd ${DISTDIR} || false
128
- - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
150
+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
151
+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
152
+ - PKGDIR_text="$(find . -maxdepth 1 -type d -regex '.*/text-[0-9.]*')"
153
+ - PKGDIR_text_tests="$(find . -maxdepth 1 -type d -regex '.*/text-tests-[0-9.]*')"
154
+ - PKGDIR_th_tests="$(find . -maxdepth 1 -type d -regex '.*/th-tests-[0-9.]*')"
155
+ - PKGDIR_text_benchmarks="$(find . -maxdepth 1 -type d -regex '.*/text-benchmarks-[0-9.]*')"
129
156
# Generate cabal.project
130
157
- rm -rf cabal.project cabal.project.local cabal.project.freeze
131
158
- touch cabal.project
132
159
- |
133
- echo 'packages: "text-*/*.cabal"' >> cabal.project
134
- - |
135
- echo 'packages: ./th-tests.src/' >> cabal.project
160
+ echo "packages: ${PKGDIR_text}" >> cabal.project
161
+ echo "packages: ${PKGDIR_text_tests}" >> cabal.project
162
+ echo "packages: ${PKGDIR_th_tests}" >> cabal.project
163
+ if [ $HCNUMVER -ge 71000 ] ; then echo "packages: ${PKGDIR_text_benchmarks}" >> cabal.project ; fi
164
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package text' >> cabal.project ; fi
165
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
166
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package text-tests' >> cabal.project ; fi
167
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
168
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package th-tests' >> cabal.project ; fi
169
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
170
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package text-benchmarks' >> cabal.project ; fi
171
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
136
172
- |
137
- echo "write-ghc-environment-files: always" >> cabal.project
138
- - " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(text)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
173
+ - " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(parsec|text|text-benchmarks|text-tests|th-tests)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
139
174
- cat cabal.project || true
140
175
- cat cabal.project.local || true
141
176
# Building...
142
177
# this builds all libraries and executables (without tests/benchmarks)
143
- - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
178
+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
144
179
# Building with tests and benchmarks...
145
180
# build & run tests, build benchmarks
146
- - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
181
+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
147
182
# Testing...
148
- - ${CABAL} v2-test -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
183
+ - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
149
184
# cabal check...
150
- - (cd text-* && ${CABAL} -vnormal check)
185
+ - (cd ${PKGDIR_text} && ${CABAL} -vnormal check)
186
+ - (cd ${PKGDIR_text_tests} && ${CABAL} -vnormal check)
187
+ - (cd ${PKGDIR_th_tests} && ${CABAL} -vnormal check)
188
+ - if [ $HCNUMVER -ge 71000 ] ; then (cd ${PKGDIR_text_benchmarks} && ${CABAL} -vnormal check) ; fi
151
189
# haddock...
152
- - ${CABAL} v2-haddock -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
190
+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
153
191
# Building without installed constraints for packages in global-db...
154
192
- rm -f cabal.project.local
155
- - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
193
+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
156
194
157
- # REGENDATA ["text. cabal"]
195
+ # REGENDATA ("0.10.1",["--config=cabal.haskell-ci"," cabal.project"])
158
196
# EOF
0 commit comments