-
Notifications
You must be signed in to change notification settings - Fork 231
304 lines (294 loc) · 8.44 KB
/
main.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
on:
workflow_dispatch:
pull_request:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+dev[0-9]+"
jobs:
test_linux:
name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
python-version:
# - 2.7
# - 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
# - pypy-2.7
- pypy-3.8
- pypy-3.9
- pypy-3.10
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install tox
run: python -m pip install "tox<4.0.0" "tox-gh-actions<3.0.0"
- name: Test with tox
run: python -m tox
- name: Store partial coverage reports
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage.*
# test_aarch64_linux:
# name: Test (${{ matrix.python.os }}, ${{ matrix.python.python-version }}, aarch64)
# runs-on: ${{ matrix.python.os }}
# strategy:
# matrix:
# python:
# #- {os: ubuntu-20.04, python-version: 3.7, pyver: py37}
# #- {os: ubuntu-20.04, python-version: 3.8, pyver: py38}
# #- {os: ubuntu-20.04, python-version: 3.9, pyver: py39}
# - {os: ubuntu-20.04, python-version: "3.10", pyver: py310}
# env:
# py: python${{ matrix.python.python-version }}
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Set up QEMU
# id: qemu
# uses: docker/setup-qemu-action@v1
# - name: Test with tox
# run: |
# docker run --rm -v ${{ github.workspace }}:/io:rw --workdir=/io \
# arm64v8/ubuntu \
# bash -exc 'apt-get update && \
# apt install software-properties-common -y && \
# add-apt-repository ppa:deadsnakes/ppa -y && \
# apt install -y ${{ env.py }} && \
# apt install -y ${{ env.py }}-venv && \
# ${{ env.py }} -m venv .env && \
# source .env/bin/activate && \
# pip install -U pip wheel setuptools && \
# pip install "tox<4.0.0" "tox-gh-actions<3.0.0" && \
# tox -e ${{ matrix.python.pyver }} && \
# deactivate'
test_macos:
name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
python-version:
# - 2.7
# - 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
# - pypy-2.7
- pypy-3.8
- pypy-3.9
- pypy-3.10
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install tox
run: python -m pip install "tox<4.0.0" "tox-gh-actions<3.0.0"
- name: Test with tox
run: python -m tox
- name: Store partial coverage reports
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage.*
# test_windows_py27:
# name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os:
# - windows-latest
# python-version:
# - 2.7
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Update pip
# run: python -m pip install -U pip wheel setuptools
# - name: Install tox
# run: python -m pip install "tox<4.0.0" "tox-gh-actions<3.0.0"
# - name: Test with tox
# run: python -m tox -e py27,py27-without-extensions
test_windows:
name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
python-version:
# - 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
# - pypy-2.7
- pypy-3.8
- pypy-3.9
- pypy-3.10
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install tox
run: python -m pip install "tox<4.0.0" "tox-gh-actions<3.0.0"
- name: Test with tox
run: python -m tox
sdist:
name: Build source distribution
needs:
- test_linux
- test_macos
- test_windows
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Build full source distribution as tar.gz
run: python setup.py sdist
- name: Install the wheel package
run: pip install wheel
- name: Build pure Python source wheel
run: WRAPT_INSTALL_EXTENSIONS=false python setup.py bdist_wheel
- name: Store built wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*
# bdist_wheel_legacy:
# name: Build wheels (2.7-3.5) on ${{ matrix.os }}
# needs:
# - test_linux
# - test_macos
# - test_windows_py27
# - test_windows
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-20.04, windows-latest, macos-latest]
# steps:
# - uses: actions/checkout@v3
# - name: Build wheels
# uses: pypa/[email protected]
# with:
# output-dir: dist
# env:
# WRAPT_INSTALL_EXTENSIONS: true
# CIBW_BUILD: cp27* cp35*
# CIBW_SKIP: cp27-win*
# CIBW_BUILD_VERBOSITY: 1
# - uses: actions/upload-artifact@v3
# with:
# name: dist
# path: dist/*.whl
bdist_wheel:
name: Build wheels (3.6+) on ${{ matrix.os }} for ${{ matrix.arch }}
needs:
- test_linux
#- test_aarch64_linux
- test_macos
# - test_windows_py27
- test_windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
arch: [auto]
include:
- os: ubuntu-20.04
arch: aarch64
- os: macos-latest
arch: arm64
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v2
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
env:
WRAPT_INSTALL_EXTENSIONS: true
CIBW_SKIP: pp*
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.whl
coveralls:
name: Generate code coverage report
if: ${{ false }} # disable for now
needs:
- test_linux
- test_macos
# - test_windows_py27
- test_windows
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install coverage package
run: python -m pip install -U coverage
- name: Download partial coverage reports
uses: actions/download-artifact@v3
with:
name: coverage
- name: Combine coverage
run: python -m coverage combine
- name: Report coverage
run: python -m coverage report
- name: Export coverage to XML
run: python -m coverage xml
- name: Upload coverage statistics to Coveralls
uses: AndreMiras/coveralls-python-action@develop