From 2fbd1d4f0b5e3942b45697c9cfe7726aa689260d Mon Sep 17 00:00:00 2001 From: Joao S O Bueno Date: Sat, 16 Nov 2024 15:41:57 -0300 Subject: [PATCH] Build manylinux wheels, take 3 --- .github/workflows/pypi.yml | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c3fa3cd..0b3ea78 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,35 +1,35 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI on: push +name: Build -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Python versions - uses: actions/setup-python@v4 - with: - python-version: "3.12" +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-latest, ] # windows-latest, macos-13, macos-14] - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.14.1 + steps: + - uses: actions/checkout@v4 - name: Build wheels - env: - CIBW_BUILD: "cp312-* cp313-*" - CIBW_SKIP: "pp*" - CIBW_PLATFORM: "manylinux2014_x86_64" # Adjust if needed - run: | - python -m cibuildwheel --output-dir dist + uses: pypa/cibuildwheel@v2.21.3 + # env: + # CIBW_SOME_OPTION: value + # ... + # with: + # package-dir: . + # output-dir: wheelhouse + # config-file: "{package}/pyproject.toml" - - name: Upload built wheels as artifact - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v4 with: - name: built-wheels - path: dist + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl publish-to-pypi: name: >- @@ -49,7 +49,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: python-package-distributions - path: dist/ + path: wheelhouse/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1