Skip to content

Commit

Permalink
ci: switch to cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard committed Sep 17, 2024
1 parent 0a18418 commit c54835d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build
on: [push, pull_request]
jobs:
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify tag matches version
run: |
set -ex
version=$(grep -m 1 version pyproject.toml | grep -P '\d+\.\d+\.\d+' -o)
tag="${GITHUB_REF/refs\/tags\/}"
if [[ "v$version" != "$tag" ]]; then
exit 1
fi
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: |
python -m pip install -U pip setuptools build
- run: |
python -m build
- run: |
pip install dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,7 @@ target-version = ['py39']
[tool.coverage.run]
parallel = true
source = ["TTS"]

[tool.cibuildwheel]
build = "cp*"
skip = "*-win32 *i686 *musllinux*"

0 comments on commit c54835d

Please sign in to comment.