version: 2

jobs:
  python3:
    docker:
      - image: circleci/python:3.6.1
    steps:
      - checkout
      - run:
          command: |
            wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
            chmod +x miniconda.sh && ./miniconda.sh -b -p ~/miniconda
            export PATH="~/miniconda/bin:$PATH"
            conda update --yes --quiet conda
            conda create -n testenv --yes --quiet python=3
            source activate testenv
            conda install --yes pip numpy scipy scikit-learn matplotlib sphinx sphinx_rtd_theme numpydoc pillow
            pip install sphinx-gallery
            pip install .
            cd doc
            make html
      - store_artifacts:
          path: doc/_build/html
          destination: doc
      - store_artifacts:
          path: ~/log.txt
      - persist_to_workspace:
          root: doc/_build/html
          paths: .
      - attach_workspace:
          at: doc/_build/html
      - run: ls -ltrh doc/_build/html
    filters:
      branches:
        ignore: gh-pages

workflows:
  version: 2
  build-doc-and-deploy:
    jobs:
      - python3

version: 2

jobs:
  python3:
    docker:
      - image: circleci/python:3.6.1
    steps:
      - checkout
      - run:
          command: |
            wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
            chmod +x miniconda.sh && ./miniconda.sh -b -p ~/miniconda
            export PATH="~/miniconda/bin:$PATH"
            conda update --yes --quiet conda
            conda create -n testenv --yes --quiet python=3
            source activate testenv
            conda install --yes pip numpy scipy scikit-learn matplotlib sphinx sphinx_rtd_theme numpydoc pillow cython nomkl
            pip install sphinx-gallery
            pip install .
            cd doc
            make html
      - store_artifacts:
          path: doc/_build/html
          destination: doc
      - store_artifacts:
          path: ~/log.txt
      - persist_to_workspace:
          root: doc/_build/html
          paths: .
      - attach_workspace:
          at: doc/_build/html
      - run: ls -ltrh doc/_build/html
    filters:
      branches:
        ignore: gh-pages

workflows:
  version: 2
  build-doc-and-deploy:
    jobs:
      - python3

Add cython to Circle CI
Add cython to Circle CI
