Skip to content

Commit d69724e

Browse files
committed
Allow lens-4.18
1 parent 8e9ead4 commit d69724e

File tree

2 files changed

+109
-80
lines changed

2 files changed

+109
-80
lines changed

.travis.yml

Lines changed: 105 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@
44
#
55
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
7+
# version: 0.5.20190908
8+
#
79
language: c
810
dist: xenial
9-
1011
git:
11-
submodules: false # whether to recursively clone submodules
12-
12+
# whether to recursively clone submodules
13+
submodules: false
1314
branches:
1415
only:
1516
- master
16-
1717
cache:
1818
directories:
1919
- $HOME/.cabal/packages
2020
- $HOME/.cabal/store
21-
2221
before_cache:
2322
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2423
# remove files that are regenerated by 'cabal update'
@@ -27,109 +26,139 @@ before_cache:
2726
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
2827
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
2928
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
30-
3129
- rm -rfv $CABALHOME/packages/head.hackage
32-
3330
matrix:
3431
include:
35-
- compiler: "ghc-8.6.3"
36-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
37-
- compiler: "ghc-8.4.4"
38-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
39-
- compiler: "ghc-8.2.2"
40-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
41-
- compiler: "ghc-8.0.2"
42-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
43-
32+
- compiler: ghc-8.8.1
33+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
34+
- compiler: ghc-8.6.5
35+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
36+
- compiler: ghc-8.4.4
37+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
38+
- compiler: ghc-8.2.2
39+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
40+
- compiler: ghc-8.0.2
41+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
4442
before_install:
45-
- HC=/opt/ghc/bin/${CC}
46-
- HCVER=$(echo "$TRAVIS_COMPILER" | sed 's/ghc-//')
47-
- echo $HCVER
48-
- HCPKG=${HC/ghc/ghc-pkg}
43+
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
44+
- WITHCOMPILER="-w $HC"
45+
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
46+
- HCPKG="$HC-pkg"
4947
- unset CC
5048
- CABAL=/opt/ghc/bin/cabal
5149
- CABALHOME=$HOME/.cabal
5250
- export PATH="$CABALHOME/bin:$PATH"
53-
- ROOTDIR=$(pwd)
54-
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
51+
- TOP=$(pwd)
52+
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
5553
- echo $HCNUMVER
56-
54+
- CABAL="$CABAL -vnormal+nowrap+markoutput"
55+
- 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
5774
install:
5875
- ${CABAL} --version
5976
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
6077
- TEST=--enable-tests
6178
- BENCH=--enable-benchmarks
62-
- GHCHEAD=${GHCHEAD-false}
63-
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export CABALHOME=$APPDATA/cabal; else export CABALHOME=$HOME/.cabal; fi
64-
- travis_retry ${CABAL} update -v
65-
- sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
66-
- rm -fv cabal.project cabal.project.local
67-
- grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
68-
- rm -f cabal.project
79+
- HEADHACKAGE=false
80+
- rm -f $CABALHOME/config
81+
- |
82+
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
83+
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
84+
echo "write-ghc-environment-files: always" >> $CABALHOME/config
85+
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
86+
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
87+
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
88+
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
89+
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
90+
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
91+
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
92+
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
93+
echo "install-dirs user" >> $CABALHOME/config
94+
echo " prefix: $CABALHOME" >> $CABALHOME/config
95+
echo "repository hackage.haskell.org" >> $CABALHOME/config
96+
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
97+
- |
98+
echo "program-default-options" >> $CABALHOME/config
99+
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
100+
- cat $CABALHOME/config
101+
- rm -fv cabal.project cabal.project.local cabal.project.freeze
102+
- travis_retry ${CABAL} v2-update -v
103+
# Generate cabal.project
104+
- rm -rf cabal.project cabal.project.local cabal.project.freeze
69105
- touch cabal.project
70-
- "printf 'packages: \".\"\\n' >> cabal.project"
71-
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
72-
- touch cabal.project.local
73-
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(servant-multipart)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
106+
- |
107+
echo "packages: ." >> cabal.project
108+
- |
109+
- "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"
74110
- cat cabal.project || true
75111
- cat cabal.project.local || true
76112
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
77-
- rm -f cabal.project.freeze
78-
- ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry
79-
- "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
80-
- rm "cabal.project.freeze"
81-
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
82-
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
83-
- rm -rf .ghc.environment.* "."/dist
84-
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
85-
86-
# Here starts the actual work to be performed for the package under test;
87-
# any command which exits with a non-zero exit code causes the build to fail.
113+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
114+
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
115+
- 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
88118
script:
89-
# test that source-distributions can be generated
90-
- ${CABAL} new-sdist all
119+
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
120+
# Packaging...
121+
- ${CABAL} v2-sdist all | color_cabal_output
122+
# Unpacking...
91123
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
92124
- cd ${DISTDIR} || false
93-
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
94-
- rm -f cabal.project
125+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
126+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
127+
- PKGDIR_servant_multipart="$(find . -maxdepth 1 -type d -regex '.*/servant-multipart-[0-9.]*')"
128+
# Generate cabal.project
129+
- rm -rf cabal.project cabal.project.local cabal.project.freeze
95130
- touch cabal.project
96-
- "printf 'packages: \"servant-multipart-*/*.cabal\"\\n' >> cabal.project"
97-
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
98-
- touch cabal.project.local
99-
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(servant-multipart)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
131+
- |
132+
echo "packages: ${PKGDIR_servant_multipart}" >> cabal.project
133+
- |
134+
- "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"
100135
- cat cabal.project || true
101136
- cat cabal.project.local || true
137+
# Building...
102138
# this builds all libraries and executables (without tests/benchmarks)
103-
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all
104-
139+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
140+
# Building with tests and benchmarks...
105141
# build & run tests, build benchmarks
106-
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
107-
- if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
108-
109-
# cabal check
110-
- (cd servant-multipart-* && ${CABAL} check)
111-
112-
# haddock
113-
- ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
114-
115-
# Build without installed constraints for packages in global-db
116-
- rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all;
117-
142+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
143+
# Testing...
144+
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
145+
# cabal check...
146+
- (cd ${PKGDIR_servant_multipart} && ${CABAL} -vnormal check)
147+
# haddock...
148+
- ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output
149+
# Building without installed constraints for packages in global-db...
150+
- rm -f cabal.project.local
151+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
118152
# Constraint sets
119153
- rm -rf cabal.project.local
120-
121154
# Constraint set network-2.8
122-
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='network == 2.8.*' all
123-
155+
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='network == 2.8.*' all | color_cabal_output ; fi
124156
# Constraint set network-3.0
125-
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='network == 3.0.*' all
126-
157+
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='network == 3.0.*' all | color_cabal_output ; fi
127158
# Constraint set servant-0.15
128-
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='servant ==0.15.*' all
129-
159+
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.15.*' all | color_cabal_output ; fi
130160
# Constraint set servant-0.16
131-
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all
132-
161+
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all | color_cabal_output ; fi
133162

