Skip to content

Commit 29408c6

Browse files
committed
Regenerate .travis.yml (add 8.8.1 job)
1 parent cb79f1d commit 29408c6

File tree

3 files changed

+33
-27
lines changed

3 files changed

+33
-27
lines changed

.travis.yml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# haskell-ci 'cabal.project' '--output' '.travis.yml' '--doctest' '--doctest-options=--preserve-it'
3+
# haskell-ci 'cabal.project' '--doctest' '--doctest-options=--preserve-it' '--benchmarks-jobs=<8.8'
44
#
55
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
7-
# version: 0.3.20190429
7+
# version: 0.3.20190815
88
#
99
language: c
1010
dist: xenial
@@ -26,6 +26,8 @@ before_cache:
2626
- rm -rfv $CABALHOME/packages/head.hackage
2727
matrix:
2828
include:
29+
- compiler: ghc-8.8.1
30+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
2931
- compiler: ghc-8.6.5
3032
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
3133
- compiler: ghc-8.4.4
@@ -36,13 +38,14 @@ matrix:
3638
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
3739
before_install:
3840
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
41+
- WITHCOMPILER="-w $HC"
3942
- HCPKG="$HC-pkg"
4043
- unset CC
4144
- CABAL=/opt/ghc/bin/cabal
4245
- CABALHOME=$HOME/.cabal
4346
- export PATH="$CABALHOME/bin:$PATH"
4447
- TOP=$(pwd)
45-
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
48+
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
4649
- echo $HCNUMVER
4750
- CABAL="$CABAL -vnormal+nowrap+markoutput"
4851
- set -o pipefail
@@ -69,11 +72,13 @@ install:
6972
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
7073
- TEST=--enable-tests
7174
- BENCH=--enable-benchmarks
72-
- GHCHEAD=${GHCHEAD-false}
75+
- if [ $HCNUMVER -ge 80800 ] ; then BENCH=--disable-benchmarks ; fi
76+
- HEADHACKAGE=false
7377
- rm -f $CABALHOME/config
7478
- |
7579
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
7680
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
81+
echo "write-ghc-environment-files: always" >> $CABALHOME/config
7782
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
7883
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
7984
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
@@ -89,63 +94,64 @@ install:
8994
- cat $CABALHOME/config
9095
- rm -fv cabal.project cabal.project.local cabal.project.freeze
9196
- travis_retry ${CABAL} v2-update -v
92-
- ${CABAL} v2-install -w ${HC} -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output
97+
- ${CABAL} v2-install $WITHCOMPILER -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output
9398
# Generate cabal.project
9499
- rm -rf cabal.project cabal.project.local cabal.project.freeze
95100
- touch cabal.project
96101
- |
97-
echo 'packages: "sop-core"' >> cabal.project
98-
echo 'packages: "generics-sop"' >> cabal.project
102+
echo "packages: sop-core" >> cabal.project
103+
echo "packages: generics-sop" >> cabal.project
99104
- |
100-
echo "write-ghc-environment-files: always" >> cabal.project
101105
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(generics-sop|sop-core)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
102106
- cat cabal.project || true
103107
- cat cabal.project.local || true
104108
- if [ -f "sop-core/configure.ac" ]; then (cd "sop-core" && autoreconf -i); fi
105109
- if [ -f "generics-sop/configure.ac" ]; then (cd "generics-sop" && autoreconf -i); fi
106-
- ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output
110+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
107111
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
108112
- rm cabal.project.freeze
109-
- ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
110-
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
113+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
114+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
111115
script:
112116
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
113117
# Packaging...
114118
- ${CABAL} v2-sdist all | color_cabal_output
115119
# Unpacking...
116120
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
117121
- cd ${DISTDIR} || false
118-
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
122+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
123+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
124+
- PKGDIR_sop_core="$(find . -maxdepth 1 -type d -regex '.*/sop-core-[0-9.]*')"
125+
- PKGDIR_generics_sop="$(find . -maxdepth 1 -type d -regex '.*/generics-sop-[0-9.]*')"
119126
# Generate cabal.project
120127
- rm -rf cabal.project cabal.project.local cabal.project.freeze
121128
- touch cabal.project
122129
- |
123-
echo 'packages: "sop-core-*/*.cabal"' >> cabal.project
124-
echo 'packages: "generics-sop-*/*.cabal"' >> cabal.project
130+
echo "packages: ${PKGDIR_sop_core}" >> cabal.project
131+
echo "packages: ${PKGDIR_generics_sop}" >> cabal.project
125132
- |
126-
echo "write-ghc-environment-files: always" >> cabal.project
127133
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(generics-sop|sop-core)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
128134
- cat cabal.project || true
129135
- cat cabal.project.local || true
130136
# Building...
131137
# this builds all libraries and executables (without tests/benchmarks)
132-
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
138+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
133139
# Building with tests and benchmarks...
134140
# build & run tests, build benchmarks
135-
- ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
141+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
136142
# Testing...
137-
- ${CABAL} v2-test -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
143+
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
138144
# Doctest...
139-
- (cd sop-core-* && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
140-
- (cd generics-sop-* && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
145+
- (cd ${PKGDIR_sop_core} && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
146+
- (cd ${PKGDIR_generics_sop} && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
141147
# cabal check...
142-
- (cd sop-core-* && ${CABAL} -vnormal check)
143-
- (cd generics-sop-* && ${CABAL} -vnormal check)
148+
- (cd ${PKGDIR_sop_core} && ${CABAL} -vnormal check)
149+
- (cd ${PKGDIR_generics_sop} && ${CABAL} -vnormal check)
144150
# haddock...
145-
- ${CABAL} v2-haddock -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
151+
- ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
146152
# Building without installed constraints for packages in global-db...
147153
- rm -f cabal.project.local
148-
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
154+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
149155

150-
# REGENDATA ["cabal.project","--output",".travis.yml","--doctest","--doctest-options=--preserve-it"]
156+
# REGENDATA ["cabal.project","--doctest","--doctest-options=--preserve-it","--benchmarks-jobs=<8.8"]
151157
# EOF

generics-sop/generics-sop.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ category: Generics
4242
build-type: Simple
4343
cabal-version: >=1.10
4444
extra-source-files: CHANGELOG.md doctest.sh
45-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5
45+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1
4646

4747
source-repository head
4848
type: git

sop-core/sop-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ category: Data
2525
build-type: Simple
2626
cabal-version: >=1.10
2727
extra-source-files: CHANGELOG.md doctest.sh
28-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5
28+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1
2929

3030
source-repository head
3131
type: git

0 commit comments

Comments
 (0)