diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
index a930ee84808271eb2de7dc770f77d8f1575f2a75..661bb96d050ce68cb717e777a0c3766d2ca792f1 100644
--- a/.github/workflows/wheels.yml
+++ b/.github/workflows/wheels.yml
@@ -18,7 +18,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ubuntu-20.04, windows-2019, macos-12]
+        os: [ubuntu-latest, windows-latest, macos-13, macos-14]
 
     steps:
       - uses: actions/checkout@v4
@@ -30,13 +30,13 @@ jobs:
           python-version: '3.x'
 
       - name: Install cibuildwheel
-        run: python -m pip install cibuildwheel==2.19.2
+        run: python -m pip install cibuildwheel==2.22.0
 
       - name: Build wheels
         shell: bash
         run: |
           set -x
-          if [[ "${{ matrix.os }}" == "windows-2019" ]]; then
+          if [[ ${{ matrix.os }} == windows-* ]]; then
             export CL_INC_DIR="D:/a/pyopencl/pyopencl/OpenCL-Headers/install/include"
             export CL_LIB_DIR="C:/Program Files/OpenCL-ICD-Loader/lib"
           fi
diff --git a/pyproject.toml b/pyproject.toml
index 34c15a934076f654bbaf3af22e6eec596830fc41..8ed52801edf6131dd64f7007f0ff3eb48e46e1a2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -154,6 +154,14 @@ test-command = "pytest {project}/test"
 test-extras = [
     "test",
 ]
+environment-pass = [
+    "CL_INC_DIR",
+    "CL_LIB_DIR",
+]
+test-skip = [
+    "*-macosx_*:arm64",
+    "*-macosx_arm64",
+]
 
 [tool.cibuildwheel.linux]
 skip = [
diff --git a/scripts/build-ocl-macos.sh b/scripts/build-ocl-macos.sh
index 9277c1641c3f86e3542a58dadf442e8544f43949..b17f81290ae00c145c0623230a53506a41c802cd 100644
--- a/scripts/build-ocl-macos.sh
+++ b/scripts/build-ocl-macos.sh
@@ -8,11 +8,11 @@ git clone --branch v2022.01.04 https://github.com/KhronosGroup/OpenCL-Headers
 
 
 
-cmake -D CMAKE_INSTALL_PREFIX=./OpenCL-Headers/install -S ./OpenCL-Headers -B ./OpenCL-Headers/build 
+cmake -D CMAKE_INSTALL_PREFIX=./OpenCL-Headers/install -S ./OpenCL-Headers -B ./OpenCL-Headers/build
 cmake --build ./OpenCL-Headers/build --target install
 
 cmake -D CMAKE_PREFIX_PATH=${PWD}/OpenCL-Headers/install -D OPENCL_ICD_LOADER_HEADERS_DIR=${PWD}/OpenCL-Headers/install/include -D CMAKE_INSTALL_PREFIX=./OpenCL-ICD-Loader/install -S ./OpenCL-ICD-Loader -B ./OpenCL-ICD-Loader/build 
 cmake --build ./OpenCL-ICD-Loader/build --target install --config Release
 
 echo "PyOpenCL wheel includes Khronos Group OpenCL-ICD-Loader which is licensed as below" >> ${SCRIPT_DIR}/../LICENSE
-cat ./OpenCL-ICD-Loader/LICENSE >> ${SCRIPT_DIR}/../LICENSE
\ No newline at end of file
+cat ./OpenCL-ICD-Loader/LICENSE >> ${SCRIPT_DIR}/../LICENSE