Newer
Older

Martin Larralde
committed
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
name: Package
on:
- push
# push:
# tags:
# - v*.*.*
jobs:
wheel-linux:
runs-on: ubuntu-latest
name: Build Linux wheels
strategy:
matrix:
include:
- python-version: 3.6
pyo3-python: /opt/python/cp36-cp36m/bin/python
- python-version: 3.7
pyo3-python: /opt/python/cp37-cp37m/bin/python
- python-version: 3.8
pyo3-python: /opt/python/cp38-cp38/bin/python
- python-version: 3.9
pyo3-python: /opt/python/cp39-cp39/bin/python
- python-version: pypy-3.7
pyo3-python: /opt/python/pp37-pypy37_pp73/bin/python
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Build manylinux wheels
uses: addnab/docker-run-action@v2
with:
image: quay.io/pypa/manylinux_2_24_x86_64
options: -v ${{ github.workspace }}:/io -e TERM=$TERM
shell: bash
run: |
apt update
apt install -y libboost-math-dev
${{ matrix.pyo3-python }} -m pip install -U -r /io/.github/workflows/requirements.txt
${{ matrix.pyo3-python }} -m pip wheel -vv /io -w /tmp
for whl in /tmp/*.whl; do ${{ matrix.pyo3-python }} -m auditwheel repair $whl -w /io/dist; done
- name: Store built wheels
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/*
test-linux:
runs-on: ubuntu-latest
name: Test Linux wheels
needs:
- wheel-linux
strategy:
matrix:
python-version:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- pypy-3.6
- pypy-3.7
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Install built wheel
run: python -m pip install --no-index --find-links=dist pyfastani
- name: Install numpy
run: python -m pip install numpy
if: ${{ !startsWith(matrix.python-version, 'pypy') }}

Martin Larralde
committed
- name: Run tests without coverage
run: python -m unittest pyfastani.tests -vv
wheel-osx:
runs-on: macos-latest
name: Build OSX wheels
strategy:
matrix:
python-version:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- pypy-3.7
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: "Install Boost::math"
run: brew install boost

Martin Larralde
committed
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
- name: Build wheel distribution
run: python setup.py bdist_wheel
- name: Store built wheels
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/*
test-osx:
runs-on: macos-latest
name: Test OSX wheels
needs:
- wheel-osx
strategy:
matrix:
python-version:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- pypy-3.6
- pypy-3.7
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Install built wheel
run: python -m pip install --no-index --find-links=dist pyfastani
- name: Install numpy
run: python -m pip install numpy
if: ${{ !startsWith(matrix.python-version, 'pypy') }}

Martin Larralde
committed
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
- name: Run tests without coverage
run: python -m unittest pyfastani.tests -vv
# wheel-windows:
# runs-on: windows-latest
# name: Build Windows wheels
# strategy:
# matrix:
# python-version:
# - 3.5
# - 3.6
# - 3.7
# - 3.8
# - 3.9
# - pypy-3.6
# - pypy-3.7
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# with:
# submodules: true
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# architecture: x64
# - name: Install Python requirements
# run: python -m pip install -r .github/workflows/requirements.txt
# - name: Build wheel distribution
# run: python setup.py bdist_wheel
# - name: Store built wheels
# uses: actions/upload-artifact@v2
# with:
# name: dist
# path: dist/*
#
# test-windows:
# runs-on: windows-latest
# name: Test Windows wheels
# needs:
# - wheel-windows
# strategy:
# matrix:
# python-version:
# - 3.5
# - 3.6
# - 3.7
# - 3.8
# - 3.9
# - pypy-3.6
# - pypy-3.7
# steps:
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Download built wheels
# uses: actions/download-artifact@v2
# with:
# name: dist
# path: dist
# - name: Install built wheel
# run: python -m pip install --no-index --find-links=dist pyfastani
# - name: Run tests without coverage
# run: python -m unittest pyfastani.tests -vv
sdist:
runs-on: ubuntu-latest
name: Build source distribution
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install build requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Build wheel distribution
run: python setup.py sdist
- name: Store built wheels
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/*
upload:
environment: PyPI
runs-on: ubuntu-latest
name: Upload
needs:
- sdist
- wheel-linux
- test-linux
- wheel-osx
- test-osx
# - wheel-windows
# - test-windows
steps:
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Publish distributions to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: false