# See also https://github.com/hvr/multi-ghc-travis 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 # remove files that are regenerated by 'cabal update' - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.* - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx matrix: include: - compiler: "ghc-7.4.2" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.4.2], sources: [hvr-ghc]}} - compiler: "ghc-7.6.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}} - compiler: "ghc-7.8.4" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}} - compiler: "ghc-7.10.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}} - compiler: "ghc-8.0.1" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.1], sources: [hvr-ghc]}} - compiler: "ghc-8.0.2" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}} - compiler: "ghc-8.2.1" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}} before_install: - HC=${CC} - unset CC - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH install: - cabal --version - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" - travis_retry cabal update -v - cabal new-build -w ${HC} --dep ${XCABFLAGS} all # 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: # prepare `cabal sdist` source-tree environment to make sure source-tarballs are complete - read -a PKGS <<< "hackage-security hackage-security-http-client hackage-security-curl hackage-security-HTTP hackage-security hackage-root-tool hackage-repo-tool example-client" - rm -rf sdists; mkdir sdists - for PKG in "${PKGS[@]}"; do cd "$PKG"; cabal sdist --output-directory="../sdists/$PKG" || break; cd ..; done - cd sdists/ # first build just hackage-security with installed constraints, with and without tests. # silly yaml, seeing : colon - "echo packages: hackage-security > cabal.project" - cabal new-build --disable-tests --constraint "directory installed" --constraint "bytestring installed" ${XCABFLAGS} all - cabal new-test --enable-tests --constraint "directory installed" --constraint "bytestring installed" ${XCABFLAGS} all # build all packages and run testsuite - cp -v ../cabal.project ./ - cabal new-build ${XCABFLAGS} -j1 all - cabal new-test ${XCABFLAGS} -j1 all # EOF