Repository navigation
Merge pull request #2 from ionstorm66/main #61
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: Build Wheels | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-2022, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install CUDA Toolkit (Windows) | |
| if: runner.os == 'Windows' | |
| uses: Jimver/cuda-toolkit@v0.2.21 | |
| with: | |
| cuda: '12.5.1' | |
| method: 'network' | |
| use-github-cache: 'true' | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v4.2.1 | |
| env: | |
| CIBW_ARCHS_WINDOWS: "AMD64" | |
| CIBW_ARCHS_LINUX: "x86_64" | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
| # Requires-python (>=3.10) already filters out EOL Pythons. | |
| # cp31?t-*: skip free-threaded builds (extension requires the GIL). | |
| # cp315-*: skip 3.15 prerelease (build 3.10-3.14 only). | |
| CIBW_SKIP: "pp* cp31?t-* cp315-* *-musllinux_*" | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_BEFORE_ALL_LINUX: > | |
| yum install -y yum-utils mesa-libGL-devel && | |
| yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo && | |
| yum install -y cuda-nvcc-12-5 cuda-cudart-devel-12-5 | |
| CIBW_ENVIRONMENT_LINUX: > | |
| PATH=/usr/local/cuda-12.5/bin:$PATH | |
| LD_LIBRARY_PATH=/usr/local/cuda-12.5/lib64:$LD_LIBRARY_PATH | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| publish_to_pypi: | |
| name: Publish to PyPI | |
| needs: [build_wheels] | |
| runs-on: ubuntu-latest | |
| environment: pypi-release | |
| permissions: | |
| id-token: write | |
| if: github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |