Permalink
Fetching contributors…
Cannot retrieve contributors at this time
89 lines (77 sloc) 3.39 KB
# This file has been generated by `make_travis_yml_2.hs`
# see https://github.com/hvr/multi-ghc-travis for more information
language: c
sudo: false
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
notifications:
email:
# email is sent to the committer and the author, but only if they have access to this repository
# see https://docs.travis-ci.com/user/notifications/#Email-notifications for details
on_success: never
on_failure: always
irc:
channels:
- "chat.freenode.net#hackage"
template:
- "\x0313hackage-server\x0f/\x0306%{branch}\x0f \x0314%{commit}\x0f %{message} \x0302\x1f%{build_url}\x0f"
matrix:
include:
- env: CABALVER=1.24 GHCVER=7.6.3
compiler: ": #GHC 7.6.3"
addons: {apt: {packages: [cabal-install-1.24,ghc-7.6.3,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=7.8.4
compiler: ": #GHC 7.8.4"
addons: {apt: {packages: [cabal-install-1.24,ghc-7.8.4,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=7.10.3
compiler: ": #GHC 7.10.3"
addons: {apt: {packages: [cabal-install-1.24,ghc-7.10.3,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.1
compiler: ": #GHC 8.0.1"
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,alex-3.1.7,happy-1.19.5], sources: [hvr-ghc]}}
before_install:
- unset CC
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.7/bin:$PATH
install:
- cabal --version
- BENCH=${BENCH---enable-benchmarks}
- TEST=${TEST---enable-tests}
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
then
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
fi
- travis_retry cabal update -v
- sed -i 's/^jobs:.*$/jobs:2/' ${HOME}/.cabal/config
# install build-dependencies before script-phase
- if [ -f configure.ac ]; then autoreconf -i; fi
# temporarily disabled since --dep doesn't work yet, see https://github.com/haskell/cabal/issues/3490
# - cabal new-build ${TEST} ${BENCH} --dep
# - rm -rf dist-newstyle/
# Here starts the actual work to be performed for the package under test;
# any command which exits with a non-zero exit code causes the build to fail.
script:
# test that a source-distribution can be generated
- cabal sdist
# extract the source-distribution and chdir into it
- SRC_BASENAME=$(cabal info . | awk '{print $2;exit}')
- tar -C dist/ -xf dist/$SRC_BASENAME.tar.gz
- "echo 'packages: .' > dist/$SRC_BASENAME/cabal.project"
- cd dist/$SRC_BASENAME/
## from here on, CWD is inside the extracted source-tarball
## Check that the resulting source distribution can be built w/o and w/ tests
## first pass, w/o tests
- cabal new-build --disable-tests --disable-benchmarks
## and now with tests & benchmarks
- cabal new-build ${TEST} ${BENCH}
# there's no 'cabal new-test' yet, so call tests directly for now
- T=PackageTests; ./dist-newstyle/build/*/build/$T/$T --plain
- T=HashTests; ./dist-newstyle/build/*/build/$T/$T
- T=HighLevelTest; ./dist-newstyle/build/*/build/$T/$T
# EOF