forked from fabioz/PyDev.Debugger
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
75 lines (71 loc) · 3.21 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
language: python
matrix:
include:
# Python 2.6 (with and without cython)
- python: 2.6
env: PYDEVD_USE_CYTHON=YES
env: PYDEVD_TEST_JYTHON=NO
- python: 2.6
env: PYDEVD_USE_CYTHON=NO
env: PYDEVD_TEST_JYTHON=NO
# Python 2.7 (with and without cython)
- python: 2.7
env: PYDEVD_USE_CYTHON=YES
env: PYDEVD_TEST_JYTHON=NO
- python: 2.7
env: PYDEVD_USE_CYTHON=NO
env: PYDEVD_TEST_JYTHON=NO
# Python 3.5 (with and without cython)
- python: 3.5
env: PYDEVD_USE_CYTHON=YES
env: PYDEVD_TEST_JYTHON=NO
- python: 3.5
env: PYDEVD_USE_CYTHON=NO
env: PYDEVD_TEST_JYTHON=NO
# Python 3.6 (with and without cython)
- python: 3.6
env: PYDEVD_USE_CYTHON=YES
env: PYDEVD_TEST_JYTHON=NO
- python: 3.6
env: PYDEVD_USE_CYTHON=NO
env: PYDEVD_TEST_JYTHON=NO
# Jython
- python: 2.7
env: PYDEVD_USE_CYTHON=NO
env: PYDEVD_TEST_JYTHON=YES
env: JYTHON_URL=http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar
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=$TRAVIS_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 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:
- if [ "$PYDEVD_TEST_JYTHON" = "NO" ]; then python -m pytest; fi
- if [ "$PYDEVD_TEST_JYTHON" = "YES" ]; then jython -Dpython.path=.:jython_test_deps/ant.jar:jython_test_deps/junit.jar -m pytest; fi