From b7c234caf841206d90b902aae3c590c43e3161cf Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Tue, 16 Jun 2026 15:00:59 +0800 Subject: [PATCH 1/2] ci: generalize emulated Linux wheel builds Turn the current ppc64le build into the sole matrix entry in a new general build job for all emulated Linux builds, to make supporting additional architectures easier. Human note: The entirety of the commit message is written manually. Assisted-by: GPT-5.5 --- .github/workflows/wheels.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a94c3ec8..ea196ad5 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -97,10 +97,17 @@ jobs: name: wheels-${{ matrix.name }} path: ./wheelhouse/*.whl - build_wheels_ppc: - name: Wheels for linux-ppc + build_wheels_emulated_linux: + name: Wheels for ${{ matrix.name }} runs-on: ubuntu-24.04 needs: sdist + strategy: + fail-fast: true + matrix: + include: + - name: linux-ppc64le + qemu_platform: linux/ppc64le + cibw_arch: ppc64le steps: - uses: actions/setup-python@v6 @@ -109,7 +116,7 @@ jobs: - uses: docker/setup-qemu-action@v4 with: - platforms: linux/ppc64le + platforms: ${{ matrix.qemu_platform }} - name: Download sdist uses: actions/download-artifact@v8 @@ -124,12 +131,12 @@ jobs: shell: bash run: python -m cibuildwheel dist/*.tar.gz --output-dir wheelhouse env: - CIBW_ARCHS: ppc64le + CIBW_ARCHS: ${{ matrix.cibw_arch }} CIBW_ENVIRONMENT: LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.4 LIBGIT2=/project/ci - uses: actions/upload-artifact@v7 with: - name: wheels-linux-ppc + name: wheels-${{ matrix.name }} path: ./wheelhouse/*.whl twine-check: @@ -137,7 +144,7 @@ jobs: # It is good to do this check on non-tagged commits. # Note, pypa/gh-action-pypi-publish (see job below) does this automatically. if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - needs: [build_wheels, build_wheels_ppc, sdist] + needs: [build_wheels, build_wheels_emulated_linux, sdist] runs-on: ubuntu-latest steps: @@ -151,7 +158,7 @@ jobs: pypi: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - needs: [build_wheels, build_wheels_ppc, sdist] + needs: [build_wheels, build_wheels_emulated_linux, sdist] permissions: contents: write # to create GitHub Release runs-on: ubuntu-24.04 From 2fcb39e04872a7f761997abc98d2771e5ab47385 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Tue, 16 Jun 2026 15:01:19 +0800 Subject: [PATCH 2/2] ci: add riscv64 wheel builds RISC-V wheels have been supported by cibuildwheel and PyPI for a while, so let's build binary wheels for it as many of the boards currently on the market are rather slow to make building on the spot rather painful. Human note: The entirety of the commit message is written manually. See: https://github.com/pypa/cibuildwheel/pull/2366 See: https://github.com/pypi/warehouse/issues/18243 Assisted-by: GPT-5.5 --- .github/workflows/wheels.yml | 3 +++ pyproject.toml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ea196ad5..1c969c82 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -108,6 +108,9 @@ jobs: - name: linux-ppc64le qemu_platform: linux/ppc64le cibw_arch: ppc64le + - name: linux-riscv64 + qemu_platform: linux/riscv64 + cibw_arch: riscv64 steps: - uses: actions/setup-python@v6 diff --git a/pyproject.toml b/pyproject.toml index c7f64c07..6e19895f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,10 +15,10 @@ before-all = "sh build.sh" test-command = "pytest" test-sources = ["test", "pytest.ini"] before-test = "pip install -r {package}/requirements-test.txt" -# Will avoid testing on emulated architectures (specifically ppc64le) +# Will avoid testing on emulated architectures (specifically ppc64le and riscv64) # Also, skip testing pypy on macOS arm64 due issue with bootstrapping git config paths # see https://github.com/libgit2/pygit2/issues/1442 -test-skip = "*-*linux_ppc64le pp*-macosx_arm64" +test-skip = "*-*linux_ppc64le *-*linux_riscv64 pp*-macosx_arm64" [tool.cibuildwheel.linux] repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"