-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.cirrus.yml
168 lines (138 loc) · 4.32 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
# !!NOTE!!
# If any of the image names or python versions change, update bors.toml
pep517_task:
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
container:
image: python:3
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/**"
task:
name: "Linux $IMAGE"
alias: Tests
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
allow_failures: $IMAGE =~ '.*[-:]rc-.*'
env:
matrix:
- IMAGE: python:3.9-slim
- IMAGE: python:rc-slim
- IMAGE: python:3.10-slim
- IMAGE: python:3.11-slim
- IMAGE: python:3.12-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'
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
PATH: ${HOME}/.pyenv/shims:${PATH}
matrix:
# To update: check the output of the most recent macOS_version job
- PYTHON: 3.9
- PYTHON: 3.10
- PYTHON: 3.11
- PYTHON: 3.12
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 update
- 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
macOS_version_task:
skip: $CIRRUS_BRANCH =~ '.*\.tmp'
osx_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
install_script:
# Per the pyenv homebrew recommendations.
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
- brew install openssl readline pyenv
script:
- pyenv install --list
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.9-windowsservercore
- IMAGE: python:3.10-windowsservercore
- IMAGE: python:3.11-windowsservercore
- IMAGE: python:3.12-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[a74d247869abeaff81e517d2c4d9da8ea7c97105dbe05d2392c4b1903c31547f433b5fe4a3ecbf17d638e407934dee75]"
container:
image: xonsh/xonsh:slim
install_script:
- pip install twine
script:
- xonsh .ci/upload.xsh
examples_artifacts:
path: "examples.zip"