Merge pull request #661 from achaikou/after_release_updates #487
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Wheels | |
| permissions: {} | |
| on: | |
| push: | |
| branches: [main] | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| wheels: | |
| name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-2022 | |
| cmake_generator: "Visual Studio 17 2022" | |
| cmake_generator_platform: "x64" | |
| arch: AMD64 | |
| - os: windows-2022 | |
| cmake_generator: "Visual Studio 17 2022" | |
| cmake_generator_platform: "Win32" | |
| arch: x86 | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| - os: ubuntu-24.04-arm | |
| arch: aarch64 | |
| - os: ubuntu-latest | |
| arch: i686 | |
| # macos-latest runs on arm64 architecture and cibuildwheel cross | |
| # compiling for x86_64 fails | |
| - os: macos-latest | |
| arch: arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Used to host cibuildwheel | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel | |
| - name: Build wheels | |
| env: | |
| CIBW_ENVIRONMENT_WINDOWS: > | |
| CMAKE_GENERATOR="${{ matrix.cmake_generator }}" | |
| CMAKE_GENERATOR_PLATFORM="${{ matrix.cmake_generator_platform }}" | |
| CIBW_SKIP: cp38-* cp39-* *-musllinux_* | |
| CIBW_ARCHS: ${{ matrix.arch }} | |
| run: | | |
| python -m cibuildwheel --output-dir wheelhouse python/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.os }}-${{ matrix.arch }} | |
| path: ./wheelhouse/*.whl | |
| publish: | |
| needs: wheels | |
| name: Publish wheels to PyPI | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| environment: | |
| name: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheel-* | |
| merge-multiple: true | |
| path: ./wheelhouse/ | |
| - name: Publish wheels to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: ./wheelhouse/ |