forked from dirko/pyhacrf
-
Notifications
You must be signed in to change notification settings - Fork 12
64 lines (60 loc) · 1.82 KB
/
pythonpackage.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
name: tests
on: [push]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .
- name: Test with pytest
run: |
pip install -r requirements.txt
pytest
wheels:
needs: test
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_ARCHS_LINUX: auto aarch64
CIBW_SKIP: pp38-macosx_* pp37-macosx_* pp37-win_* pp38-win_* pp38-manylinux_aarch64 pp37-manylinux_aarch64 pp*-manylinux_i686 *-musllinux_* *s390x *ppc64le *36-win* pp310-win*
CIBW_BUILD_VERBOSITY: 1
- name: Build sdist
run: |
pip install numpy cython wheel setuptools
python setup.py sdist
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload --skip-existing wheelhouse/*.whl
twine upload dist/*
continue-on-error: true