language: python
python:
    - "2.7"
    - "3.3"
    - "3.4"
    - "3.5"
    - "3.5-dev"
    - "nightly"
    - "pypy"
    - "pypy3"
matrix:
    allow_failures:
        - python: "3.5-dev"
        - python: "nightly"
        - python: "pypy3"
    fast_finish: true
install:
    - uname -a
    - sudo apt-get update -qq
    - sudo apt-get install -qq curl libncurses5 libc6 wget

    # We need protobuf compiler 2.6+, 2.4 produces Python files incompatible
    # with Python 3
    #
    - sudo sh -c "echo deb http://archive.ubuntu.com/ubuntu vivid main >> /etc/apt/sources.list"
    - sudo apt-get update -qq
    - sudo apt-get install -qq protobuf-compiler libprotobuf-dev

    - sudo wget https://raw.github.com/smarkets/piqi-binary/master/Linux-x86_64/piqi -O /usr/bin/piqi
    - sudo chmod +x /usr/bin/piqi
    - pip install --upgrade https://bitbucket.org/logilab/astroid/get/5ed6266cab78.zip
    - pip install -r requirements.txt
    - python setup.py build
script: make test && make check

language: python
python:
    - "2.7"
    - "3.3"
    - "3.4"
    - "3.5"
    - "3.5-dev"
    - "nightly"
    - "pypy"
    - "pypy3"
matrix:
    allow_failures:
        - python: "3.5-dev"
        - python: "nightly"
        - python: "pypy3"
    fast_finish: true
install:
    - uname -a
    - sudo apt-get update -qq
    - sudo apt-get install -qq curl libncurses5 libc6 wget

    # We need protobuf compiler 2.6+, 2.4 produces Python files incompatible
    # with Python 3
    #
    - sudo sh -c "echo deb http://archive.ubuntu.com/ubuntu xenial main >> /etc/apt/sources.list"
    - sudo apt-get update -qq
    - sudo apt-get install -qq protobuf-compiler libprotobuf-dev

    - sudo wget https://raw.github.com/smarkets/piqi-binary/master/Linux-x86_64/piqi -O /usr/bin/piqi
    - sudo chmod +x /usr/bin/piqi
    - pip install --upgrade https://bitbucket.org/logilab/astroid/get/5ed6266cab78.zip
    - pip install -r requirements.txt
    - python setup.py build
script: make test && make check

Use xenial to get up-to-date protobuf on ci
Use xenial to get up-to-date protobuf on ci

CI seems to run on a very old ubuntu image and we pick
a more recent protobuf compiler from the "future" or else
the generated code is not compatible with python 3. The
problem is that "vivid" is no longer supported...
