forked from ppb/pursuedpybear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
169 lines (140 loc) · 4.41 KB
/
.cirrus.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
# !!NOTE!!
# If any of the image names or python versions change, update bors.toml
pep517_task:
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
container:
image: python:3.7
install_script:
- pip install --upgrade-strategy eager -U pep517
script:
- python3 -m pep517.check .
build_task:
container:
image: duckinator/bork
setup_script:
- git fetch --tags
script:
- bork build
dist_artifacts:
path: "dist/**"
docs_task:
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
container:
image: python:3-slim
depends_on:
- build
install_script:
- apt update || true ; apt install -qq -y make
- pip install --upgrade-strategy eager -U -r requirements-docs.txt
- python .ci/install-wheels.py
script:
- make -C docs/ linkcheck
# TODO: Add -n (nit-picky mode, warn about all missing references)
- make -C docs/ "SPHINXOPTS=-W" html
task:
name: "Linux $IMAGE"
alias: Tests
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
allow_failures: $IMAGE =~ '.*[-:]rc-.*'
env:
matrix:
- IMAGE: python:3.6-slim
- IMAGE: python:3.7-slim
- IMAGE: python:3.8-slim
- IMAGE: python:rc-slim
- IMAGE: pypy:3.6-slim
container:
image: $IMAGE
depends_on:
- build
install_script:
- >-
if command -v pypy3 >/dev/null || python3 -c 'import sys; exit(sys.implementation.version.releaselevel == "final")'; then
apt update || true;
apt install -qq -y pkgconf libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev gcc
fi
- pip install --upgrade-strategy eager -U -r requirements-tests.txt
- >-
if command -v pypy3 >/dev/null; then
pypy3 .ci/install-wheels.py
else
python .ci/install-wheels.py
fi
- >-
apt-get update || true;
apt-get install -qq -y libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0 libsdl2-ttf-2.0-0
script:
- command -v pypy3 >/dev/null && export PY=pypy3
- ${PY-python3} --version
- pip list
- pytest
use_compute_credits: $CIRRUS_BRANCH == 'staging'
macOS_task:
alias: Tests
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
osx_instance:
image: catalina-base
env:
PATH: ${HOME}/.pyenv/shims:${PATH}
matrix:
# To update:
# Get the current version of pyenv from https://formulae.brew.sh/formula/pyenv
# Look that up on https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build
# Also update bors.toml
- PYTHON: 3.6.9
- PYTHON: 3.7.5
- PYTHON: 3.8.1
depends_on:
- build
install_script:
# Per the pyenv homebrew recommendations.
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
# - xcode-select --install # Unnecessary on Cirrus
- brew install openssl readline sqlite3 xz zlib pyenv
- pyenv install ${PYTHON}
- pyenv global ${PYTHON}
- pyenv rehash
- pip install --upgrade-strategy eager -U -r requirements-tests.txt
- python .ci/install-wheels.py
script:
- python3 --version
- pip list
- pytest
task:
name: "Windows $IMAGE"
alias: Tests
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
allow_failures: $IMAGE =~ '.*[-:]rc-.*'
windows_container:
os_version: 2019
image: $IMAGE
env:
matrix:
- IMAGE: python:3.6-windowsservercore
- IMAGE: python:3.7-windowsservercore
- IMAGE: python:3.8-windowsservercore
- IMAGE: python:rc-windowsservercore
install_script:
- C:\Python\python.exe -m pip install --upgrade-strategy eager -U -r requirements-tests.txt
- C:\Python\python.exe .ci/install-wheels.py
script:
- C:\Python\python.exe --version
- C:\Python\python.exe -m pip list
- C:\Python\python.exe -m pytest
upload_task:
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_RELEASE != ''
depends_on:
- build
- docs
- pep517
- Tests
env:
TWINE_TEST_TOKEN: "ENCRYPTED[4df6a9281bcbab67052d63d8ba4f5ee404d57fd95158e0e6e8693ac6b6ae0e2f2ec0ae8ac09a1fe9998b4675d6ccd7c2]"
TWINE_PROD_TOKEN: "ENCRYPTED[7ea667df4087e85f59575b59f07b2ef8da992831d45e0a0c60869aed64be252e4373b45b6a9f323a6a6365337bac0a7e]"
GITHUB_TOKEN: "ENCRYPTED[42fb2ca52f26c65b254620ce05eea27925844c034a0f73ca96f3fd4c80530a595e3c7dccda51df22b144a16673393704]"
container:
image: xonsh/xonsh:slim
install_script:
- pip install twine
script:
- xonsh .ci/upload.xsh