.travis.yml 2.14 KB
Newer Older
1
language: python
2 3 4 5
branches:
  only:
    - master
    - testing
6 7
python:
  - "2.7"
8 9 10 11 12
  - "2.7_with_system_site_packages"
  - "3.2"
  - "3.2_with_system_site_packages"
  - "3.3"
  - "3.4"
13 14
#  - "pypy"
#  - "pypy3"
15
before_install:
16
  - sudo apt-get update -qq
17 18
  # python-cvxopt package is only available for Python 2.7, so in every other
  # case the build dependencies of cvxopt are installed
19 20 21 22
  # Optional CVXOPT dependencies are: libatlas-base-dev libgsl0-dev fftw-dev libglpk-dev libdsdp-dev
  # However, flags need to be set in the cvxopt/setup.py script which we don't
  # alter with the current setup
  - if [[ $TRAVIS_PYTHON_VERSION != "2.7_with_system_site_packages" ]]; then sudo apt-get install -qq gcc liblapack-dev; fi
23 24
  # SciPy and NumPy compilation needs a fortran compiler, so if we aren't using
  # sytem site packages then gfortran is installed first
25
  - if [[ $TRAVIS_PYTHON_VERSION != *"with_system_site_packages" ]]; then sudo apt-get install -qq gfortran; fi
26 27 28 29
  # if using system site packages then numpy, scipy and cvxopt can be installed
  # with apt-get
  - if [[ $TRAVIS_PYTHON_VERSION == "2.7_with_system_site_packages" ]]; then sudo apt-get install -qq python-numpy python-scipy python-cvxopt; fi
  # There is no python3-cvxopt package, so it will be built by pip install
30
  - if [[ $TRAVIS_PYTHON_VERSION == "3.2_with_system_site_packages" ]]; then sudo apt-get install -qq python3-numpy python3-scipy; fi
31
  # Do test coverage report using coveralls
32 33
  - echo -e "[report]\nomit =\n    */python?.?/*\n    */site-packages/nose/*" > .coveragerc
  - pip install coveralls
34
install:
35 36
  # If we aren't using system site packages then install everything from latest
  # version that pip knows about using upgrade flag
37
  - if [[ $TRAVIS_PYTHON_VERSION != *"with_system_site_packages" ]]; then pip install --upgrade "file://$PWD#egg=pymdptoolbox[LP]"; fi
38 39
  # If we are using system site packages then numpy/scipy/cvxopt won't be
  # installed if there is a version already available
40
  - if [[ $TRAVIS_PYTHON_VERSION == *"with_system_site_packages" ]]; then pip install "file://$PWD#egg=pymdptoolbox[LP]"; fi
41
# command to run tests
42
script:
43
  ./runtests.sh
44 45
after_success:
  coveralls