134163
# REGENDATA ["--output",".travis.yml","--config=cabal.haskell-ci","servant-multipart.cabal"]
135164
# EOF

servant-multipart.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: servant-multipart
22
version: 0.11.4
3-
x-revision: 1
3+
x-revision: 2
44
synopsis: multipart/form-data (e.g file upload) support for servant
55
description:
66
This package adds support for file upload to the servant ecosystem. It draws
@@ -18,7 +18,7 @@ category: Web, Servant
1818
build-type: Simple
1919
cabal-version: >=1.10
2020
extra-source-files: CHANGELOG.md
21-
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.3
21+
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1
2222

2323
library
2424
default-language: Haskell2010
@@ -36,7 +36,7 @@ library
3636
-- other dependencies
3737
build-depends:
3838
http-media >=0.7.1.3 && <0.9
39-
, lens >=4.17 && <4.18
39+
, lens >=4.17 && <4.19
4040
, resourcet >=1.2.2 && <1.3
4141
, servant >=0.15 && <0.17
4242
, servant-docs >=0.10 && <0.15
@@ -54,7 +54,7 @@ test-suite upload
5454
base
5555
, bytestring
5656
, http-client
57-
, network >=2.8 && <3.1
57+
, network >=2.8 && <3.2
5858
, servant
5959
, servant-multipart
6060
, servant-server

0 commit comments

Comments
 (0)