forked from fabioz/PyDev.Debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (105 loc) · 4.59 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: python
matrix:
include:
# Note: python is always 2.7 because it's the installed version
# in the travis system (so, faster to startup).
# We'll always use conda later on anyways to get what we want.
# Note: some envs commented out to have a faster test suite.
# Jython
- python: 2.7
env:
- PYDEVD_USE_CYTHON=NO
- PYDEVD_TEST_JYTHON=YES
- JYTHON_URL=http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar
# Python 2.6 (with and without cython)
- python: 2.7
env:
- PYDEVD_PYTHON_VERSION=2.6
- PYDEVD_USE_CYTHON=NO
- PYDEVD_TEST_JYTHON=NO
# - python: 2.7
# env:
# - PYDEVD_PYTHON_VERSION=2.6
# - PYDEVD_USE_CYTHON=YES
# - PYDEVD_TEST_JYTHON=NO
# Python 2.7 (with and without cython)
- python: 2.7
env:
- PYDEVD_PYTHON_VERSION=2.7
- PYDEVD_USE_CYTHON=NO
- PYDEVD_TEST_JYTHON=NO
- python: 2.7
env:
- PYDEVD_PYTHON_VERSION=2.7
- PYDEVD_USE_CYTHON=YES
- PYDEVD_TEST_JYTHON=NO
# Python 3.5 (with and without cython)
# - python: 2.7
# env:
# - PYDEVD_PYTHON_VERSION=3.5
# - PYDEVD_USE_CYTHON=NO
# - PYDEVD_TEST_JYTHON=NO
- python: 2.7
env:
- PYDEVD_PYTHON_VERSION=3.5
- PYDEVD_USE_CYTHON=YES
- PYDEVD_TEST_JYTHON=NO
# Python 3.6 (with and without cython)
# - python: 2.7
# env:
# - PYDEVD_PYTHON_VERSION=3.6
# - PYDEVD_USE_CYTHON=NO
# - PYDEVD_TEST_JYTHON=NO
- python: 2.7
env:
- PYDEVD_PYTHON_VERSION=3.6
- PYDEVD_USE_CYTHON=YES
- PYDEVD_TEST_JYTHON=NO
# Python 3.7 (with and without cython)
- python: 2.7
env:
- PYDEVD_PYTHON_VERSION=3.7
- PYDEVD_USE_CYTHON=NO
- PYDEVD_TEST_JYTHON=NO
# - python: 2.7
# env:
# - PYDEVD_PYTHON_VERSION=3.7
# - PYDEVD_USE_CYTHON=YES
# - PYDEVD_TEST_JYTHON=NO
before_install:
# CPython setup
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then chmod +x miniconda.sh; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then ./miniconda.sh -b; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then export PATH=/home/travis/miniconda2/bin:$PATH; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then conda update --yes conda; fi
# Jython setup
- if [ "$PYDEVD_TEST_JYTHON" == "YES" ]; then wget $JYTHON_URL -O jython_installer.jar; java -jar jython_installer.jar -s -d $HOME/jython; export PATH=$HOME/jython:$HOME/jython/bin:$PATH; fi
- if [ "$PYDEVD_TEST_JYTHON" == "YES" ]; then jython -c "print('')"; fi
# The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
- sudo rm -rf /dev/shm
- sudo ln -s /run/shm /dev/shm
# Fix issue with testGui
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# Install packages
install:
# Both
- export PYTHONPATH=.
# Python setup
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then conda create --yes -n build_env python=$PYDEVD_PYTHON_VERSION; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then source activate build_env; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then chmod +x ./.travis_install_python_deps.sh; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then ./.travis_install_python_deps.sh; fi
- if [ "$PYDEVD_TEST_JYTHON" == "NO" ]; then source activate build_env; python build_tools/build.py; fi
# Jython setup
- if [ "$PYDEVD_TEST_JYTHON" == "YES" ]; then chmod +x ./.travis_install_jython_deps.sh; fi
- if [ "$PYDEVD_TEST_JYTHON" == "YES" ]; then ./.travis_install_jython_deps.sh; fi
# Run test
# On local machine with jython: c:\bin\jython2.7.0\bin\jython.exe -Dpython.path=.;jython_test_deps/ant.jar;jython_test_deps/junit.jar -m pytest
# On remove machine with python: c:\bin\python27\python.exe -m pytest
script:
# pytest-xdist not available for python == 2.6 and timing out without output with 2.7
- if [[ ("$PYDEVD_TEST_JYTHON" == "NO") && ("$PYDEVD_PYTHON_VERSION" == "2.6" || "$PYDEVD_PYTHON_VERSION" == "2.7") ]]; then source activate build_env; python -m pytest; fi
- if [[ ("$PYDEVD_TEST_JYTHON" == "NO") && ("$PYDEVD_PYTHON_VERSION" != "2.6" && "$PYDEVD_PYTHON_VERSION" != "2.7") ]]; then source activate build_env; python -m pytest -n auto; fi
- if [ "$PYDEVD_TEST_JYTHON" == "YES" ]; then jython -Dpython.path=.:jython_test_deps/ant.jar:jython_test_deps/junit.jar -m pytest; fi