forked from pygame/pygame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
151 lines (138 loc) · 6.61 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
language: python
cache:
directories:
- $HOME/.cache/pip
- $HOME/Library/Caches/pip/wheels
- /Library/Caches/pip/wheels
- $HOME/.conan/
# So commits do not get built twice.
# Only test master and tagged releases on push
# always test things that aren't pushes (like PRs)
if: type != push OR branch = master OR branch =~ /^\d+\.\d+(\.\d+)?(-\S*)?$/ OR tag ~= /^\d+\.\d+(\.\d+)?(.\S*)?$/
jobs:
include:
- python: 2.7
- python: 3.5
name: SDL 1.2
env:
- WHICH_SDL_BUILD=-sdl1
- python: 3.6
- python: 3.8
- python: 3.9-dev
- os: linux-ppc64le
python: 3.7
arch: ppc64le
env:
- PPC=yes
- os: linux
python: 3.7
arch: arm64
env:
- ARM64=yes
- os: linux
python: 3.7
arch: s390x
- os: linux
python: 3.7
name: manylinux x86/amd64 python 2.7, 3.4-3.8.
env:
- MANYLINUX_WHL=yes
- UPLOAD_WHL_PYPI=yes
- UPLOAD_SDIST_PYPI=yes
- GITHUB_UPLOAD=yes
- PYTHON_EXE=python3
services:
- docker
- os: osx
language: shell
env:
- GITHUB_UPLOAD=yes
- UPLOAD_WHL_PYPI=yes
allow_failures:
- arch: s390x
# - python: pypy
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get update
sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev \
libsdl-ttf2.0-dev libsdl1.2-dev python-numpy libportmidi-dev libjpeg-dev \
libtiff5-dev libx11-6 libx11-dev xfonts-base xfonts-100dpi xfonts-75dpi \
xfonts-cyrillic fluid-soundfont-gm musescore-soundfont-gm \
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
fi
install:
- $(set | grep PYPI_ | python -c "import sys;print('\n'.join(['unset %s' % l.split('=')[0] for l in sys.stdin.readlines() if l.startswith('PYPI')]))")
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
PYTHON_EXE=python PIP_CMD=pip
$PIP_CMD install --upgrade pip
$PIP_CMD install --upgrade numpy
$PYTHON_EXE setup.py -config -auto $WHICH_SDL_BUILD
$PYTHON_EXE setup.py install -pygame-ci -noheaders
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ -n "$TRAVIS_TAG" ]]; then
PYTHON_EXE=python3 PIP_CMD="python3 -m pip"
$PIP_CMD install --upgrade pip
$PIP_CMD install conan
$PIP_CMD install cibuildwheel==1.3.0
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
conan remote add pygame-repo https://api.bintray.com/conan/pygame/pygame
# $PYTHON_EXE buildconfig/config.py -conan --build libtiff --build opusfile --build sdl2_image --build sdl2_ttf
$PYTHON_EXE buildconfig/config.py -conan --build
cp build/conan/*.dylib .
fi
- if [[ "$MANYLINUX_WHL" == "yes" ]]; then source buildconfig/ci/travis/.travis_linux_build_wheels.sh; fi
env:
global:
- SDL_VIDEODRIVER=dummy
- SDL_AUDIODRIVER=disk
- secure: "VSoeDwpTooSW8K+n2e+nhQOQGQT7PX9GVBF9SmADUIg0Gr5pR2MTlzyGms57tBIYqFndiuLhOXi5zkH2uhMW0mq2VEDRjY4EP12coMWOnwZsdF8Qoj8x39YPR6QSS28Op6g/DLT5DszchwBlpSXHUJEL0/2iw/5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5ASO58dXLw9EvqS4CsRYI08ltH85L/cq37dKgpvu33lsx1ZDksiMKtZW7tXhV1DZ9thl1JH/3f9QLRFz+02mJ6FD4PCJRYQvDDs5J4j7rf76FUlcBr+9bAN0sRnPL6UOms="
- CIBW_TEST_COMMAND="python -m pygame.tests.__main__ -v --exclude opengl --time_out 300"
- CIBW_BEFORE_BUILD="pip install numpy"
# skip pypy builds with cibuildwheel
- CIBW_SKIP="pp*"
script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ -n "$TRAVIS_TAG" ]]; then
source build/conan/activate_run.sh
$PYTHON_EXE -m cibuildwheel --output-dir dist
$PYTHON_EXE buildconfig/ci/travis/.travis_osx_rename_whl.py
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
$(set | grep PYPI_ | python -c "import sys;print('\n'.join(['unset %s' % l.split('=')[0] for l in sys.stdin.readlines() if l.startswith('PYPI')]))")
$PYTHON_EXE -m pygame.tests.__main__ -v --exclude opengl --time_out 300
fi
# Upload dist/*.whl to pypi on tags.
after_success:
- |
if [[ "${UPLOAD_WHL_PYPI}" = "yes" ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] && [[ -n "${TRAVIS_TAG}" ]]; then
$PYTHON_EXE -m pip install twine
$PYTHON_EXE -m twine upload dist/*.whl
fi
- |
if [[ "${UPLOAD_SDIST_PYPI}" = "yes" ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] && [[ -n "${TRAVIS_TAG}" ]]; then
$PYTHON_EXE -m pip install twine
$PYTHON_EXE -m twine upload dist/*.tar.gz
fi
deploy:
# https://docs.travis-ci.com/user/deployment/releases/
- provider: releases
api_key:
secure: MzyOmZ6HU16YGuiT66kuTDeGO7Ue+fKCf7HBztuxiHGyVVYdYpDgMIgEKqZ7vAQy9KfdXMzlGkwGesMnOm+i6eU0/USG19yP11ABWJhXe7mv0sGXvQpbMnARARyj73+bSZuNfXrYWOQI9R87LIGqFC3ZEKSgdNdaUQevwW5VG0tEHIeA1FUEL9OTDKsK1KdiG8dwhABZRoC4zak200DwD+1wVyBNSmVBNRa9qRuDeN/MTguqWNLyh1vXSYGB1sl2j0YVWz3uvn/Og0f9tZjcYTZ8/l38Qqvs5EPWmTm8WEtrbYFbPcoctiz1HfQ7ZWi9exJXnNVjguUknJfIsUERZKhqLzR961WI/NRaWtTvKd6RcTYERr+BfvP5nbKryEiifTJKP3OUMKzMAhPPxCp8WPk02lnDAjaxUg6TZ8/lzt6ntDfSfM/50vsN/BRInXU6G4sNb6feklFSpgoqatSKk45V+7jXnCXMmiPbSAdYAcZn/PllFdob7wYOfOED2ynKubZiSI1fRQTdMsUZP0H1Ax5zQpUtEbaXnD1DQRv+UlE0TyQxV4w2D8ZAFKBPxOqDKzODCbJ7fVvUR0SSO0+a8w2rWp2h3MIs+HGDdYII28cM1CHRyqnlMjo6o9eEd/Wi/f5hoL5RkN8OuLUHBLp4mC2D69XI8XzHreigqs1lJgg=
file_glob: true
file:
- dist/*.whl
skip_cleanup: true
draft: true
on:
all_branches: true
# branches:
# only:
# - master
tags: true
repo: pygame/pygame
condition: $GITHUB_UPLOAD = yes