# https://docs.haskellstack.org/en/stable/travis_ci/

dist: bionic
language: generic
cache:
  directories:
  - $HOME/.local/bin
  - $HOME/.stack
  - $TRAVIS_BUILD_DIR/.stack-work

addons:
  apt:
    update: true
    packages:
      - libgmp-dev
      - llvm-8-tools

jobs:
  include:
    - stage: Install Stack
      script:
        - export DIR=~/.local/bin
        - if [ ! -d "$DIR" ]; then mkdir -p ~/.local/bin; fi
        - export PATH=$HOME/.local/bin:$PATH
        - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
        - stack setup
    - stage: Build
      script:
        - export PATH=$HOME/.local/bin:/usr/lib/llvm-7/bin:$PATH
        - make
    - stage: Test
      script:
        - export PATH=$HOME/.local/bin:/usr/lib/llvm-7/bin:$PATH
        - make libdex
        - stack install
        - make tests

# https://docs.haskellstack.org/en/stable/travis_ci/

dist: bionic
language: generic
cache:
  directories:
  - $HOME/.local/bin
  - $HOME/.stack
  - $TRAVIS_BUILD_DIR/.stack-work

addons:
  apt:
    update: true
    packages:
      - libgmp-dev
      - llvm-8-tools
      - python3-numpy
jobs:
  include:
    - stage: Install Stack
      script:
        - export DIR=~/.local/bin
        - if [ ! -d "$DIR" ]; then mkdir -p ~/.local/bin; fi
        - export PATH=$HOME/.local/bin:$PATH
        - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
        - stack setup
    - stage: Build
      script:
        - export PATH=$HOME/.local/bin:/usr/lib/llvm-7/bin:$PATH
        - make
    - stage: Test
      script:
        - export PATH=$HOME/.local/bin:/usr/lib/llvm-7/bin:$PATH
        - make libdex
        - stack install
        - make tests

Add NumPy to Travis file.
Add NumPy to Travis file.
