Fix travis, disallow memory-0.14.12

Also remove duplicate bug-reports field
This commit is contained in:
Oleg Grenrus 2018-01-17 18:53:02 +02:00
parent 2dc48f0684
commit 3c7e7775fe
4 changed files with 31 additions and 6 deletions

View file

@ -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
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx - 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: matrix:
include: include:
@ -69,6 +69,10 @@ install:
- rm -fv cabal.project cabal.project.local - 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" - "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*$' - 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 - if [ -f "servant/configure.ac" ]; then
(cd "servant" && autoreconf -i); (cd "servant" && autoreconf -i);
fi fi
@ -112,7 +116,7 @@ script:
- cd ${DISTDIR} || false - cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \; - 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" - "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" - "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project"
- cat cabal.project - cat cabal.project
- echo -en 'travis_fold:end:unpack\\r' - echo -en 'travis_fold:end:unpack\\r'
@ -130,7 +134,7 @@ script:
# build & run tests, build benchmarks # build & run tests, build benchmarks
- cabal new-build -w ${HC} ${TEST} ${BENCH} all - cabal new-build -w ${HC} ${TEST} ${BENCH} all
- echo -en 'travis_fold:end:build-everything\\r' - 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' - echo cabal check... && echo -en 'travis_fold:start:check\\r'
# cabal check # cabal check
@ -146,7 +150,7 @@ script:
- echo Haddock... && echo -en 'travis_fold:start:haddock\\r' - echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
# haddock # haddock
- rm -rf ./dist-newstyle - 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' - echo -en 'travis_fold:end:haddock\\r'
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"] # REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]

View file

@ -58,3 +58,23 @@ See `CONTRIBUTING.md`
- `git tag -s` the release - `git tag -s` the release
- `git push --tags` - `git push --tags`
- `cabal sdist` and `cabal upload` - `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
```

View file

@ -18,4 +18,5 @@ allow-newer: servant-js:servant-foreign
constraints: constraints:
-- see https://github.com/haskell-infra/hackage-trustees/issues/119 -- 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

View file

@ -30,7 +30,7 @@ extra-source-files:
include/*.h include/*.h
CHANGELOG.md CHANGELOG.md
README.md README.md
bug-reports: http://github.com/haskell-servant/servant/issues
source-repository head source-repository head
type: git type: git
location: http://github.com/haskell-servant/servant.git location: http://github.com/haskell-servant/servant.git