@@ -29,7 +29,7 @@ before_cache:
2929 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
3030 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
3131
32− - rm -fv $HOME/.cabal/packages/head.hackage
32+ - rm -rfv $HOME/.cabal/packages/head.hackage
3333
3434matrix:
3535 include:
@@ -69,6 +69,10 @@ 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\" \"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"
73+ - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
74+ - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project"
75+ - cat cabal.project
7276 - if [ -f "servant/configure.ac" ]; then
7377 (cd "servant" && autoreconf -i);
7478 fi
@@ -90,8 +94,32 @@ install:
9094 - if [ -f "doc/tutorial/configure.ac" ]; then
9195 (cd "doc/tutorial" && autoreconf -i);
9296 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
93121 - rm -f cabal.project.freeze
94− - 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
95123 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
96124
97125# Here starts the actual work to be performed for the package under test;
@@ -106,47 +134,36 @@ script:
106134 - (cd "servant-foreign" && cabal sdist)
107135 - (cd "servant-server" && cabal sdist)
108136 - (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)
109145 - echo -en 'travis_fold:end:sdist\\r'
110146 - echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
111− - 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}/
112148 - cd ${DISTDIR} || false
113149 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
114− - "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"
115− - "echo 'constraints: foundation >=0.0.14' >> 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"
151+ - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
116152 - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project"
117153 - cat cabal.project
118154 - echo -en 'travis_fold:end:unpack\\r'
119− - echo Building... && echo -en 'travis_fold:start:build\\r'
120− # this builds all libraries and executables (without tests/benchmarks)
121− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
122− - echo -en 'travis_fold:end:build\\r'
123155
124− - echo Building with installed constraints for package in global-db... && echo -en 'travis_fold:start:build-installed\\r'
125− # Build with installed constraints for packages in global-db
126− - 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
127− - echo -en 'travis_fold:end:build-installed\\r'
128156
129157 - echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
130158 # build & run tests, build benchmarks
131− - cabal new-build -w ${HC} ${TEST} ${BENCH} all
159+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all --max-backjumps=20000
132160 - echo -en 'travis_fold:end:build-everything\\r'
133− - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
134−
135− - echo cabal check... && echo -en 'travis_fold:start:check\\r'
136− # cabal check
137− - (cd servant-* && cabal check)
138− - (cd servant-client-* && cabal check)
139− - (cd servant-client-core-* && cabal check)
140− - (cd servant-docs-* && cabal check)
141− - (cd servant-foreign-* && cabal check)
142− - (cd servant-server-* && cabal check)
143− - (cd tutorial-* && cabal check)
161+ - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
144162
145− - echo -en 'travis_fold:end:check\\r'
146163 - echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
147164 # haddock
148165 - rm -rf ./dist-newstyle
149− - if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
166+ - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
150167
151168 - echo -en 'travis_fold:end:haddock\\r'
152169# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]