Skip to content

Move to nanobind

Move to nanobind #4

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
cibw_build: "cp3{11,12,13}-manylinux_x86_64"
cibw_image: "ghcr.io/OWNER/REPO:manylinux_2_28_x86_64_cuda12.9"
dockerfile: "docker/manylinux_2_28_x86_64_cuda12.9.Dockerfile"
- os: ubuntu-24.04-arm
cibw_build: "cp3{11,12,13}-manylinux_aarch64"
cibw_image: "ghcr.io/OWNER/REPO:manylinux_2_28_aarch64_cuda12.9"
dockerfile: "docker/manylinux_2_28_aarch64_cuda12.9.Dockerfile"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# OPTIONAL: build the CUDA-enabled manylinux image in CI
- name: Build CUDA manylinux image for this arch
run: |
docker build -t "${{ matrix.cibw_image }}" -f "${{ matrix.dockerfile }}" docker
# If you've pushed images to GHCR/Docker Hub, remove this step.
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==3.1.4
- name: Build wheels (compile-only, CUDA 12.9)
env:
# Hard-force cibuildwheel to Linux only
CIBW_PLATFORM: linux
# Build only the ABIs for THIS runner/arch
CIBW_BUILD: ${{ matrix.cibw_build }}
# Extra safety: do not attempt musllinux
CIBW_SKIP: "pp* *-musllinux*"
# Select the matching manylinux image per-arch
CIBW_MANYLINUX_X86_64_IMAGE: ${{ (matrix.os == 'ubuntu-latest') && matrix.cibw_image || '' }}
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ (matrix.os == 'ubuntu-24.04-arm') && matrix.cibw_image || '' }}
# CUDA in build env
CIBW_ENVIRONMENT: >
CUDA_HOME=/usr/local/cuda
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
PATH=/usr/local/cuda/bin:$PATH
# Tooling for nanobind build
CIBW_BEFORE_BUILD: >
python -m pip install -U pip
scikit-build-core cmake ninja nanobind
# Compile-only: no runtime tests (no GPU on CI)
CIBW_TEST_SKIP: "*"
CIBW_TEST_COMMAND: ""
# Keep repair for manylinux; set "" to speed up if you only need compile-proof
CIBW_REPAIR_WHEEL_COMMAND: "auditwheel repair -w {dest_dir} {wheel}"
CIBW_BUILD_VERBOSITY: "1"
run: python -m cibuildwheel --output-dir w