streamly/.travis.yml
2017-12-08 02:11:28 +05:30

99 lines
3.3 KiB
YAML

notifications:
email: false
language: c
sudo: false
cache:
directories:
- $HOME/.cabal
- $HOME/.ghc
- $HOME/.local
- $HOME/.stack
matrix:
include:
# cabal/linux
# cabal build for GHC 7.10.3 hangs
#- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
#addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.22
addons: {apt: {packages: [libgmp-dev,cabal-install-1.22,libsdl1.2-dev], sources: [hvr-ghc]}}
# stack/linux use a pre-installed cabal-install for faster builds
# GHC 8.0.1
- env: BUILD=stack RESOLVER=lts-7.24 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
addons: {apt: {packages: [libgmp-dev,cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=lts-9.16 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
# Note COVERALLS (hpc-coveralls) requires cabal build
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS=y
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
#- env: BUILD=cabal GHCVER=head CABALVER=head
# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=nightly CABALVER=2.0
addons: {apt: {packages: [libgmp-dev,cabal-install-2.0], sources: [hvr-ghc]}}
#- env: BUILD=cabal GHCVER=head CABALVER=head
# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
# cabal/stack/osx - TODO install cabal-install
# GHC 8.0.1
- env: BUILD=cabal RESOLVER=lts-7.24
os: osx
# GHC 8.0.2
- env: BUILD=stack RESOLVER=lts-9.16
os: osx
allow_failures:
- env: BUILD=stack RESOLVER=nightly CABALVER=2.0
#- env: BUILD=cabal GHCVER=head CABALVER=head
install: true
script:
- |
# Customizable options
PACKAGE_TEST_VER="7fe14f616d05d69de25a46002668a8509b6257a5"
GHC_OPTIONS="-O0 -Werror"
test -n "$COVERALLS" && \
COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines \
--exclude-dir=test test"
# Usually no changes should be needed after this
add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
cabal_env() { test "$BUILD" = cabal && echo $1; }
pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
CURL=$(which curl)
PATH=/bin:/usr/bin
add_path GHCVER ghc
add_path CABALVER cabal
# TRAVIS vars are needed by hpc-coveralls
- env -i
LC_ALL=C.UTF-8
TRAVIS=$TRAVIS
TRAVIS_JOB_ID=$TRAVIS_JOB_ID
PATH=$PATH
BUILD=$BUILD
RESOLVER=$RESOLVER
STACK_UPGRADE=y
STACK_YAML=$STACK_YAML
STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
GHCVER=$GHCVER
GHC_OPTIONS="$GHC_OPTIONS"
COVERALLS_OPTIONS="$COVERALLS_OPTIONS"
CABAL_REINIT_CONFIG=y
TEST_INSTALL=y
$(cabal_env CABALVER=$CABALVER)
$(cabal_env CABAL_CHECK_RELAX=y)
$(cabal_env CABAL_NO_SANDBOX=y)
$(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
/bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))