Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,28 @@ on:
types: [published]

jobs:
build:
name: Build distribution
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.repository == 'ARM-Development/cmac'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v6

- name: Build wheels
uses: pypa/cibuildwheel@v2.21

- uses: actions/upload-artifact@v6
with:
name: dist-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
Comment thread
zssherman marked this conversation as resolved.

build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
if: github.repository == 'ARM-Development/cmac'

Expand All @@ -23,18 +43,17 @@ jobs:
python -m pip install --upgrade pip
pip install build

- name: Build package
run: python -m build
- name: Build sdist
run: python -m build --sdist

- name: Store distribution packages
uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v6
with:
name: python-package-distributions
path: dist/
name: dist-sdist
path: dist/*.tar.gz

publish-to-pypi:
name: Publish to PyPI
needs: build
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -46,8 +65,9 @@ jobs:
- name: Download distribution packages
uses: actions/download-artifact@v8
with:
name: python-package-distributions
pattern: dist-*
path: dist/
merge-multiple: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ requires = [
"setuptools>=45",
"wheel",
"cython",
"oldest-supported-numpy; python_version<'3.9'",
"numpy>=2.0; python_version>='3.9'",
]
build-backend = "setuptools.build_meta"
Expand All @@ -30,3 +29,8 @@ test = [
ext-modules = [
{ name = "cmac.calc_kdp_ray_fir", sources = ["cmac/calc_kdp_ray_fir.pyx"] }
]

[tool.cibuildwheel]
build = "cp310-* cp311-* cp312-* cp313-*"
skip = "*-musllinux_i686 *-manylinux_i686 pp*"
build-verbosity = 1
Loading