deploy:
  provider: s3
  access_key_id: AKIAI5DCW74VHQYKQPAA
  secret_access_key:
    secure: OHa5APTj1t/1Z9oMckolt1uEdd4UlBV/GOs4iuy3egMZQv6W2Y5vshMJAjxF3cuaNBE5HSLDMjckXWUhIAbh67dTAv8dn1VvWkMf8S2qRQOY+Z0YEsBjZVitRpdNpNWus/0+utX5hRMrsYmbniubQyJgUFowZmMDa0BJ4Yb+0U0=
  bucket: stackage-travis
  acl: public_read
  skip_cleanup: true
  local_dir: to-travis
  upload-dir: stackage-server

env:
 - CABALVER=1.20 GHCVER=7.8.4

# Note: the distinction between `before_install` and `install` is not important.
before_install:
 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$PATH

install:
 - cabal --version
 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
 - travis_retry cabal update
 - cabal install alex happy
 - cabal install yesod-bin
 - cabal install --only-dependencies || cabal install --only-dependencies -j1

# 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:
 - yesod keter
 - mkdir -p to-travis
 - mv stackage-server.keter to-travis
 - mv dist/build/cabal-loader-stackage/cabal-loader-stackage .
 - strip cabal-loader-stackage
 - bzip2 cabal-loader-stackage
 - mv cabal-loader-stackage.bz2 to-travis
