packages feed

lens-regex-0.1.0: .travis.yml

language: haskell

env:
  matrix:
    - GHCVER=7.4.2
    - GHCVER=7.6.3
    - GHCVER=7.8.4
    - GHCVER=7.10.1
    - GHCVER=head

matrix:
  allow_failures:
    - env: GHCVER=head

before_install:
  - |
    if [ $GHCVER = `ghc --numeric-version` ]; then
      echo "use system ghc: `which ghc` `ghc --numeric-version`"
    else
      travis_retry sudo add-apt-repository -y ppa:hvr/ghc
      travis_retry sudo apt-get update
      travis_retry sudo apt-get install  -y --force-yes cabal-install-1.22 ghc-$GHCVER
      export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH
      echo "use ppa:hvr/ghc: `which ghc` `ghc --numeric-version`"
    fi

install:
  - export PATH=$HOME/.cabal/bin:$PATH
  - which cabal
  - travis_retry cabal update
  - cabal install --only-dependencies --enable-tests
  - ghc-pkg list

script:
  - which cabal
  - cabal configure --enable-tests -fbuild-samples
  - cabal build
  - cabal test --show-details=always

  # tests source distribution package
  - cabal sdist
  - |
    PKGNAME="$(cabal info . | awk '/^\*/{print $2}')"
    SRCTGZ="${PKGNAME}.tar.gz"
    cd dist/
    if [ -f "$SRCTGZ" ]; then
      tar xvzf "$SRCTGZ"
      cd "$PKGNAME"
      NG=$(git ls-tree HEAD --full-tree -r | while read perm blob hash name; do [ -e "$name" ] || echo NG "$name"; done)
      if [ -n "$NG" ]; then
        echo "Missing files:"
        echo $NG
        exit 1
      fi
    fi