Newer
Older

Martin Larralde
committed
name: Package
on:

Martin Larralde
committed
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: '3.10'
pyo3-python: /opt/python/cp310-cp310/bin/python

Martin Larralde
committed
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
- 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.6
- 3.7
- 3.8
- 3.9
- '3.10'

Martin Larralde
committed
- pypy-3.7
- pypy-3.8
- pypy-3.9

Martin Larralde
committed
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
wheel-osx:
runs-on: macos-latest
name: Build OSX wheels
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- '3.10'

Martin Larralde
committed
- pypy-3.7
- pypy-3.8
- pypy-3.9

Martin Larralde
committed
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
- 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.6
- 3.7
- 3.8
- 3.9
- '3.10'

Martin Larralde
committed
- pypy-3.7
- pypy-3.8
- pypy-3.9

Martin Larralde
committed
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
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
# wheel-windows:
# runs-on: windows-latest
# name: Build Windows wheels
# strategy:
# matrix:
# python-version:
# - 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.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.10

Martin Larralde
committed
uses: actions/setup-python@v2
with:
python-version: '3.10'

Martin Larralde
committed
- 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/*

Martin Larralde
committed
test-sdist:
runs-on: ubuntu-latest
name: Test source distribution
needs:
- sdist
steps:
- name: Setup Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: dist
path: dist/
- name: Update pip to latest version
run: python -m pip install -U pip setuptools wheel
- name: Install built wheel
run: python -m pip install --no-binary pyfastani --find-links=dist pyfastani
- name: Run tests without coverage
run: python -m unittest pyfastani.tests -vv

Martin Larralde
committed
upload:
environment: PyPI
runs-on: ubuntu-latest
name: Upload
needs:
- sdist

Martin Larralde
committed
- test-sdist

Martin Larralde
committed
- 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
release:
environment: GitHub Releases
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/v')"
name: Release
needs: upload
steps:
- name: Checkout code
uses: actions/checkout@v1
with:
submodules: true
- name: Release a Changelog
uses: rasmus-saks/release-a-changelog-action@v1.0.1
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'