Skip to content

Commit

Permalink
Use default xcode versions
Browse files Browse the repository at this point in the history
Each macOS version now comes with a single xcode version.
Disable github sycl raycasting tests (no GPU available there).
  • Loading branch information
ssheorey committed Dec 5, 2024
1 parent 9c9d9d1 commit 6523a11
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# macos-12 is Intel runner, macos-14 is Apple Silicon
# macos-13 is Intel runner, macos-14 is Apple Silicon
# https://github.com/actions/runner-images
os: [macos-12, macos-14]
os: [macos-13, macos-14]
CONFIG: [ON, OFF]
env:
BUILD_SHARED_LIBS: ${{ matrix.CONFIG }}
Expand Down Expand Up @@ -68,15 +68,15 @@ jobs:
run: |
brew install ccache pkg-config
if [[ ${{ runner.arch}} == "ARM64" ]]; then
if [[ ${{ runner.arch }} == "ARM64" ]]; then
# Fix gfortran not found issue
ln -s $(which gfortran-13) /usr/local/bin/gfortran
# Default macos-14 image Xcode (version 15.0.1) linker causes build issues.
# Newer Xcode versions work, but embree recommends Apple clang <= 14 on
# arm64 to avoid possible "EXEC_BAD_INSTRUCTION" runtime exceptions:
# https://github.com/embree/embree/releases/tag/v4.3.1
sudo xcode-select -switch /Applications/Xcode_16.1.0.app
# sudo xcode-select -switch /Applications/Xcode_16.1.0.app
fi
# Install libomp 11.1.0 from old brew bottle for x64 catalina (10.15)
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
permissions:
contents: write # Release upload
name: Fuse x64 and ARM64 viewer app
runs-on: [macos-12]
runs-on: [macos-13]
needs: [MacOS]
steps:
- name: Checkout source code # for gh release upload
Expand Down Expand Up @@ -191,9 +191,9 @@ jobs:
fail-fast: false
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
matrix:
# macos-12 is Intel runner, macos-14 is Apple Silicon
# macos-13 is Intel runner, macos-14 is Apple Silicon
# https://github.com/actions/runner-images
os: [macos-12, macos-14]
os: [macos-13, macos-14]
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
# Fix macos-14 arm64 runner image issues, see comments in MacOS job.
if [[ ${{ runner.arch}} == "ARM64" ]]; then
ln -s $(which gfortran-13) /usr/local/bin/gfortran
sudo xcode-select -switch /Applications/Xcode_16.1.0.app
# sudo xcode-select -switch /Applications/Xcode_16.1.0.app
fi
# Install libomp 11.1.0. See comment above.
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
name: Fuse universal2 wheel
permissions:
contents: write # Release upload
runs-on: [macos-12]
runs-on: [macos-13]
needs: [build-wheel]
strategy:
fail-fast: false
Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-14]
os: [macos-13, macos-14]
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
is_main:
- ${{ github.ref == 'refs/heads/main' }}
Expand Down
33 changes: 24 additions & 9 deletions python/test/t/geometry/test_raycasting_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../..")
from open3d_test import list_devices

# RayCastingScene SYCL tests require a GPU with HW raytracing support. We don't
# detect this automatically.
# Do not enable SYCL devices on GIthub - GPU is not available and we don't
# distinguish between SYCL CPU and SYCL GPU.
enable_sycl = os.environ.get("CI", "") == ""


# test intersection with a single triangle
@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_cast_rays(device):
vertices = o3d.core.Tensor([[0, 0, 0], [1, 0, 0], [1, 1, 0]],
dtype=o3d.core.float32,
Expand Down Expand Up @@ -50,7 +57,8 @@ def test_cast_rays(device):
# cast lots of random rays to test the internal batching
# we expect no errors for this test
@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_cast_lots_of_rays(device):
vertices = o3d.core.Tensor([[0, 0, 0], [1, 0, 0], [1, 1, 0]],
dtype=o3d.core.float32,
Expand All @@ -71,7 +79,8 @@ def test_cast_lots_of_rays(device):

# test occlusion with a single triangle
@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_test_occlusions(device):
vertices = o3d.core.Tensor([[0, 0, 0], [1, 0, 0], [1, 1, 0]],
dtype=o3d.core.float32,
Expand Down Expand Up @@ -108,7 +117,8 @@ def test_test_occlusions(device):
# test lots of random rays for occlusions to test the internal batching
# we expect no errors for this test
@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_test_lots_of_occlusions(device):
vertices = o3d.core.Tensor([[0, 0, 0], [1, 0, 0], [1, 1, 0]],
dtype=o3d.core.float32,
Expand All @@ -128,7 +138,8 @@ def test_test_lots_of_occlusions(device):


@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_add_triangle_mesh(device):
cube = o3d.t.geometry.TriangleMesh.create_box()
cube = cube.to(device)
Expand All @@ -148,7 +159,8 @@ def test_add_triangle_mesh(device):


@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_count_intersections(device):
cube = o3d.t.geometry.TriangleMesh.create_box()
vertex_positions = cube.vertex.positions
Expand All @@ -174,7 +186,8 @@ def test_count_intersections(device):
# count lots of random ray intersections to test the internal batching
# we expect no errors for this test
@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_count_lots_of_intersections(device):
cube = o3d.t.geometry.TriangleMesh.create_box()
vertex_positions = cube.vertex.positions
Expand All @@ -194,7 +207,8 @@ def test_count_lots_of_intersections(device):


@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_list_intersections(device):
cube = o3d.t.geometry.TriangleMesh.create_box()
vertex_positions = cube.vertex.positions
Expand Down Expand Up @@ -223,7 +237,8 @@ def test_list_intersections(device):
# list lots of random ray intersections to test the internal batching
# we expect no errors for this test
@pytest.mark.parametrize("device",
list_devices(enable_cuda=False, enable_sycl=True))
list_devices(enable_cuda=False,
enable_sycl=enable_sycl))
def test_list_lots_of_intersections(device):
cube = o3d.t.geometry.TriangleMesh.create_box()
vertex_positions = cube.vertex.positions
Expand Down

0 comments on commit 6523a11

Please sign in to comment.