@@ -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