This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git


The following commit(s) were added to refs/heads/main by this push:
     new 180741c9 chore(ci): Add MacOS Intel wheel build (#497)
180741c9 is described below

commit 180741c9792a7c580d8156ad0d3ac08c99e0e765
Author: Dewey Dunnington <[email protected]>
AuthorDate: Thu Jan 8 10:10:09 2026 -0600

    chore(ci): Add MacOS Intel wheel build (#497)
    
    Co-authored-by: Copilot <[email protected]>
---
 .github/workflows/python-wheels.yml                | 57 ++++++++++++++++++++--
 .../x86-64-osx-dynamic-release.cmake               | 27 ++++++++++
 ci/scripts/wheels-build-macos.sh                   |  8 ++-
 3 files changed, 87 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/python-wheels.yml 
b/.github/workflows/python-wheels.yml
index 277404cf..ca985a3e 100644
--- a/.github/workflows/python-wheels.yml
+++ b/.github/workflows/python-wheels.yml
@@ -89,7 +89,6 @@ jobs:
           VCPKG_DEFAULT_TRIPLET: x64-windows-dynamic-release
           CMAKE_TOOLCHAIN_FILE: ${{ github.workspace 
}}/vcpkg/scripts/buildsystems/vcpkg.cmake
           CIBW_BUILD: "*-win_amd64"
-          CIBW_TEST_SKIP: "cp314* cp38*"
           CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow 
geopandas
           CIBW_TEST_COMMAND: pytest {package}/tests -vv
 
@@ -143,7 +142,6 @@ jobs:
           ./wheels-build-macos.sh sedonadb
         env:
           VCPKG_ROOT: ${{ github.workspace }}/vcpkg
-          CIBW_TEST_SKIP: "cp314*"
           CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow 
geopandas duckdb
           CIBW_TEST_COMMAND: pytest {package}/tests -vv
 
@@ -152,6 +150,60 @@ jobs:
           name: release-wheels-macOS-arm64
           path: python/sedonadb/dist/*.whl
 
+  macOS-amd64:
+    runs-on: macos-15-intel
+
+    steps:
+      - uses: actions/checkout@v6
+        with:
+          submodules: 'true'
+          fetch-depth: 0
+
+      - uses: actions/setup-python@v6
+        with:
+          python-version: "3.13"
+
+      - name: Install cibuildwheel
+        run: python -m pip install cibuildwheel==3.1.4
+
+      - uses: Swatinem/rust-cache@v2
+        with:
+          # Update this key to force a new cache
+          prefix-key: "python-wheel-macOS-latest-v2"
+
+      - name: Clone vcpkg
+        uses: actions/checkout@v6
+        with:
+          repository: microsoft/vcpkg
+          ref: ${{ env.VCPKG_REF }}
+          path: vcpkg
+
+      - name: Set SedonaDB dev version
+        shell: bash
+        run: |
+          # Set the unique development version anywhere except a release branch
+          if [[ "${GITHUB_REF##*/}" =~ ^branch-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+            version="${GITHUB_REF##*/branch-}"
+            echo "${version}"
+          else
+            python ci/scripts/set_dev_version.py
+          fi
+
+      - name: Build and test wheels (sedonadb)
+        run: |
+          cd ci/scripts
+          ./wheels-build-macos.sh sedonadb
+        env:
+          VCPKG_ROOT: ${{ github.workspace }}/vcpkg
+          CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow 
geopandas duckdb
+          CIBW_TEST_COMMAND: pytest {package}/tests -vv
+          SEDONADB_MACOS_ARCH: x86_64
+
+      - uses: actions/upload-artifact@v6
+        with:
+          name: release-wheels-macOS-amd64
+          path: python/sedonadb/dist/*.whl
+
   wheels-linux:
     name: ${{ matrix.config.label }}
     runs-on: ${{ matrix.config.os }}
@@ -191,7 +243,6 @@ jobs:
           ./wheels-build-linux.sh ${{ matrix.config.arch }} sedonadb
         env:
           CIBW_SKIP: "*musllinux*"
-          CIBW_TEST_SKIP: "cp314*"
           CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow 
geopandas duckdb
           CIBW_TEST_COMMAND: pytest {package}/tests -vv
 
diff --git a/ci/scripts/custom-triplets/x86-64-osx-dynamic-release.cmake 
b/ci/scripts/custom-triplets/x86-64-osx-dynamic-release.cmake
new file mode 100644
index 00000000..f16f3f71
--- /dev/null
+++ b/ci/scripts/custom-triplets/x86-64-osx-dynamic-release.cmake
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
+set(VCPKG_OSX_ARCHITECTURES x86_64)
+set(VCPKG_BUILD_TYPE release)
+set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")
+
+set(VCPKG_LIBRARY_LINKAGE static)
+if(PORT MATCHES "geos")
+  set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
diff --git a/ci/scripts/wheels-build-macos.sh b/ci/scripts/wheels-build-macos.sh
index 460e91c2..2b767c5f 100755
--- a/ci/scripts/wheels-build-macos.sh
+++ b/ci/scripts/wheels-build-macos.sh
@@ -31,8 +31,12 @@ fi
 SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
 SEDONADB_DIR="$(cd "${SOURCE_DIR}/../.." && pwd)"
 
+# Default to arm64 but allow override to x86_64
+SEDONADB_MACOS_ARCH=${SEDONADB_MACOS_ARCH:-arm64}
+
 # Ensure we have our VCPKG_ROOT set and bootstrapped
-export VCPKG_DEFAULT_TRIPLET=arm64-osx-dynamic-release
+SEDONADB_MACOS_ARCH_HYPHENATED="${SEDONADB_MACOS_ARCH//_/-}"
+export 
VCPKG_DEFAULT_TRIPLET="${SEDONADB_MACOS_ARCH_HYPHENATED}-osx-dynamic-release"
 source ./wheels-bootstrap-vcpkg.sh
 
 # Set environment variables for vcpkg dependencies on MacOS. This is required 
because
@@ -43,7 +47,7 @@ source ./wheels-bootstrap-vcpkg.sh
 export 
CIBW_REPAIR_WHEEL_COMMAND_MACOS="DYLD_LIBRARY_PATH=$VCPKG_INSTALL_NAME_DIR 
delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$VCPKG_INSTALL_NAME_DIR 
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
 
 # Pass on environment variables specifically for the build
-export CIBW_ENVIRONMENT_MACOS="$CIBW_ENVIRONMENT_MACOS 
_PYTHON_HOST_PLATFORM=macosx-12.0-arm64 MACOSX_DEPLOYMENT_TARGET=12.0 
CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} MATURIN_PEP517_ARGS='--features 
s2geography,pyo3/extension-module'"
+export CIBW_ENVIRONMENT_MACOS="$CIBW_ENVIRONMENT_MACOS 
_PYTHON_HOST_PLATFORM=macosx-12.0-${SEDONADB_MACOS_ARCH} 
MACOSX_DEPLOYMENT_TARGET=12.0 CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} 
MATURIN_PEP517_ARGS='--features s2geography,pyo3/extension-module'"
 
 pushd "${SEDONADB_DIR}"
 python -m cibuildwheel --output-dir python/$1/dist python/$1

Reply via email to