# explicitly request container-based infrastructure
sudo: false

matrix:
  include:
  - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
    addons:
      apt:
        sources:
        - hvr-ghc
        packages:
        - ghc-7.8.4
  - env: GHCVER=7.10.2 STACK_YAML=stack.yaml
    addons:
      apt:
        sources:
        - hvr-ghc
        packages:
        - ghc-7.10.2
  - env: GHCVER=head STACK_YAML=stack-head.yaml
    addons:
      apt:
        sources:
        - hvr-ghc
        packages:
        - ghc-head
  allow_failures:
    - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
    - env: GHCVER=head STACK_YAML=stack-head.yaml

cache:
  directories:
  - $HOME/.stack/

before_install:
  # ghc
  - export PATH=/opt/ghc/$GHCVER/bin:$PATH
  # stack
  - mkdir -p ~/.local/bin
  - export PATH=~/.local/bin:$PATH
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

install:
  - stack --no-terminal --skip-ghc-check setup
  - stack --no-terminal --skip-ghc-check test --only-snapshot

script:
  - stack --no-terminal --skip-ghc-check test

# explicitly request container-based infrastructure
sudo: false

matrix:
  include:
  - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
    addons:
      apt:
        sources:
        - hvr-ghc
        packages:
        - ghc-7.8.4
  - env: GHCVER=7.10.2 STACK_YAML=stack.yaml
    addons:
      apt:
        sources:
        - hvr-ghc
        packages:
        - ghc-7.10.2
  - env: GHCVER=head STACK_YAML=stack-head.yaml
    addons:
      apt:
        sources:
        - hvr-ghc
        packages:
        - ghc-head
  allow_failures:
    - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
    - env: GHCVER=head STACK_YAML=stack-head.yaml

cache:
  directories:
  - $HOME/.stack/

before_install:
  # ghc
  - export PATH=/opt/ghc/$GHCVER/bin:$PATH
  # stack
  - mkdir -p ~/.local/bin
  - export PATH=~/.local/bin:$PATH
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

install:
  - stack --no-terminal --skip-ghc-check setup
  - stack --no-terminal --skip-ghc-check test --only-snapshot

script:
  - stack --no-terminal --skip-ghc-check test --pedantic

Build and test with --pedantic on CI
Build and test with --pedantic on CI
