-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,65 @@ | ||
name: Build and Publish Wheels | ||
name: Build and Release Wheels | ||
|
||
on: | ||
release: | ||
types: [published] | ||
types: [created] | ||
|
||
jobs: | ||
build_wheel_multiplatform: | ||
name: Build wheels on ${{ matrix.os }} | ||
build_wheels: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python: ["cp39", "cp310", "cp311", "cp312"] | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
python -m pip install -r requirements_dev.txt | ||
- name: Build extensions in place | ||
run: | | ||
python -m pip install setuptools wheel | ||
python setup.py build_ext --inplace | ||
pip install cibuildwheel | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.19.2 | ||
|
||
- name: Build wheels | ||
run: | | ||
python -m cibuildwheel --output-dir dist | ||
run: cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_BEFORE_BUILD: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
CIBW_BUILD: "${{ matrix.python }}-*" | ||
CIBW_BUILD: cp3?-* | ||
CIBW_SKIP: "pp*" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
- name: Upload wheels to GitHub | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.os }} | ||
path: ./dist/*.whl | ||
name: wheels-${{ runner.os }}-${{ matrix.python-version }} | ||
path: wheelhouse/ | ||
|
||
publish_wheels: | ||
needs: [build_wheel_multiplatform] | ||
upload_to_pypi: | ||
runs-on: ubuntu-latest | ||
needs: build_wheels | ||
steps: | ||
- name: Download Linux wheels | ||
uses: actions/download-artifact@v3 | ||
- name: Download wheels | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wheels-ubuntu-latest | ||
path: ./dist | ||
name: wheels-* | ||
|
||
- name: Download Windows wheels | ||
uses: actions/download-artifact@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
name: wheels-windows-latest | ||
path: ./dist | ||
python-version: "3.9" | ||
|
||
- name: Download MacOS 13 wheels | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels-macos-13 | ||
path: ./dist | ||
|
||
- name: Download MacOS 14 wheels | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels-macos-14 | ||
path: ./dist | ||
- name: Install twine | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install twine | ||
- name: Publish wheels to PyPI | ||
run: | | ||
twine upload wheelhouse/*.whl | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
run: | | ||
python3 -m pip install twine | ||
twine upload dist/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
repairwheel | ||
wheel | ||
wheel | ||
cibuildwheel |