-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (63 loc) · 1.97 KB
/
build_wheels.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
name: Build and upload to PyPI
on:
push:
pull_request:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Python
uses: actions/setup-python@v5
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD_LINUX: python -m pip install numpy scipy Cython
CIBW_BEFORE_BUILD_MACOS: unset __PYVENV_LAUNCHER__ && python -m pip install numpy scipy Cython
CIBW_BEFORE_BUILD_WINDOWS: python -m pip install numpy scipy Cython
CIBW_SKIP: "pp* *-win32 *-manylinux_i686 cp313-* cp37-win* cp37-macosx* cp38-win* cp38-macosx* cp39-win* cp39-macosx* cp310-win* cp310-macosx*"
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install setuptools
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi }}