language: python
python:
  - "3.5"
  - "3.6"
# command to install dependencies
sudo: enabled
dist: trusty
group: travis_lts
addons:
  apt:
    packages:
      - gcc
      - gfortran
      - g++
      - libgtest-dev
      - cmake
      - git
install:
  - wget https://repo.continuum.io/miniconda/Miniconda3-4.3.30-Linux-x86_64.sh -O miniconda.sh
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  # Useful for debugging any issues with conda
  - conda info -a
  # Replace dep1 dep2 ... with your dependencies
  - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
  - source activate test-environment
  - conda install coverage
  - conda install numpy
  - conda install numba
  - conda install scipy
  - conda install pandas
  - conda install scikit-learn
  - conda install cython
  - conda install -c conda-forge arrow
  - pip install simpleutils
  - pip install coveralls
  - pip install finance-python
  - export CWD=$PWD
  - cd /usr/src/gtest
  - sudo cmake CMakeLists.txt
  - sudo make
  - sudo cp *.a /usr/lib
  - cd $CWD
script:
  - cd alphamind/pfopt
  - git submodule init
  - git submodule update
  - cd ../..
  - bash build_linux_dependencies.sh
  - export NUMBA_DISABLE_JIT=1
  - export LD_LIBRARY_PATH="$PWD/alphamind/pfopt/lib:$LD_LIBRARY_PATH"
  - python setup.py build_ext --inplace
  - coverage run alphamind/tests/test_suite.py
  - coverage report
  - coverage html
after_success:
  - coveralls
