From fea2c4d71d4df5178ca4f0b67e156dfd84c80204 Mon Sep 17 00:00:00 2001 From: Lasse Borgholt Date: Wed, 10 Dec 2025 14:24:12 +0100 Subject: [PATCH 1/3] Updated workflow + test version --- .github/workflows/build_wheels.yml | 31 ++++++++++++++++++++++++------ pyproject.toml | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 4a3e741..c041b26 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,6 +1,7 @@ name: Build wheels on: + pull_request: workflow_dispatch: push: tags: @@ -15,21 +16,39 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] env: + # ---- Linux ---- + # Build manylinux + musllinux wheels CIBW_ARCHS_LINUX: "x86_64" + CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014" + CIBW_MUSLLINUX_X86_64_IMAGE: "musllinux_1_2" + + # ---- macOS ---- + # Build Intel, Apple Silicon, and universal2 wheels + CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + + # ---- Windows ---- + # Build both 32-bit and 64-bit wheels + CIBW_ARCHS_WINDOWS: "AMD64 x86" + + # ---- General settings ---- + # Build wheels for CPython 3.11–3.13 + CIBW_BUILD: "cp311-* cp312-* cp313-*" + + # If needed, skip PyPy or unsupported combos + CIBW_SKIP: "pp* *-manylinux_i686" + + # Output + CIBW_OUTPUT_DIR: "wheelhouse" steps: - uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - + # No need to install a specific Python — cibuildwheel manages Python itself. - name: Install cibuildwheel run: pip install cibuildwheel==2.22.0 - name: Build wheels - run: cibuildwheel --output-dir wheelhouse + run: cibuildwheel - name: Upload wheels as artifacts uses: actions/upload-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index 6996aea..6b83fd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "scikit_build_core.build" [project] name = "error-align" -version = "0.1.0b5" +version = "0.1.0b21" description = "Text-to-text alignment algorithm for speech recognition error analysis." readme = "README.md" requires-python = ">=3.11,<3.14" From 3d4162b5b77839df765beffbf1d629fff5854151 Mon Sep 17 00:00:00 2001 From: Lasse Borgholt Date: Wed, 10 Dec 2025 14:55:04 +0100 Subject: [PATCH 2/3] Reverted to next beta release version --- .github/workflows/build_wheels.yml | 1 - README.md | 2 +- pyproject.toml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index c041b26..258a186 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,7 +1,6 @@ name: Build wheels on: - pull_request: workflow_dispatch: push: tags: diff --git a/README.md b/README.md index a63a1de..908ba29 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- ErrorAlign Logo + ErrorAlign Logo

diff --git a/pyproject.toml b/pyproject.toml index 6b83fd7..6996aea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "scikit_build_core.build" [project] name = "error-align" -version = "0.1.0b21" +version = "0.1.0b5" description = "Text-to-text alignment algorithm for speech recognition error analysis." readme = "README.md" requires-python = ">=3.11,<3.14" From 6a473e21d97e29f0d21abd305e00c97ed3524962 Mon Sep 17 00:00:00 2001 From: Lasse Borgholt Date: Wed, 10 Dec 2025 15:09:12 +0100 Subject: [PATCH 3/3] Added workflow to build and publish --- .github/workflows/build_and_publish.yml | 88 +++++++++++++++++++++++++ .github/workflows/build_wheels.yml | 4 -- 2 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build_and_publish.yml diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml new file mode 100644 index 0000000..1c4f57f --- /dev/null +++ b/.github/workflows/build_and_publish.yml @@ -0,0 +1,88 @@ +name: Build and Publish + +on: + workflow_dispatch: + push: + tags: + - "v*" + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + env: + # ---- Linux ---- + # Build manylinux + musllinux wheels + CIBW_ARCHS_LINUX: "x86_64" + CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014" + CIBW_MUSLLINUX_X86_64_IMAGE: "musllinux_1_2" + + # ---- macOS ---- + # Build Intel, Apple Silicon, and universal2 wheels + CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + + # ---- Windows ---- + # Build both 32-bit and 64-bit wheels + CIBW_ARCHS_WINDOWS: "AMD64 x86" + + # ---- General settings ---- + # Build wheels for CPython 3.11–3.13 + CIBW_BUILD: "cp311-* cp312-* cp313-*" + + # If needed, skip PyPy or unsupported combos + CIBW_SKIP: "pp* *-manylinux_i686" + + # Output + CIBW_OUTPUT_DIR: "wheelhouse" + + steps: + - uses: actions/checkout@v4 + + - name: Install cibuildwheel + run: pip install cibuildwheel==2.22.0 + + - name: Build wheels + run: cibuildwheel + + - name: Upload wheels as artifacts + uses: actions/upload-artifact@v4 + with: + name: wheels-${{ matrix.os }} + path: wheelhouse/*.whl + + build_sdist: + name: Build sdist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build sdist + run: | + pip install build + python -m build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz + + publish: + name: Publish to PyPI + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + + - name: Install Twine + run: pip install twine + + - name: Publish to PyPI + run: | + twine upload wheels-*/* sdist/* + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 258a186..1342fee 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -2,9 +2,6 @@ name: Build wheels on: workflow_dispatch: - push: - tags: - - "v*" jobs: build_wheels: @@ -42,7 +39,6 @@ jobs: steps: - uses: actions/checkout@v4 - # No need to install a specific Python — cibuildwheel manages Python itself. - name: Install cibuildwheel run: pip install cibuildwheel==2.22.0