Skip to content

CI: validate complete RayD distribution build matrix #22

CI: validate complete RayD distribution build matrix

CI: validate complete RayD distribution build matrix #22

Workflow file for this run

name: Dual Backend CI
on:
workflow_call:
pull_request:
push:
branches: [main]
schedule:
- cron: "17 9 * * 1"
workflow_dispatch:
concurrency:
group: dual-backend-${{ github.ref }}
cancel-in-progress: true
jobs:
drjit:
runs-on: [self-hosted, Windows, X64, rayd-gpu]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- run: python -m pip install "scikit-build-core>=0.10" "cmake>=3.22" ninja "nanobind==2.9.2" "drjit==1.3.1"
- run: python -m pip install --no-build-isolation -e backends/drjit
- run: python -m unittest discover -s tests -t . -v
working-directory: backends/drjit
torch:
runs-on: [self-hosted, Windows, X64, rayd-gpu]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- run: python -m pip install scikit-build-core cmake ninja torch
- run: python -m pip install --no-build-isolation -e backends/torch -Cbuild-dir=artifacts/skbuild
- run: python -m unittest discover -s tests/torch_backend -t . -v
working-directory: backends/torch
- name: Audit LibTorch Stable ABI library
shell: pwsh
run: |
$stable = Get-ChildItem backends/torch/artifacts/skbuild -Recurse -Filter _stable_ops.dll | Select-Object -First 1
if (-not $stable) { throw "_stable_ops.dll was not built" }
python backends/torch/scripts/verify_stable_abi.py --source-root backends/torch/src/stable $stable.FullName
parity:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-parity')
needs: [drjit, torch]
runs-on: [self-hosted, Windows, X64, rayd-gpu]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- run: python -m pip install "scikit-build-core>=0.10" "cmake>=3.22" ninja "nanobind==2.9.2" "drjit==1.3.1" torch
- run: python -m pip install --no-build-isolation -e backends/drjit
- run: python -m pip install --no-build-isolation -e backends/torch -Cbuild-dir=artifacts/skbuild
- run: python -m unittest tests.torch_backend.test_drjit_parity -v
working-directory: backends/torch
env: {RAYD_TORCH_RUN_DR_JIT_PARITY: "1"}
packaging:
needs: [drjit, torch]
runs-on: [self-hosted, Windows, X64, rayd-gpu]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- run: python -m pip install build "setuptools>=77" "scikit-build-core>=0.10" "cmake>=3.22" ninja "nanobind==2.9.2" "drjit==1.3.1" torch
- run: python -m build --wheel --no-isolation --outdir dist
- run: python -m build --wheel --no-isolation --outdir ../../dist
working-directory: backends/drjit
- run: python -m build --wheel --no-isolation --outdir ../../dist -Cbuild-dir=artifacts/skbuild
working-directory: backends/torch
- name: Audit packaged Stable ABI library
shell: pwsh
run: |
$stable = Get-ChildItem backends/torch/artifacts/skbuild -Recurse -Filter _stable_ops.dll | Select-Object -First 1
if (-not $stable) { throw "_stable_ops.dll was not built" }
python backends/torch/scripts/verify_stable_abi.py --source-root backends/torch/src/stable $stable.FullName
- shell: pwsh
run: |
$env:RAYD_META_WHEEL = (Get-ChildItem dist/rayd-*.whl | Where-Object { $_.Name -notmatch '^rayd_(drjit|torch)-' }).FullName
$env:RAYD_DRJIT_WHEEL = (Get-ChildItem dist/rayd_drjit-*.whl).FullName
$env:RAYD_TORCH_WHEEL = (Get-ChildItem dist/rayd_torch-*.whl).FullName
python -m unittest tests.packaging.test_project_metadata tests.packaging.test_wheel_layout tests.packaging.test_wheel_install_matrix -v
- uses: actions/upload-artifact@v4
with: {name: rayd-wheels, path: dist/*.whl}
coexistence:
needs: [drjit, torch]
runs-on: [self-hosted, Windows, X64, rayd-gpu]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- run: python -m pip install "scikit-build-core>=0.10" "cmake>=3.22" ninja "nanobind==2.9.2" "drjit==1.3.1" torch
- run: python -m pip install --no-build-isolation -e backends/drjit
- run: python -m pip install --no-build-isolation -e backends/torch -Cbuild-dir=artifacts/skbuild
- run: python -m unittest tests.test_namespace_isolation -v