Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build and publish wheels

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v3.1
with:
package-dir: optix
output-dir: wheelhouse
env:
CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp314-manylinux_x86_64"
CIBW_ENVIRONMENT: >-
OptiX_INSTALL_DIR=/project/optix-sdk
CUDAToolkit_ROOT=/usr/local/cuda-12.6
PATH=/usr/local/cuda-12.6/bin:$PATH
CIBW_BEFORE_ALL_LINUX: >-
dnf install -y 'dnf-command(config-manager)' &&
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo &&
dnf install -y cmake cuda-nvcc-12-6 cuda-cudart-devel-12-6 cuda-driver-devel-12-6
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >-
auditwheel repair --exclude libcuda.so.1 -w {dest_dir} {wheel}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist optix

- uses: actions/upload-artifact@v4
with:
name: sdist
path: optix/dist/*.tar.gz

publish:
name: Publish to PyPI
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
skip-existing: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ __pycache__/
examples/my.png
examples/path_util.py
optix/build/
optix/dist/
optix/optix/
optix/optix.egg-info/
optix/pyoptix_contrib.egg-info/
2,785 changes: 2,785 additions & 0 deletions optix-sdk/include/internal/optix_device_impl.h

Large diffs are not rendered by default.

951 changes: 951 additions & 0 deletions optix-sdk/include/internal/optix_device_impl_coop_vec.h

Large diffs are not rendered by default.

Loading