From 3c7e7775fe025336cc7a416556db728354a8dc50 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Wed, 17 Jan 2018 18:53:02 +0200 Subject: [PATCH] Fix travis, disallow memory-0.14.12 Also remove duplicate bug-reports field --- .travis.yml | 12 ++++++++---- README.md | 20 ++++++++++++++++++++ cabal.project | 3 ++- servant-server/servant-server.cabal | 2 +- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 233a6624..98a6a951 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_cache: - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx - - rm -fv $HOME/.cabal/packages/head.hackage + - rm -rfv $HOME/.cabal/packages/head.hackage matrix: include: @@ -69,6 +69,10 @@ install: - rm -fv cabal.project cabal.project.local - "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi" - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$' + - "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\"\\n' > cabal.project" + - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project" + - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project" + - cat cabal.project - if [ -f "servant/configure.ac" ]; then (cd "servant" && autoreconf -i); fi @@ -112,7 +116,7 @@ script: - cd ${DISTDIR} || false - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \; - "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" - - "echo 'constraints: foundation >=0.0.14' >> cabal.project" + - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project" - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project" - cat cabal.project - echo -en 'travis_fold:end:unpack\\r' @@ -130,7 +134,7 @@ script: # build & run tests, build benchmarks - cabal new-build -w ${HC} ${TEST} ${BENCH} all - echo -en 'travis_fold:end:build-everything\\r' - - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi + - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi - echo cabal check... && echo -en 'travis_fold:start:check\\r' # cabal check @@ -146,7 +150,7 @@ script: - echo Haddock... && echo -en 'travis_fold:start:haddock\\r' # haddock - rm -rf ./dist-newstyle - - if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi + - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi - echo -en 'travis_fold:end:haddock\\r' # REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"] diff --git a/README.md b/README.md index 01d8fb36..f585c938 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,23 @@ See `CONTRIBUTING.md` - `git tag -s` the release - `git push --tags` - `cabal sdist` and `cabal upload` + +## travis + +`.travis.yml` is generated using `make-travis-yml` tool, in +[multi-ghc-travis](https://github.com/haskell-hvr/multi-ghc-travis) repository. + +To regenerate the script use (*note:* atm you need to comment `doc/cookbook/` packages). + +``` +runghc ~/Documents/other-haskell/multi-ghc-travis/make_travis_yml_2.hs regenerate +``` + +In case Travis jobs fail due failing build of dependency, you can temporarily +add `constraints` to the `cabal.project`, and regenerate the `.travis.yml`. +For example, the following will disallow single `troublemaker-13.37` package version: + +``` +constraints: + troublemaker <13.37 && > 13.37 +``` diff --git a/cabal.project b/cabal.project index e4b0ef72..bfeccc73 100644 --- a/cabal.project +++ b/cabal.project @@ -18,4 +18,5 @@ allow-newer: servant-js:servant-foreign constraints: -- see https://github.com/haskell-infra/hackage-trustees/issues/119 - foundation >=0.0.14 + foundation >=0.0.14, + memory <0.14.2 && >0.14.2 diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index 6aa5ac22..ce22b8f4 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -30,7 +30,7 @@ extra-source-files: include/*.h CHANGELOG.md README.md -bug-reports: http://github.com/haskell-servant/servant/issues + source-repository head type: git location: http://github.com/haskell-servant/servant.git