git.iko.soy/typeable/servant
on master help sign in
Reinstate cookbook testing to CI
commit98a12c328bd5d22df8efcea0c421bd15651c64b2 authorOleg Grenrus <oleg.grenrus@iki.fi> dateWed 17 Jan 2018, 21:43 (9 years ago) parent3c7e777
11 files changed+66−54
.travis.yml+37−24 cabal.make-travis-yml+7 cabal.project+2−9 doc/cookbook/basic-auth/basic-auth.cabal+1−2 doc/cookbook/db-postgres-pool/db-postgres-pool.cabal+2−2 doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal+2−2 doc/cookbook/file-upload/file-upload.cabal+3−3 doc/cookbook/https/https.cabal+1−2 doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal+8−5 doc/cookbook/structuring-apis/structuring-apis.cabal+1−2 doc/cookbook/using-custom-monad/using-custom-monad.cabal+2−3
.travis.yml+37−24
@@ -69,7 +69,7 @@ install:
6969 - rm -fv cabal.project cabal.project.local
7070 - "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
7171 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
72− - "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\"\\n' > cabal.project"
72+ - "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/basic-auth\" \"doc/cookbook/https\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/file-upload\"\\n' > cabal.project"
7373 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
7474 - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project"
7575 - cat cabal.project
@@ -94,8 +94,32 @@ install:
9494 - if [ -f "doc/tutorial/configure.ac" ]; then
9595 (cd "doc/tutorial" && autoreconf -i);
9696 fi
97+ - if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then
98+ (cd "doc/cookbook/db-postgres-pool" && autoreconf -i);
99+ fi
100+ - if [ -f "doc/cookbook/jwt-and-basic-auth/configure.ac" ]; then
101+ (cd "doc/cookbook/jwt-and-basic-auth" && autoreconf -i);
102+ fi
103+ - if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
104+ (cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
105+ fi
106+ - if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
107+ (cd "doc/cookbook/basic-auth" && autoreconf -i);
108+ fi
109+ - if [ -f "doc/cookbook/https/configure.ac" ]; then
110+ (cd "doc/cookbook/https" && autoreconf -i);
111+ fi
112+ - if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then
113+ (cd "doc/cookbook/structuring-apis" && autoreconf -i);
114+ fi
115+ - if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then
116+ (cd "doc/cookbook/using-custom-monad" && autoreconf -i);
117+ fi
118+ - if [ -f "doc/cookbook/file-upload/configure.ac" ]; then
119+ (cd "doc/cookbook/file-upload" && autoreconf -i);
120+ fi
97121 - rm -f cabal.project.freeze
98− - rm -rf "servant"/.ghc.environment.* "servant-client"/.ghc.environment.* "servant-client-core"/.ghc.environment.* "servant-docs"/.ghc.environment.* "servant-foreign"/.ghc.environment.* "servant-server"/.ghc.environment.* "doc/tutorial"/.ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist
122+ - rm -rf "servant"/.ghc.environment.* "servant-client"/.ghc.environment.* "servant-client-core"/.ghc.environment.* "servant-docs"/.ghc.environment.* "servant-foreign"/.ghc.environment.* "servant-server"/.ghc.environment.* "doc/tutorial"/.ghc.environment.* "doc/cookbook/db-postgres-pool"/.ghc.environment.* "doc/cookbook/jwt-and-basic-auth"/.ghc.environment.* "doc/cookbook/db-sqlite-simple"/.ghc.environment.* "doc/cookbook/basic-auth"/.ghc.environment.* "doc/cookbook/https"/.ghc.environment.* "doc/cookbook/structuring-apis"/.ghc.environment.* "doc/cookbook/using-custom-monad"/.ghc.environment.* "doc/cookbook/file-upload"/.ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/jwt-and-basic-auth"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/https"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/file-upload"/dist
99123 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
100124
101125# Here starts the actual work to be performed for the package under test;
@@ -110,43 +134,32 @@ script:
110134 - (cd "servant-foreign" && cabal sdist)
111135 - (cd "servant-server" && cabal sdist)
112136 - (cd "doc/tutorial" && cabal sdist)
137+ - (cd "doc/cookbook/db-postgres-pool" && cabal sdist)
138+ - (cd "doc/cookbook/jwt-and-basic-auth" && cabal sdist)
139+ - (cd "doc/cookbook/db-sqlite-simple" && cabal sdist)
140+ - (cd "doc/cookbook/basic-auth" && cabal sdist)
141+ - (cd "doc/cookbook/https" && cabal sdist)
142+ - (cd "doc/cookbook/structuring-apis" && cabal sdist)
143+ - (cd "doc/cookbook/using-custom-monad" && cabal sdist)
144+ - (cd "doc/cookbook/file-upload" && cabal sdist)
113145 - echo -en 'travis_fold:end:sdist\\r'
114146 - echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
115− - mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz ${DISTDIR}/
147+ - mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/jwt-and-basic-auth"/dist/cookbook-jwt-and-basic-auth-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz ${DISTDIR}/
116148 - cd ${DISTDIR} || false
117149 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
118− - "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal\\n' > cabal.project"
150+ - "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-https-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-file-upload-*/*.cabal\\n' > cabal.project"
119151 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
120152 - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project"
121153 - cat cabal.project
122154 - echo -en 'travis_fold:end:unpack\\r'
123− - echo Building... && echo -en 'travis_fold:start:build\\r'
124− # this builds all libraries and executables (without tests/benchmarks)
125− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
126− - echo -en 'travis_fold:end:build\\r'
127155
128− - echo Building with installed constraints for package in global-db... && echo -en 'travis_fold:start:build-installed\\r'
129− # Build with installed constraints for packages in global-db
130− - if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
131− - echo -en 'travis_fold:end:build-installed\\r'
132156
133157 - echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
134158 # build & run tests, build benchmarks
135− - cabal new-build -w ${HC} ${TEST} ${BENCH} all
159+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all --max-backjumps=20000
136160 - echo -en 'travis_fold:end:build-everything\\r'
137161 - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
138162
139− - echo cabal check... && echo -en 'travis_fold:start:check\\r'
140− # cabal check
141− - (cd servant-* && cabal check)
142− - (cd servant-client-* && cabal check)
143− - (cd servant-client-core-* && cabal check)
144− - (cd servant-docs-* && cabal check)
145− - (cd servant-foreign-* && cabal check)
146− - (cd servant-server-* && cabal check)
147− - (cd tutorial-* && cabal check)
148−
149− - echo -en 'travis_fold:end:check\\r'
150163 - echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
151164 # haddock
152165 - rm -rf ./dist-newstyle
cabal.make-travis-yml+7
@@ -4,5 +4,12 @@ branches: master release-0.12
44-- We have inplace packages (servant-js) so we skip installing dependencies in a separate step
55install-dependencies-step: False
66
7+-- this speed-ups the build a little, but we have to check these for release
8+no-tests-no-benchmarks: False
9+build-with-installed-step: False
10+
11+-- Don't run cabal check, as cookbook examples won't pass it
12+cabal-check: False
13+
714-- ghc-options: -j2
815jobs: :2
cabal.project+2−9
@@ -5,18 +5,11 @@ packages: servant/
55 servant-foreign/
66 servant-server/
77 doc/tutorial/
8− doc/cookbook/basic-auth/
9− doc/cookbook/db-postgres-pool/
10− doc/cookbook/using-custom-monad/
11− doc/cookbook/db-sqlite-simple/
12− doc/cookbook/jwt-and-basic-auth/
13− doc/cookbook/file-upload/
14− doc/cookbook/structuring-apis/
15− doc/cookbook/https/
8+ doc/cookbook/*/*.cabal
169
1710allow-newer: servant-js:servant-foreign
1811
1912constraints:
2013 -- see https://github.com/haskell-infra/hackage-trustees/issues/119
2114 foundation >=0.0.14,
22− memory <0.14.2 && >0.14.2
15+ memory <0.14.12 || >0.14.12
doc/cookbook/basic-auth/basic-auth.cabal+1−2
@@ -8,10 +8,9 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-basic-auth
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: BasicAuth.lhs
1615 build-depends: base == 4.*
1716 , text >= 1.2
doc/cookbook/db-postgres-pool/db-postgres-pool.cabal+2−2
@@ -8,10 +8,9 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-db-postgres-pool
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: PostgresPool.lhs
1615 build-depends: base == 4.*
1716 , bytestring >= 0.10
@@ -27,6 +26,7 @@ executable cookbook-db-postgres-pool
2726 , http-client >= 0.5
2827 , postgresql-simple >= 0.5
2928 , resource-pool >= 0.2
29+ , transformers
3030 default-language: Haskell2010
3131 ghc-options: -Wall -pgmL markdown-unlit
3232 build-tool-depends: markdown-unlit:markdown-unlit
doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal+2−2
@@ -8,10 +8,9 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-db-sqlite-simple
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: DBConnection.lhs
1615 build-depends: base == 4.*
1716 , text >= 1.2
@@ -25,6 +24,7 @@ executable cookbook-db-sqlite-simple
2524 , markdown-unlit >= 0.4
2625 , http-client >= 0.5
2726 , sqlite-simple >= 0.4
27+ , transformers
2828 default-language: Haskell2010
2929 ghc-options: -Wall -pgmL markdown-unlit
3030 build-tool-depends: markdown-unlit:markdown-unlit
doc/cookbook/file-upload/file-upload.cabal+3−3
@@ -8,19 +8,19 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-file-upload
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: FileUpload.lhs
1615 build-depends: base == 4.*
1716 , text >= 1.2
18− , mtl >= 2.2
17+ , mtl >= 2.1
1918 , network >= 2.6
2019 , bytestring >= 0.10
2120 , servant
2221 , servant-server
2322 , servant-multipart
23+ , transformers
2424 , warp >= 3.2
2525 , wai >= 3.2
2626 , markdown-unlit >= 0.4
doc/cookbook/https/https.cabal+1−2
@@ -8,10 +8,9 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-https
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: Https.lhs
1615 build-depends: base == 4.*
1716 , servant
doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal+8−5
@@ -11,10 +11,12 @@ maintainer: haskell-servant-maintainers@googlegroups.com
1111category: Servant
1212build-type: Simple
1313cabal-version: >=1.10
14+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1415
1516executable cookbook-jwt-and-basic-auth
16− if impl(ghc < 7.10.1)
17− buildable: False
17+ if !impl(ghc >= 7.10)
18+ buildable: False
19+
1820 main-is: JWTAndBasicAuth.lhs
1921 build-depends: base == 4.*
2022 , text >= 1.2
@@ -23,14 +25,15 @@ executable cookbook-jwt-and-basic-auth
2325 , servant
2426 , servant-client
2527 , servant-server
26− , servant-auth
27− , servant-auth-server
28+ , servant-auth ==0.3.*
29+ , servant-auth-server >= 0.3.1.0
2830 , warp >= 3.2
2931 , wai >= 3.2
3032 , http-types >= 0.10
3133 , markdown-unlit >= 0.4
3234 , http-client >= 0.5
33− , bytestring >= 0.10
35+ , bytestring >= 0.10.4
36+ , transformers
3437 default-language: Haskell2010
3538 ghc-options: -Wall -pgmL markdown-unlit
3639 build-tool-depends: markdown-unlit:markdown-unlit
doc/cookbook/structuring-apis/structuring-apis.cabal+1−2
@@ -8,10 +8,9 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-structuring-apis
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: StructuringApis.lhs
1615 build-depends: base == 4.*
1716 , aeson >= 1.2
doc/cookbook/using-custom-monad/using-custom-monad.cabal+2−3
@@ -8,10 +8,9 @@ author: Servant Contributors
88maintainer: haskell-servant-maintainers@googlegroups.com
99build-type: Simple
1010cabal-version: >=1.10
11+tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
1112
1213executable cookbook-using-custom-monad
13− if impl(ghc < 7.10.1)
14− buildable: False
1514 main-is: UsingCustomMonad.lhs
1615 build-depends: base == 4.*
1716 , aeson >= 1.2
@@ -23,7 +22,7 @@ executable cookbook-using-custom-monad
2322 , http-client >= 0.5
2423 , markdown-unlit >= 0.4
2524 , stm >= 2.4
26− , transformers >= 0.4
25+ , transformers >= 0.3
2726 default-language: Haskell2010
2827 ghc-options: -Wall -pgmL markdown-unlit
2928 build-tool-depends: markdown-unlit:markdown-unlit