-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (70 loc) · 2.05 KB
/
cibuildwheel.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
name: Build and deploy wheel
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} for ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
python: ["cp38", "cp39", "cp310", "cp311", "cp312"]
steps:
- uses: actions/checkout@v4
- name: Build binary wheels
uses: pypa/[email protected]
with:
output-dir: dist
env:
# Linux settings
CIBW_ARCHS: auto64
CIBW_BUILD: ${{matrix.python}}-*
CIBW_SKIP: pp* *musllinux*
# MacOS settings
MACOSX_DEPLOYMENT_TARGET: "10.14"
CIBW_ARCHS_MACOS: x86_64
# General
CIBW_TEST_REQUIRES: -r requirements-dev.txt
CIBW_TEST_COMMAND: pytest -v {project}/tests
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wheel-${{matrix.python}}-${{ matrix.os }}
path: ./dist/*.whl
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Install requirements
run: python -m pip install -r requirements-dev.txt
- name: Make sdist
run: python setup.py sdist
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sdist
path: ./dist/*.tar.gz
upload-testpypi:
name: Upload wheels to TestPyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Publish to test.pypi.org
if: ${{ github.event_name == 'push' }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TESTPYPI_DEPLOY_TOKEN }}
repository-url: https://test.pypi.org/legacy/