version: 2
jobs:
  build:
    docker:
      - image: ubuntu:14.04
      - image: redis:5.0.5-alpine

    working_directory: ~/webdis

    steps:
      - checkout

      # Build & run
      - run: |
          apt-get -y update &&
          apt-get -y upgrade &&
          apt-get -y --force-yes install wget make gcc libevent-dev libmsgpack-dev &&
          make &&
          sed -i -e 's/"daemonize":.*false,/"daemonize": true,/g' webdis.json &&
          ./webdis webdis.json

      # Run tests
      - run: |
          mkdir /tmp/artifacts &&
          ./tests/basic.py 2>&1 > /tmp/artifacts/test-out.txt 

      # Save artifacts
      - store_artifacts:
          path: /tmp/artifacts
          destination: build

workflows:
  version: 2
  build:
    jobs:
      - build

version: 2
jobs:
  build:
    docker:
      - image: ubuntu:14.04
      - image: redis:5.0.5-alpine

    working_directory: ~/webdis

    steps:
      - checkout

      # Build & run
      - run: |
          apt-get -y update &&
          apt-get -y upgrade &&
          apt-get -y --force-yes install wget make gcc libevent-dev libmsgpack-dev python2.7 &&
          ln -s /usr/bin/python2.7 /usr/bin/python &&
          make &&
          sed -i -e 's/"daemonize":.*false,/"daemonize": true,/g' webdis.json &&
          ./webdis webdis.json

      # Run tests
      - run: |
          mkdir /tmp/artifacts &&
          ./tests/basic.py 2>&1 > /tmp/artifacts/test-out.txt 

      # Save artifacts
      - store_artifacts:
          path: /tmp/artifacts
          destination: build

workflows:
  version: 2
  build:
    jobs:
      - build

Install Python 2.7 in Circle CI image
Install Python 2.7 in Circle CI image
