-
Notifications
You must be signed in to change notification settings - Fork 8
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
21 additions
and
13 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,27 +1,27 @@ | ||
name: Build wheels | ||
|
||
# on: [push, pull_request] | ||
on: [push, pull_request] | ||
# Alternatively, to publish when a (published) GitHub Release is created, use the following: | ||
on: | ||
release: | ||
types: | ||
- published | ||
# on: | ||
# release: | ||
# types: | ||
# - published | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.16 | ||
uses: pypa/cibuildwheel@v2.18 | ||
env: | ||
CIBW_ARCHS_MACOS: auto universal2 | ||
CIBW_ARCHS_MACOS: auto | ||
CIBW_SKIP: pp*win_amd64 | ||
with: | ||
package-dir: . | ||
|
@@ -32,6 +32,7 @@ jobs: | |
shell: bash | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact-${{ matrix.runs-on }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
|
@@ -45,22 +46,29 @@ jobs: | |
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact-source | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
name: Upload on release | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- name: Merge artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: all-files | ||
pattern: artifact-* | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
name: all-files | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
|
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,2 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "numpy>=1.19.5", "cython>=0.29"] | ||
requires = ["setuptools", "wheel", "numpy>=1.19.5,<2", "cython>=0.29"] |