chore: use makefile for reference on building sdist and wheels

This commit is contained in:
Matteo Bernardini
2025-09-03 13:18:03 +08:00
committed by Lars Immisch
parent 4f3c299e53
commit 0d6e0e7bb4
5 changed files with 21 additions and 9 deletions

View File

@@ -37,4 +37,4 @@ jobs:
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v4 uses: actions/deploy-pages@v4

View File

@@ -16,8 +16,10 @@ jobs:
- ubuntu-24.04-arm - ubuntu-24.04-arm
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build wheels - name: Build wheels
run: pipx run cibuildwheel==3.1.4 run: make build_wheels
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
@@ -28,8 +30,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build sdist - name: Build sdist
run: pipx run build --sdist run: make build_sdist
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: cibw-sdist name: cibw-sdist
@@ -51,4 +55,4 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1 - uses: pypa/gh-action-pypi-publish@release/v1
# TODO: delete below once workflow is proved functional # TODO: delete below once workflow is proved functional
with: with:
repository-url: https://test.pypi.org/legacy/ repository-url: https://test.pypi.org/legacy/

2
.gitignore vendored
View File

@@ -12,4 +12,4 @@ wheelhouse/
.vscode/ .vscode/
/__pycache__/ /__pycache__/
*.egg-info/ *.egg-info/
*.raw *.raw

View File

@@ -1,2 +1,2 @@
graft doc/ graft doc/
graft examples/ graft examples/

View File

@@ -1,8 +1,16 @@
.PHONY: lint test .PHONY: lint test build_wheels build_sdist build
lint: lint:
uv run --group lint pyright uv run --group lint pyright; \
uv run --group lint stubtest uv run --group lint stubtest alsaaudio
test: test:
uv run tests/test.py uv run tests/test.py
build_wheels:
uvx cibuildwheel==3.1.4
build_sdist:
uv build --sdist
build: build_sdist build_wheels