# Travis CI(http://travis-ci.org) configuration file
language: python
python:
  - "2.6"
  - "2.7"
#  - "3.2" Sphinx depends on Pygments, which only supports Python 3.3+
  - "3.3"
  - "3.4"

before_install:
  # Update APT cache data since it may outdated
  - sudo apt-get update

# command to install dependencies, git and python are pre-installed in build box thus are ignored
install:
  # according to Debian control file from Ubuntu 12.04
  - sudo apt-get install rsync gettext
  - pip install sphinx
  
  # Build and install Git Cola's dependency, SIP and PyQt4
  - wget "http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.5/sip-4.16.5.tar.gz"
  - tar xzf sip-4.16.5.tar.gz
  - cd sip-4.16.5
  - python configure.py
  - make -j4
  - sudo make install
  - cd ..
  
  - wget "http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz"
  - tar xzf PyQt-x11-gpl-4.11.3.tar.gz
  - cd PyQt-x11-gpl-4.11.3
  - printf "yes\n" | python configure.py # Configure script requires accepting license
  - make -j4
  - make install
  - cd ..
  
  # Additional dependency for python 2.6
  - pip install argparse

script:
  - make all
  - make doc
#  - make test # Disabled due to issue #404
