|
1 | 1 | language: python |
2 | 2 | python: |
3 | | - - "2.7" |
4 | | - - "3.4" |
| 3 | + - "2.7" |
| 4 | + - "3.2" |
5 | 5 | env: |
6 | | - - QT_API=pyqt4 |
7 | | - - QT_API=pyqt5 |
8 | | - - QT_API=pyqt4 COV=1 |
9 | | - - QT_API=pyqt4 PEP8=1 |
| 6 | + - QT_API=pyqt4 |
| 7 | + - PEP8=1 |
| 8 | + - COV=1 |
10 | 9 | matrix: |
11 | | - allow_failures: |
12 | | - - env: QT_API=pyqt4 COV=1 |
13 | | - - env: QT_API=pyqt4 PEP8=1 |
14 | | - exclude: |
15 | | - - python: "2.7" |
16 | | - env: QT_API=pyqt4 COV=1 |
17 | | - - python: "2.7" |
18 | | - env: QT_API=pyqt4 PEP8=1 |
| 10 | + allow_failures: |
| 11 | + - env: COV=1 |
| 12 | + - env: PEP8=1 |
| 13 | +virtualenv: |
| 14 | + system_site_packages: true |
19 | 15 | before_install: |
20 | | - - "export DISPLAY=:99.0" |
21 | | - - "sh -e /etc/init.d/xvfb start" |
22 | | - - sudo mkdir -p /downloads |
23 | | - - sudo chmod a+rw /downloads |
24 | | - - curl -L -o /downloads/sip.tar.gz http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.7/sip-4.16.7.tar.gz |
25 | | - - curl -L -o /downloads/pyqt4.tar.gz http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz |
26 | | - - curl -L -o /downloads/pyqt5.tar.gz http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4.1/PyQt-gpl-5.4.1.tar.gz |
27 | | - # Builds |
28 | | - - if [ ! -d "/builds" ]; then |
29 | | - sudo mkdir -p /builds; |
30 | | - sudo chmod a+rw /builds; |
31 | | - fi |
| 16 | + - "export DISPLAY=:99.0" |
| 17 | + - "sh -e /etc/init.d/xvfb start" |
32 | 18 | install: |
33 | | - - pip install pytest |
34 | | - - pip install pytest-cov |
35 | | - - pip install pytest-pep8 |
36 | | - # pyqode.qt in dev mode |
37 | | - - git clone https://github.com/pyQode/pyqode.qt.git |
38 | | - - git checkout dev |
39 | | - - pushd pyqode.qt |
40 | | - - pip install -e . |
41 | | - - popd |
42 | | - # pyqode.core in dev mode |
43 | | - - git clone https://github.com/pyQode/pyqode.core.git |
44 | | - - git checkout dev |
45 | | - - pushd pyqode.core |
46 | | - - pip install -e . |
47 | | - - popd |
48 | | - # pyqode.python in dev mode |
49 | | - - pip install -e . |
50 | | - # Qt4 |
51 | | - - sudo apt-get install -y libqt4-dev |
52 | | - # Qt5 |
53 | | - - sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test; |
54 | | - - sudo apt-add-repository -y ppa:beineri/opt-qt541; |
55 | | - - sudo apt-get -qq update; |
56 | | - - sudo apt-get -qq install g++-4.9 libc6-i386 qt54tools qt54svg qt54webkit; |
57 | | - - export CXX="g++-4.9"; |
58 | | - - export CC="gcc-4.9"; |
59 | | - # Builds |
60 | | - - pushd /builds |
61 | | - # SIP |
62 | | - - if [ ! -d "sip-4.16.7" ]; then |
63 | | - tar xzf /downloads/sip.tar.gz --keep-newer-files; |
64 | | - pushd sip-4.16.7; |
65 | | - python configure.py; |
66 | | - make; |
67 | | - popd; |
68 | | - fi |
69 | | - - pushd sip-4.16.7 |
70 | | - - sudo make install |
71 | | - - popd |
72 | | - # PyQt4 |
73 | | - # if not cached and needed, build pyqt4 from source |
74 | | - - if [ "$QT_API" = "pyqt4" ] && [ ! -d "PyQt-x11-gpl-4.11.3" ]; then |
75 | | - tar xzf /downloads/pyqt4.tar.gz --keep-newer-files; |
76 | | - pushd PyQt-x11-gpl-4.11.3; |
77 | | - python configure.py -c --confirm-license --no-designer-plugin -e QtCore -e QtGui -e QtNetwork -e QtTest; |
78 | | - make; |
79 | | - popd; |
80 | | - fi |
81 | | - # install pyqt4 if needed |
82 | | - - if [ "$QT_API" = "pyqt4" ]; then |
83 | | - pushd PyQt-x11-gpl-4.11.3; |
84 | | - sudo make install; |
85 | | - popd; |
86 | | - fi |
87 | | - # if not cached and needed, build pyqt5 from source |
88 | | - - source /opt/qt54/bin/qt54-env.sh |
89 | | - - if [ "$QT_API" = "pyqt5" ] && [ ! -d "PyQt-gpl-5.4.1" ]; then |
90 | | - tar xzf /downloads/pyqt5.tar.gz --keep-newer-files; |
91 | | - pushd PyQt-gpl-5.4.1; |
92 | | - python configure.py -c --confirm-license --no-designer-plugin -e QtCore -e QtGui -e QtWidgets -e QtNetwork -e QtTest; |
93 | | - make; |
94 | | - popd; |
95 | | - fi |
96 | | - # install pyqt5 if needed |
97 | | - - if [ "$QT_API" = "pyqt5" ]; then |
98 | | - pushd PyQt-gpl-5.4.1; |
99 | | - sudo make install; |
100 | | - popd; |
101 | | - fi |
102 | | - # Builds Complete |
103 | | - - popd |
| 19 | + - sudo apt-get install -qq python3-pyqt4 --fix-missing |
| 20 | + - pip install git+https://github.com/pyQode/pyqode.qt.git@dev |
| 21 | + - pip install git+https://github.com/pyQode/pyqode.core.git@dev |
104 | 22 | script: |
105 | | - - if [ $COV ]; then |
106 | | - py.test --cov pyqode test/; |
107 | | - elif [ $PEP8 ]; then |
108 | | - py.test --pep8 -m pep8; |
109 | | - else |
110 | | - py.test; |
111 | | - fi |
| 23 | + - pip install . |
| 24 | + - if [ $QT_API ]; then |
| 25 | + python runtests.py; |
| 26 | + fi |
| 27 | + - if [ $PEP8 ]; then |
| 28 | + pip install pytest-pep8; |
| 29 | + python runtests.py --pep8 -m pep8; |
| 30 | + fi |
| 31 | + - if [ $COV ]; then |
| 32 | + pip install pytest-cov; |
| 33 | + python runtests.py --cov pyqode; |
| 34 | + fi |
112 | 35 | after_script: |
113 | | - - if [ $COV ]; then |
114 | | - pip install --quiet coveralls; |
| 36 | + - if [ $COV ]; then |
| 37 | + sudo pip install --quiet coveralls; |
115 | 38 | coveralls; |
116 | | - fi |
117 | | -cache: |
118 | | - directories: |
119 | | - - /builds |
120 | | - apt: true |
| 39 | + fi |
0 commit comments