dependencies:
  override:
    - sudo apt-get update
    - sudo apt-get install -y cmake gfortran bison flex libmuparser-dev liblapack-dev libxml2-dev libboost-math-dev libtbb-dev libnlopt-dev r-base-core
    - sudo apt-get install -y python-dev python-scipy python-matplotlib texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra pandoc
    - pip install matplotlib git+https://github.com/sphinx-doc/sphinx.git numpydoc git+https://github.com/spatialaudio/nbsphinx.git jupyter_client ipython==5.* --user
    - sudo rm -r /opt/circleci/.pyenv
    # keep an eye on swig
    - git clone https://github.com/swig/swig.git
    - cd swig && ./autogen.sh && ./configure --prefix=$HOME/.local --without-alllang && make -j2 && make install
    # use latest hmat-oss
    - git clone https://github.com/jeromerobert/hmat-oss.git
    - cd hmat-oss && cmake -DCMAKE_INSTALL_PREFIX=~/.local . && make install -j2

test:
  override:
    - ./ci_support/build.sh

deployment:
  staging:
    branch: /.*/
    commands:
      - export GH_TOKEN && ./ci_support/upload_github_io.sh
  release:
    tag: /v.*/
    commands:
      - export GH_TOKEN && ./ci_support/upload_github_io.sh
