# This is the complex Travis configuration, which is intended for use # on open source libraries which need compatibility across multiple GHC # versions, must work with cabal-install, and should be # cross-platform. For more information and other options, see: # # https://docs.haskellstack.org/en/stable/travis_ci/ # # Copy these contents into the root directory of your Github project in a file # named .travis.yml # Run jobs on Linux unless "os" is specified explicitly. os: linux # Do not choose a language; we provide our own build tools. language: generic # Caching so the next build will be fast too. cache: directories: - $HOME/.ghc - $HOME/.cabal - $HOME/.stack jobs: include: - env: BUILD=stack ARGS="--resolver lts-13.26" compiler: ": #stack 8.6.5" addons: {apt: {packages: [libgmp-dev]}} python: 3.7 # Travis includes an macOS which is incompatible with GHC 7.8.4 #- env: BUILD=stack ARGS="--resolver lts-2" - env: BUILD=stack ARGS="--resolver lts-13.26" compiler: ": #stack 8.6.5 osx" os: osx python: 3.7 allow_failures: - env: BUILD=cabal GHCVER=head CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7 - env: BUILD=stack ARGS="--resolver nightly" before_install: # Using compiler above sets CC to an invalid value, so unset it - unset CC # We want to always allow newer versions of packages when building on GHC HEAD - CABALARGS="" - if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi # Download and unpack the stack executable - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH - mkdir -p ~/.local/bin - | if [ `uname` = "Darwin" ] then travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin else travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' fi # Use the more reliable S3 mirror of Hackage mkdir -p $HOME/.cabal echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config script: - | set -ex stack --no-terminal build stack --no-terminal install set +ex before_deploy: - source ./travis-env.sh - bash ./ci-passing.sh - git tag $RELEASE_TAG deploy: provider: releases api_key: $GITHUB_TOKEN file: $ZIP_FILE skip_cleanup: true draft: true after_deploy: - ./pspy-blueprint || echo "done"