Merge pull request #885 from phadej/travis-2018-01-05
Regenerate .travis.yml
This commit is contained in:
commit
2dc48f0684
3 changed files with 46 additions and 18 deletions
52
.travis.yml
52
.travis.yml
|
@ -1,6 +1,6 @@
|
|||
# This Travis job script has been generated by a script via
|
||||
#
|
||||
# make_travis_yml_2.hs '-f' '-o' '.travis.yml' '--branch' 'master' '--branch' 'release-0.12' 'cabal.project'
|
||||
# runghc make_travis_yml_2.hs '--config=cabal.make-travis-yml' '--output=.travis.yml' 'cabal.project'
|
||||
#
|
||||
# For more information, see https://github.com/hvr/multi-ghc-travis
|
||||
#
|
||||
|
@ -12,8 +12,8 @@ git:
|
|||
|
||||
branches:
|
||||
only:
|
||||
- release-0.12
|
||||
- master
|
||||
- release-0.12
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
@ -29,6 +29,8 @@ 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
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: "ghc-7.8.4"
|
||||
|
@ -49,7 +51,10 @@ before_install:
|
|||
- HCPKG=${HC/ghc/ghc-pkg}
|
||||
- unset CC
|
||||
- ROOTDIR=$(pwd)
|
||||
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH"
|
||||
- mkdir -p $HOME/.local/bin
|
||||
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
|
||||
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
|
||||
- echo $HCNUMVER
|
||||
|
||||
install:
|
||||
- cabal --version
|
||||
|
@ -58,33 +63,34 @@ install:
|
|||
- TEST=${TEST---enable-tests}
|
||||
- HADDOCK=${HADDOCK-true}
|
||||
- INSTALLED=${INSTALLED-true}
|
||||
- GHCHEAD=${GHCHEAD-false}
|
||||
- travis_retry cabal update -v
|
||||
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
|
||||
- rm -fv 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"
|
||||
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
|
||||
- if [ -f "servant/configure.ac" ]; then
|
||||
(cd "servant"; autoreconf -i);
|
||||
(cd "servant" && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "servant-client/configure.ac" ]; then
|
||||
(cd "servant-client"; autoreconf -i);
|
||||
(cd "servant-client" && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "servant-client-core/configure.ac" ]; then
|
||||
(cd "servant-client-core"; autoreconf -i);
|
||||
(cd "servant-client-core" && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "servant-docs/configure.ac" ]; then
|
||||
(cd "servant-docs"; autoreconf -i);
|
||||
(cd "servant-docs" && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "servant-foreign/configure.ac" ]; then
|
||||
(cd "servant-foreign"; autoreconf -i);
|
||||
(cd "servant-foreign" && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "servant-server/configure.ac" ]; then
|
||||
(cd "servant-server"; autoreconf -i);
|
||||
(cd "servant-server" && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "doc/tutorial/configure.ac" ]; then
|
||||
(cd "doc/tutorial"; autoreconf -i);
|
||||
(cd "doc/tutorial" && autoreconf -i);
|
||||
fi
|
||||
- rm -f cabal.project.freeze
|
||||
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 servant-server servant-client
|
||||
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 servant-server servant-client
|
||||
- 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
|
||||
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||
|
||||
|
@ -106,8 +112,9 @@ 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"
|
||||
# Allow-newer and other cabal.project amendments
|
||||
- "echo 'allow-newer: servant-js:servant, servant-js:servant-foreign' >> cabal.project"
|
||||
- "echo 'constraints: foundation >=0.0.14' >> cabal.project"
|
||||
- "echo 'allow-newer: servant-js:servant-foreign' >> cabal.project"
|
||||
- cat cabal.project
|
||||
- echo -en 'travis_fold:end:unpack\\r'
|
||||
- echo Building... && echo -en 'travis_fold:start:build\\r'
|
||||
# this builds all libraries and executables (without tests/benchmarks)
|
||||
|
@ -123,15 +130,24 @@ script:
|
|||
# build & run tests, build benchmarks
|
||||
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
|
||||
- echo -en 'travis_fold:end:build-everything\\r'
|
||||
- echo Testing... && echo -en 'travis_fold:start:test\\r'
|
||||
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
|
||||
- echo -en 'travis_fold:end:test\\r'
|
||||
|
||||
- echo cabal check... && echo -en 'travis_fold:start:check\\r'
|
||||
# cabal check
|
||||
- (cd servant-* && cabal check)
|
||||
- (cd servant-client-* && cabal check)
|
||||
- (cd servant-client-core-* && cabal check)
|
||||
- (cd servant-docs-* && cabal check)
|
||||
- (cd servant-foreign-* && cabal check)
|
||||
- (cd servant-server-* && cabal check)
|
||||
- (cd tutorial-* && cabal check)
|
||||
|
||||
- echo -en 'travis_fold:end:check\\r'
|
||||
- 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
|
||||
|
||||
- echo -en 'travis_fold:end:haddock\\r'
|
||||
# REGENDATA ["-f","-o",".travis.yml","--branch","master","--branch","release-0.12","cabal.project"]
|
||||
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
|
||||
# EOF
|
||||
|
|
8
cabal.make-travis-yml
Normal file
8
cabal.make-travis-yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
folds: all-but-test
|
||||
branches: master release-0.12
|
||||
|
||||
-- We have inplace packages (servant-js) so we skip installing dependencies in a separate step
|
||||
install-dependencies-step: False
|
||||
|
||||
-- ghc-options: -j2
|
||||
jobs: :2
|
|
@ -1,7 +1,11 @@
|
|||
name: tutorial
|
||||
version: 0.10
|
||||
synopsis: The servant tutorial
|
||||
description:
|
||||
The servant tutorial can be found at
|
||||
<http://haskell-servant.readthedocs.org/>
|
||||
homepage: http://haskell-servant.readthedocs.org/
|
||||
category: Servant, Documentation
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Servant Contributors
|
||||
|
|
Loading…
Reference in a new issue