2
2
#
3
3
# haskell-ci '--output' '.travis.yml' '--config=cabal.haskell-ci' 'servant-multipart.cabal'
4
4
#
5
+ # To regenerate the script (for example after adjusting tested-with) run
6
+ #
7
+ # haskell-ci regenerate
8
+ #
5
9
# For more information, see https://github.com/haskell-CI/haskell-ci
6
10
#
7
- # version: 0.5.20190908
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
18
24
directories :
19
25
- $HOME/.cabal/packages
20
26
- $HOME/.cabal/store
27
+ - $HOME/.hlint
21
28
before_cache :
22
29
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
23
30
# remove files that are regenerated by 'cabal update'
@@ -27,18 +34,23 @@ before_cache:
27
34
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
28
35
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
29
36
- rm -rfv $CABALHOME/packages/head.hackage
30
- matrix :
37
+ jobs :
31
38
include :
32
- - compiler : ghc-8.8.1
33
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
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
34
42
- compiler : ghc-8.6.5
35
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
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
36
45
- compiler : ghc-8.4.4
37
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
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
38
48
- compiler : ghc-8.2.2
39
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
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
40
51
- compiler : ghc-8.0.2
41
- addons : {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
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
42
54
before_install :
43
55
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
44
56
- WITHCOMPILER="-w $HC"
@@ -51,29 +63,8 @@ before_install:
51
63
- TOP=$(pwd)
52
64
- " HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\ d+)\\ .(\\ d+)\\ .(\\ d+)(\\ .(\\ d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
53
65
- echo $HCNUMVER
54
- - CABAL="$CABAL -vnormal+nowrap+markoutput "
66
+ - CABAL="$CABAL -vnormal+nowrap"
55
67
- set -o pipefail
56
- - |
57
- echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
58
- echo 'BEGIN { state = "output"; }' >> .colorful.awk
59
- echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
60
- echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
61
- echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
62
- echo ' if (state == "cabal") {' >> .colorful.awk
63
- echo ' print blue($0)' >> .colorful.awk
64
- echo ' } else {' >> .colorful.awk
65
- echo ' print $0' >> .colorful.awk
66
- echo ' }' >> .colorful.awk
67
- echo '}' >> .colorful.awk
68
- - cat .colorful.awk
69
- - |
70
- color_cabal_output () {
71
- awk -f $TOP/.colorful.awk
72
- }
73
- - echo text | color_cabal_output
74
- install :
75
- - ${CABAL} --version
76
- - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
77
68
- TEST=--enable-tests
78
69
- BENCH=--enable-benchmarks
79
70
- HEADHACKAGE=false
@@ -94,6 +85,9 @@ install:
94
85
echo " prefix: $CABALHOME" >> $CABALHOME/config
95
86
echo "repository hackage.haskell.org" >> $CABALHOME/config
96
87
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
88
+ install :
89
+ - ${CABAL} --version
90
+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
97
91
- |
98
92
echo "program-default-options" >> $CABALHOME/config
99
93
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
@@ -105,20 +99,22 @@ install:
105
99
- touch cabal.project
106
100
- |
107
101
echo "packages: ." >> cabal.project
102
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-multipart' >> cabal.project ; fi
103
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
108
104
- |
109
105
- " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-multipart)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
110
106
- cat cabal.project || true
111
107
- cat cabal.project.local || true
112
108
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
113
- - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
109
+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
114
110
- " cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
115
111
- rm cabal.project.freeze
116
- - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
117
- - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
112
+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
113
+ - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
118
114
script :
119
115
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
120
116
# Packaging...
121
- - ${CABAL} v2-sdist all | color_cabal_output
117
+ - ${CABAL} v2-sdist all
122
118
# Unpacking...
123
119
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
124
120
- cd ${DISTDIR} || false
@@ -130,33 +126,37 @@ script:
130
126
- touch cabal.project
131
127
- |
132
128
echo "packages: ${PKGDIR_servant_multipart}" >> cabal.project
129
+ - if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-multipart' >> cabal.project ; fi
130
+ - " if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
133
131
- |
134
132
- " for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-multipart)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
135
133
- cat cabal.project || true
136
134
- cat cabal.project.local || true
137
135
# Building...
138
136
# this builds all libraries and executables (without tests/benchmarks)
139
- - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
137
+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
140
138
# Building with tests and benchmarks...
141
139
# build & run tests, build benchmarks
142
- - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
140
+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
143
141
# Testing...
144
- - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
142
+ - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
145
143
# cabal check...
146
144
- (cd ${PKGDIR_servant_multipart} && ${CABAL} -vnormal check)
147
145
# haddock...
148
- - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output
146
+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
149
147
# Building without installed constraints for packages in global-db...
150
148
- rm -f cabal.project.local
151
- - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
149
+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
152
150
# Constraint sets
153
151
- rm -rf cabal.project.local
154
152
# Constraint set network-2.8
155
- - if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='network == 2.8.*' all | color_cabal_output ; fi
153
+ - if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='network == 2.8.*' all ; fi
156
154
# Constraint set network-3.0
157
- - if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='network == 3.0.*' all | color_cabal_output ; fi
155
+ - if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='network == 3.0.*' all ; fi
158
156
# Constraint set servant-0.16
159
- - if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all | color_cabal_output ; fi
157
+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all
158
+ # Constraint set servant-0.17
159
+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all
160
160
161
- # REGENDATA ["--output",".travis.yml","--config=cabal.haskell-ci","servant-multipart.cabal"]
161
+ # REGENDATA ("0.10.1", ["--output",".travis.yml","--config=cabal.haskell-ci","servant-multipart.cabal"])
162
162
# EOF
0 commit comments