From 11db89ae6d55cce617ad570e719ecc0fa2c2b731 Mon Sep 17 00:00:00 2001 From: monosans Date: Mon, 25 Nov 2024 10:06:53 +0300 Subject: [PATCH 1/2] chore(ci): fix upload & add more platforms to cibuildwheel --- .github/workflows/release-wheels.yml | 14 ++++---- .github/workflows/run-cibuildwheel.yml | 44 ++++++++------------------ .github/workflows/test.yml | 5 +-- pyproject.toml | 5 +-- 4 files changed, 23 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 7d45b4d..3740de1 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -18,14 +18,16 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + check-latest: true + python-version: '3.13' - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: sdist path: dist/*.tar.gz upload_pypi: @@ -34,11 +36,7 @@ jobs: # upload to PyPI when a GitHub Release is created if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v4.1.7 - with: - name: artifact - path: dist - + - uses: actions/download-artifact@v4 - uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/run-cibuildwheel.yml b/.github/workflows/run-cibuildwheel.yml index 0075dab..8c6b971 100644 --- a/.github/workflows/run-cibuildwheel.yml +++ b/.github/workflows/run-cibuildwheel.yml @@ -20,48 +20,30 @@ jobs: fail-fast: ${{ inputs.fail-fast }} matrix: include: - - name: Windows AMD64 & x86 - os: windows-2019 - - name: macOS x86_64 & universal2 + - name: Windows + os: windows-latest + - name: macOS x86_64 os: macos-13 - - name: macOS M1 - os: macos-15 - - name: manylinux and musllinux x86_64 & i686 - os: ubuntu-20.04 - cibw_build: cp3*-{manylinux,musllinux}_* - cibw_archs: auto - - name: manylinux aarch64 - os: ubuntu-20.04 - cibw_build: cp3*-manylinux_* - cibw_archs: aarch64 - - name: musllinux aarch64 - os: ubuntu-20.04 - cibw_build: cp3*-musllinux_* - cibw_archs: aarch64 - + - name: macOS arm64 + os: macos-latest + - name: Linux + os: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true - name: Set up QEMU - if: runner.os == 'Linux' && matrix.cibw_archs == 'aarch64' + if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Set CIBW_BUILD - if: ${{ matrix.cibw_build }} - run: echo "CIBW_BUILD=${{ matrix.cibw_build }}" >> $GITHUB_ENV - shell: bash - - name: Set CIBW_ARCHS - if: ${{ matrix.cibw_archs }} - run: echo "CIBW_ARCHS=${{ matrix.cibw_archs }}" >> $GITHUB_ENV - shell: bash - name: Build wheels - uses: pypa/cibuildwheel@v2.21.2 + uses: pypa/cibuildwheel@v2.22.0 with: - output-dir: ./wheelhouse + output-dir: dist env: CIBW_PRERELEASE_PYTHONS: ${{ inputs.prerelease-pythons }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - path: ./wheelhouse/*.whl + name: wheels-${{ matrix.os }} + path: dist/*.whl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 657bcc6..d939a18 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,15 +9,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-13, macos-15] + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 with: submodules: true - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: + check-latest: true python-version: ${{ matrix.python-version }} - name: Install dependencies run: python -m pip install -U setuptools wheel diff --git a/pyproject.toml b/pyproject.toml index a0d0af7..48a3958 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" build = "cp3*" [tool.cibuildwheel.linux] -archs = ["auto", "aarch64"] +archs = ["auto", "aarch64", "ppc64le", "s390x"] before-all = """ set -eux # musllinux_* @@ -22,6 +22,3 @@ if command -v yum; then yum install -y libffi-devel fi """ - -[tool.cibuildwheel.macos] -archs = ["x86_64", "universal2"] From a8d69dc2fcca460e26256eede62e8eb026ec6ddd Mon Sep 17 00:00:00 2001 From: monosans Date: Mon, 25 Nov 2024 10:46:07 +0300 Subject: [PATCH 2/2] chore: fix cibuildwheel warning --- .github/workflows/run-cibuildwheel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-cibuildwheel.yml b/.github/workflows/run-cibuildwheel.yml index 8c6b971..c267a56 100644 --- a/.github/workflows/run-cibuildwheel.yml +++ b/.github/workflows/run-cibuildwheel.yml @@ -37,12 +37,13 @@ jobs: uses: docker/setup-qemu-action@v3 with: platforms: all + - name: Enable CPython prerelease + if: ${{ inputs.prerelease-pythons }} + run: echo "CIBW_ENABLE=cpython-prerelease" >> $GITHUB_ENV - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 with: output-dir: dist - env: - CIBW_PRERELEASE_PYTHONS: ${{ inputs.prerelease-pythons }} - uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.os }}