-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
89 lines (85 loc) · 2.32 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
language: python
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- nightly
- pypy
# Not useable until PyPy 2.6 is available
#- pypy3
env: # Needed to make allow_failures work
matrix:
include:
# We force the python version to get a USC4 built, so pip finds the
# right wheel. See many, many issues on the travis-ci issue tracker
- python: "2.7.13"
env: RUN_CONFORMANCE="y"
- python: "3.6"
env: RUN_CONFORMANCE="y"
- python: "3.6"
env: SDL_VIDEODRIVER=dummy
- python: 2.7
env: FAIL_EXPECTED="-E"
- python: 3.6
env: FAIL_EXPECTED="-E"
allow_failures:
- python: 3.6
env: FAIL_EXPECTED="-E"
- python: 2.7
env: FAIL_EXPECTED="-E"
# We force an overwrite of the virtualenv so we run the tests with the
# pypy from the ppa
before_install:
- |
if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
VPATH=$VIRTUAL_ENV
deactivate
# The old files break pip, so get rid of them
rm -rf $VPATH/lib-python $VPATH/bin
virtualenv -p /usr/bin/pypy $VPATH
source $VPATH/bin/activate
fi
# This is a workaround until setuptools with the fix is standard
if [ "$TRAVIS_PYTHON_VERSION" = "nightly" ]; then
pip install setuptools==38.5.1
fi
install: pip install -e .
script:
- |
if [ -n "$SDL_VIDEODRIVER" ]; then
AUDIODEV=null python -m test
elif [ -z "$RUN_CONFORMANCE" ]; then
# Our test runner doesn't like empty arguments from sh
# so don't quote $FAIL_EXPECTED here.
AUDIODEV=null xvfb-run python -m test $FAIL_EXPECTED
else
# We bounce around a bit so we can run gen_conformance with
# pygame, and test_conformance with pygame_cffi
cd conformance
pip uninstall -y pygame-cffi
pip install pygame
AUDIODEV=null xvfb-run python gen_conformance.py
# Bounce back to pygame-cffi
pip uninstall -y pygame
cd ..
pip install -e .
cd conformance
AUDIODEV=null xvfb-run python test_conformance.py
fi
sudo: false
addons:
apt:
sources:
- pypy
packages:
- libffi-dev
- libjpeg-dev
- libpng-dev
- libsdl-image1.2-dev
- libsdl-mixer1.2-dev
- libsdl-ttf2.0-dev
- libsdl1.2-dev
- pypy
- xvfb