forked from pygame/pygame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
194 lines (173 loc) · 7.97 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
os: linux
dist: bionic # focal
language: python
cache:
directories:
- $HOME/.cache/pip
- $HOME/Library/Caches/pip/wheels
- /Library/Caches/pip/wheels
# 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 = main OR branch =~ /^\d+\.\d+(\.\d+)?(-\S*)?$/ OR tag ~= /^\d+\.\d+(\.\d+)?(.\S*)?$/
jobs:
include:
# - python: 3.6
# name: SDL 1.2
# env:
# - WHICH_SDL_BUILD=-sdl1
# enable ppc64le closer to release, it is slow.
# - os: linux-ppc64le
# python: 3.8
# arch: ppc64le
# env:
# - PPC=yes
- os: linux
name: arm64 sdist
dist: xenial
python: 3.8
arch: arm64
env:
- ARM64=yes
- UPLOAD_SDIST_PYPI=yes
- GITHUB_UPLOAD=yes
- RUN_SDIST=yes
# enable s390x closer to release, it is slow.
# - os: linux
# python: 3.7
# arch: s390x
# - os: linux
# python: 3.7
# name: manylinux x86/amd64 python 2.7, 3.4-3.9.
# env:
# - MANYLINUX_WHL=yes
# - UPLOAD_WHL_PYPI=yes
# - GITHUB_UPLOAD=yes
# - PYTHON_EXE=python3
# services:
# - docker
# - os: osx
# language: shell
# env:
# - GITHUB_UPLOAD=yes
# - UPLOAD_WHL_PYPI=yes
# cache:
# directories:
# - $HOME/.conan/data
# only run this on tag posts. We need two mac builds for mac wheels when doing pypy.
# - os: osx
# name: mac pypy only
# if: tag ~= /^\d+\.\d+(\.\d+)?(.\S*)?$/
# language: shell
# env:
# - GITHUB_UPLOAD=yes
# - UPLOAD_WHL_PYPI=yes
# - PYPYONLY=yes
# cache:
# directories:
# - $HOME/.conan/data
# allow_failures:
# - arch: s390x
# - python: pypy
allow_failures:
- arch: arm64
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$WHICH_SDL_BUILD" == "-sdl1" ]] && [[ "$MANYLINUX_WHL" != "yes" ]]; 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 timgm6mb-soundfont
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$WHICH_SDL_BUILD" != "-sdl1" ]] && [[ "$MANYLINUX_WHL" != "yes" ]]; then
sudo apt-get update
sudo apt-get install python-dev python-numpy libportmidi-dev libjpeg-dev \
libtiff5-dev libx11-6 libx11-dev xfonts-base xfonts-100dpi xfonts-75dpi \
xfonts-cyrillic fluid-soundfont-gm timgm6mb-soundfont \
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" ]] && [[ "$MANYLINUX_WHL" != "yes" ]]; 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 build -j4 install -pygame-ci -noheaders
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
PYTHON_EXE=python3 PIP_CMD="python3 -m pip"
$PIP_CMD install --upgrade pip
$PIP_CMD install conan -U
$PIP_CMD install cibuildwheel==1.6.3
conan config set storage.download_cache="$HOME/.conan/data/download_cache"
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
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ -n "$TRAVIS_TAG" ]]; then
$PYTHON_EXE buildconfig/config.py -conan --build
cp build/conan/*.dylib .
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
$PYTHON_EXE buildconfig/config.py -conan --build=missing
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/5A4OnIF5tMcutpkzq+wX3B+WaTqUi9yffto9/LL9/PEUbED50U94ffguwpIMVBUoxvTNhHO1PJmJKGtP1D9PROapQTp+BjzRMfFwe+9WaYPTr2iG5XZ5cNewyQrPcFGdjXOlEGgS3xxIl25l/jHgUHNZKIOKka1h4gajPxNstjnrMkMNaKnGdFo/GwkqnD2igiVT+0oLekIJ0dkVmOecuJJWUVmwCj9xZc//wW1Xunua9zGXjOeSliArnFFoyq3Md1ktOcTOoaKlWM3+0rgNA/2miYzfyMWGuFUACiQ8+fA98j0I7BcLiiUKa1/pD1fLHUcKknrnSA/hPwRBnlmDGtM2FCZobi3jIltZnadkviCpLjSObq7fE59w/+K0fxZn4GKs/xpEtss7xXxs0CmyJwZ6WVxlZAObfUPiRIdj+tglnB31ZdTNWe+7cC9f8zaQYs8+iaiM6DWehOI1o80RcIAuiU10sba89gqSkn+eOfPvzwg4d/z/XJW05weEL18s4ZvYp+JuqhN2Y="
- secure: "EGrZt/2EGOAzwcI69la5RgJ1Fr8uXM0TYarCheBrDVwcESNXccH9myyflN97m/jDrdyJB2fmVgI2WDpFdvnpEXNC7+lTEhApgFx6L1TwE/s5Fj6Kd72cERcPmDwLwzQFChXl2kjPTgu/Qr2u2X3EYCfEd0jRf+TcdHasvOLeGuQu7l0cnyW6WK+xMhF1wV8O9F1IdggyeysYIpP/v8rCtmjd268AqploBJ3cM3qau1F9NYBCSUPhu9eZfB0JRhHzeFDbNxRJtG+WZjk2CuGi1W8BGM/CeJkM/3b7iHMEwCYd8JW4k8ZYLSrPUiHkKxSeL9R12+p9u6AHMlXfEfO96Nt8pQkhVP9BxH374RRvQsIl5OxACTAW9XEiqTP7aRXIBSOxX6p3DxUXl6Ogn0d9U5rIu4SUAiaWW9e0k+Oeo/H3OGuerFlBIh6rW4kzVZ7ftcqzVRz9QgnrSy2r93BYzTWwM3eifkFQwtgnBSvXxM151leHOJ9r3PAiRup7V90WZBD4zytQSMaOc+fcdIWscP88sPcLXZEb6n6y7Ja3t5ASO58dXLw9EvqS4CsRYI08ltH85L/cq37dKgpvu33lsx1ZDksiMKtZW7tXhV1DZ9thl1JH/3f9QLRFz+02mJ6FD4PCJRYQvDDs5J4j7rf76FUlcBr+9bAN0sRnPL6UOms="
- CIBW_TEST_COMMAND="python -m pygame.tests.__main__ -v --exclude opengl,timing --time_out 300"
- CIBW_BEFORE_BUILD="pip install numpy"
script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
source buildconfig/ci/travis/cibuildwheel_mac.sh
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$MANYLINUX_WHL" != "yes" ]]; 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,timing --time_out 300
fi
# to make sure setup.py sdist runs.
- |
if [[ "$RUN_SDIST" == "yes" ]]; then
source buildconfig/ci/travis/build_test_sdist.sh
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
token:
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
- dist/*.tar.gz
skip_cleanup: true
draft: true
on:
all_branches: true
tags: true
repo: pygame/pygame
condition: $GITHUB_UPLOAD = yes