version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.5.4

    steps:
      - checkout

      - restore_cache:
          keys:
            - cmake
          paths:
            - ~/cmake-3.6.2-Linux-x86_64

      - run:
          name: Install cmake
          command: |
            if [ ! -d ~/cmake-3.6.2-Linux-x86_64 ]; then
              echo "Not found CMake!"
              cd ~ && wget --quiet https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz && tar -xvf cmake-3.6.2-Linux-x86_64.tar.gz
            else
              echo "CMake found"
            fi

      - run: echo 'export PATH="~/cmake-3.6.2-Linux-x86_64/bin:$PATH"' >> ~/.bashrc; source ~/.bashrc; cmake --version

      - save_cache:
          key: cmake
          paths:
            - ~/cmake-3.6.2-Linux-x86_64


      - run: python3 -m venv py3

      - run: 
          command: |
            . py3/bin/activate
            pip install -r ./requirements.txt
            python setup.py build
            tox


version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.5.4

    steps:
      - checkout

      - restore_cache:
          keys:
            - cmake
          paths:
            - ~/cmake-3.6.2-Linux-x86_64

      - run:
          name: Install cmake
          command: |
            if [ ! -d ~/cmake-3.6.2-Linux-x86_64 ]; then
              echo "Not found CMake!"
              cd ~ && wget --quiet https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz && tar -xvf cmake-3.6.2-Linux-x86_64.tar.gz
            else
              echo "CMake found"
            fi

      - run: ls ~
      - run: ls ~/cmake-3.6.2-Linux-x86_64/bin
      - run: echo 'export PATH="~/cmake-3.6.2-Linux-x86_64/bin:$PATH"' >> ~/.bashrc; source ~/.bashrc;
      - run: cat ~/.bashrc

      - save_cache:
          key: cmake
          paths:
            - ~/cmake-3.6.2-Linux-x86_64


      - run: python3 -m venv py3

      - run: 
          command: |
            . py3/bin/activate
            pip install -r ./requirements.txt
            python setup.py build
            tox


Add log in ci process
Add log in ci process
