Skip to content

Commit

Permalink
Avoid OpenCL functionality on MacOS builds
Browse files Browse the repository at this point in the history
Unfortunately even the simplest clGetDeviceIds function doesn't work
correctly anymore on macOS (at least in GHA), and even simple tools like
clinfo fail to query the list of devices in the platform. Let's
therefore simply turn OpenCL support off in macOS builds.

Signed-off-by: Rodrigo Tobar <[email protected]>
  • Loading branch information
rtobar committed Jul 10, 2024
1 parent 1f7a706 commit 265db1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ jobs:
- name: Configure
env:
LIBPROFIT_NO_OPENMP: ${{ matrix.omp && 'OFF' || 'ON' }}
LIBPROFIT_NO_OPENCL: ${{ matrix.os == 'macos-latest' && 'ON' || 'OFF' }}
LIBPROFIT_USE_R: ${{ matrix.use_r && 'ON' || 'OFF' }}
CMAKE_EXTRA_FLAGS: ${{ matrix.poor_build && '-DLIBPROFIT_NO_OPENCL=ON -DLIBPROFIT_NO_OPENMP=ON -DLIBPROFIT_NO_FFTW=ON -DLIBPROFIT_NO_SIMD=ON' || '' }}
run: |
cmake -B ${CI_BUILD_DIR} -G Ninja \
-DLIBPROFIT_NO_OPENMP=$LIBPROFIT_NO_OPENMP \
-DLIBPROFIT_NO_OPENCL=$LIBPROFIT_NO_OPENCL \
-DLIBPROFIT_TEST=ON \
-DLIBPROFIT_USE_R=$LIBPROFIT_USE_R \
-DCMAKE_CXX_COMPILER=$CXX \
Expand All @@ -70,4 +72,4 @@ jobs:
- name: Run unit tests
run: |
cd ${CI_BUILD_DIR}
ctest --output-on-failure || ${{ matrix.os == 'macos-latest' && 'true' || 'false' }}
ctest --output-on-failure

0 comments on commit 265db1b

Please sign in to comment.