@@ -259,7 +259,7 @@ jobs:
259259 fail-fast : false
260260 # https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
261261 matrix :
262- python_version : ['3.10', '3.11', '3.12', '3.13']
262+ python_version : ['3.10', '3.11', '3.12', '3.13', '3.14' ]
263263 is_main :
264264 - ${{ github.ref == 'refs/heads/main' }}
265265 exclude :
@@ -269,6 +269,12 @@ jobs:
269269 python_version : ' 3.11'
270270 - is_main : false
271271 python_version : ' 3.12'
272+ - is_main : false
273+ python_version : ' 3.13'
274+
275+ env :
276+ # PyTorch 2.7 supports python 3.10-3.13. PyTorch 2.9 supports python 3.14.
277+ BUILD_PYTORCH_OPS : ${{ matrix.python_version >= '3.14' && 'OFF' || 'ON' }}
272278
273279 steps :
274280 - name : Checkout source code
@@ -296,8 +302,10 @@ jobs:
296302 python -m pip install maturin==1.7.8
297303 python -m pip install -U -r python/requirements.txt `
298304 -r python/requirements_build.txt `
299- -r python/requirements_jupyter_build.txt `
300- -r open3d_ml/requirements-torch.txt
305+ -r python/requirements_jupyter_build.txt
306+ if ('${{ env.BUILD_PYTORCH_OPS }}' -eq 'ON') {
307+ python -m pip install -U -r open3d_ml/requirements-torch.txt
308+ }
301309
302310
303311 - name : Config
@@ -318,7 +326,7 @@ jobs:
318326 -DBUILD_LIBREALSENSE=ON `
319327 -DBUILD_WEBRTC=ON `
320328 -DBUILD_JUPYTER_EXTENSION=ON `
321- -DBUILD_PYTORCH_OPS=ON `
329+ -DBUILD_PYTORCH_OPS=${{ env.BUILD_PYTORCH_OPS }} `
322330 ${{ env.SRC_DIR }}
323331
324332 - name : Build Python package
@@ -353,7 +361,7 @@ jobs:
353361 strategy :
354362 fail-fast : false
355363 matrix :
356- python_version : ['3.10', '3.11', '3.12', '3.13']
364+ python_version : ['3.10', '3.11', '3.12', '3.13', '3.14' ]
357365 is_main :
358366 - ${{ github.ref == 'refs/heads/main' }}
359367 exclude :
@@ -363,7 +371,11 @@ jobs:
363371 python_version : ' 3.11'
364372 - is_main : false
365373 python_version : ' 3.12'
366-
374+ - is_main : false
375+ python_version : ' 3.13'
376+ env :
377+ # PyTorch 2.7 supports python 3.10-3.13. PyTorch 2.9 supports python 3.14.
378+ BUILD_PYTORCH_OPS : ${{ matrix.python_version >= '3.14' && 'OFF' || 'ON' }}
367379 steps :
368380 - name : Checkout source code
369381 uses : actions/checkout@v4
@@ -394,8 +406,10 @@ jobs:
394406 open3d_test_venv\Scripts\Activate.ps1
395407 python -m pip install -U pip==${{ env.PIP_VER }}
396408 python -m pip install -U -r python/requirements_build.txt `
397- -r python/requirements_test.txt `
398- -r open3d_ml/requirements-torch.txt
409+ -r python/requirements_test.txt
410+ if ('${{ env.BUILD_PYTORCH_OPS }}' -eq 'ON') {
411+ python -m pip install -U -r open3d_ml/requirements-torch.txt
412+ }
399413 $py_tag=(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
400414 if (Test-Path -Path "pip_package") {
401415 $PIP_PKG_NAME=(Get-ChildItem pip_package\open3d*-$py_tag-*.whl).Name
@@ -414,5 +428,10 @@ jobs:
414428 open3d_test_venv\Scripts\Activate.ps1
415429 echo "Running Open3D python tests..."
416430 echo "Add --randomly-seed=SEED to the test command to reproduce test order."
417- python -m pytest python/test/
431+ $pytest_args = @("python/test/")
432+ if ('${{ env.BUILD_PYTORCH_OPS }}' -eq 'OFF') {
433+ echo "Testing ML Ops disabled"
434+ $pytest_args += "--ignore=python/test/ml_ops/"
435+ }
436+ python -m pytest @pytest_args
418437 deactivate
0 commit comments