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/.stack

# Ensure necessary system libraries are present
addons:
  apt:
    packages:
      - libgmp-dev

before_install:
  - mkdir -p ~/.local/bin
  - export PATH=$HOME/.local/bin:$PATH
  - export STACK="stack --no-terminal --install-ghc"

install:
  # Download and unpack the stack executable
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64
    | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

script:
  # Build the package, its tests, and its docs and run the tests
  - test/script

jobs:
  include:
    - compiler: GHC 8.6
    # - compiler: GHC 8.4
    #   env: STACK_YAML="ghc-8.4.yaml"
    # - compiler: GHC 8.2
    #   env: STACK_YAML="ghc-8.2.yaml"
    # - compiler: GHC 8.0
    #   env: STACK_YAML="ghc-8.0.yaml"
    # - compiler: GHC 7.10
    #   env: STACK_YAML="ghc-7.10.yaml"
    - name: haddock
      script: $STACK haddock
    - name: hlint
      script: $STACK build hlint --exec 'hlint .'

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/.stack

# Ensure necessary system libraries are present
addons:
  apt:
    packages:
      - libgmp-dev

before_install:
  - mkdir -p ~/.local/bin
  - export PATH=$HOME/.local/bin:$PATH
  - export STACK="stack --no-terminal --install-ghc"

install:
  # Download and unpack the stack executable
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64
    | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

jobs:
  include:
    - {name: build and test everything, script: test/script}
    - {name: haddock, script: $STACK haddock}
    - {name: hlint, script: $STACK build hlint --exec 'hlint .'}

Update Travis config after GHC support drop
Update Travis config after GHC support drop
