sudo: false

language: python

matrix:
  include:
    - os: linux
      python: "3.6"
      env: PYTHONPATH=$PWD
    - os: linux
      python: "2.7"
      env: PYTHONPATH=$PWD

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test     # For gcc 4.9 and 5
    packages:
      - gcc-4.9
      - g++-4.9
      - gcc-5
      - g++-5

script:
  - flake8 --exclude versioneer.py .
  - python setup.py build_ext --inplace
  - python examples/use_classic.py
  - python examples/use_modernised.py
  - py.test -vs tests/
sudo: false

language: python

matrix:
  include:
    - os: linux
      python: "3.6"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-4.9
            - gcc-4.9
      env:
        - PYTHONPATH=$PWD
        - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"

    - os: linux
      python: "3.6"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
            - gcc-5
      env:
        - PYTHONPATH=$PWD
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

    - os: linux
      python: "3.6"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-6
            - gcc-6
      env:
        - PYTHONPATH=$PWD
        - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
    - os: linux
      python: "3.6"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-7
            - gcc-7
      env:
        - PYTHONPATH=$PWD
        - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
    - os: linux
      python: "3.6"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-8
            - gcc-8
      env:
        - PYTHONPATH=$PWD
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
  

script:
  - flake8 --exclude versioneer.py .
  - python setup.py build_ext --inplace
  - python examples/use_classic.py
  - python examples/use_modernised.py
  - py.test -vs tests/

Enable testing on multiple GCC versions
Enable testing on multiple GCC versions
