From 602e71431fd65ecc0d17fda453335040e190a2b1 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 14 Aug 2025 15:14:42 -0700 Subject: [PATCH 1/2] fixes for macos CI --- .github/workflows/presubmit.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 4799be45..dbde98ca 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -695,17 +695,13 @@ jobs: run: | # Install Ninja only if it's the selected generator and it's not available. if [[ "${{matrix.GEN}}" == "Ninja Multi-Config" && ! `which ninja` ]]; then brew install ninja; fi && - # We need to provide an OpenCL driver for Intel CPU on mac - brew install pocl - POCL_INSTALL_PATH=$(brew --prefix pocl) - echo "OCL_ICD_VENDORS=$POCL_INSTALL_PATH/etc/OpenCL/vendors" >> $GITHUB_ENV cmake --version - - name: Install samples dependencies + - name: Install Sample Dependencies (Homebrew) run: | brew install vulkan-loader - - name: Install dependencies (Homebrew) + - name: Install Optional SDK Dependencies (Homebrew) if: matrix.DEPS == 'system' run: brew install tclap glm glew sfml mesa-glu @@ -758,10 +754,24 @@ jobs: cmake --build $GITHUB_WORKSPACE/build --config Debug --parallel `sysctl -n hw.logicalcpu` cmake --build $GITHUB_WORKSPACE/build --config Release --parallel `sysctl -n hw.logicalcpu` + - name: Set up Test Environment + run: | + # We need to provide an OpenCL driver for Intel CPU on mac + brew install pocl + POCL_INSTALL_PATH=$(brew --prefix pocl) + echo "OCL_ICD_VENDORS=$POCL_INSTALL_PATH/etc/OpenCL/vendors" >> $GITHUB_ENV + # This is needed so PoCL can find system libraries with newer LLVM versions, see: + # https://github.com/KhronosGroup/OpenCL-SDK/issues/144 + SDKROOT=$(xcrun --show-sdk-path) + echo "SDKROOT=$SDKROOT" >> $GITHUB_ENV + - name: Test working-directory: ${{runner.workspace}}/OpenCL-SDK/build run: | - EXCLUDE_REGEX="(multidevice|externalmemory).*" + # externalmemory is not supported on macos. + # callbackcpp is unexpectedly failing (segfault) with PoCL - needs more debug. + # multidevice is unexpectedly failing (clCreateSubBuffer error) with PoCL - needs more debug. + EXCLUDE_REGEX="(externalmemory|callbackcpp|multidevice).*" ctest -C Debug --output-on-failure --no-tests=error --parallel `sysctl -n hw.logicalcpu` --exclude-regex "$EXCLUDE_REGEX" ctest -C Release --output-on-failure --no-tests=error --parallel `sysctl -n hw.logicalcpu` --exclude-regex "$EXCLUDE_REGEX" From f0b7593adfb0d7b44b0cd3d0e981000a12b86d63 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Tue, 2 Sep 2025 09:41:46 -0700 Subject: [PATCH 2/2] Update .github/workflows/presubmit.yml --- .github/workflows/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index dbde98ca..42632c30 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -771,6 +771,7 @@ jobs: # externalmemory is not supported on macos. # callbackcpp is unexpectedly failing (segfault) with PoCL - needs more debug. # multidevice is unexpectedly failing (clCreateSubBuffer error) with PoCL - needs more debug. + # see: https://github.com/KhronosGroup/OpenCL-SDK/issues/146 EXCLUDE_REGEX="(externalmemory|callbackcpp|multidevice).*" ctest -C Debug --output-on-failure --no-tests=error --parallel `sysctl -n hw.logicalcpu` --exclude-regex "$EXCLUDE_REGEX" ctest -C Release --output-on-failure --no-tests=error --parallel `sysctl -n hw.logicalcpu` --exclude-regex "$EXCLUDE_REGEX"