Add sedonaDB worker to Sedona vectorized udfs #3760
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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. | |
| name: Python build and publish wheels | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'common/**' | |
| - 'spark/**' | |
| - 'spark-shaded/**' | |
| - 'pom.xml' | |
| - 'python/**' | |
| - '.github/workflows/python-wheel.yml' | |
| pull_request: | |
| branches: | |
| - '*' | |
| paths: | |
| - 'common/**' | |
| - 'spark/**' | |
| - 'spark-shaded/**' | |
| - 'pom.xml' | |
| - 'python/**' | |
| - '.github/workflows/python-wheel.yml' | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up QEMU | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| # temporarily pin to qemu@v8 to workaround non-determininstic gcc segfaults | |
| # https://github.com/docker/setup-qemu-action/issues/188 | |
| image: tonistiigi/binfmt:qemu-v8.1.5 | |
| platforms: all | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_SKIP: 'pp* *musl*' | |
| CIBW_ARCHS_LINUX: 'x86_64 aarch64' | |
| CIBW_ARCHS_WINDOWS: 'AMD64 ARM64' | |
| CIBW_ARCHS_MACOS: 'x86_64 arm64' | |
| with: | |
| package-dir: python | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Build sdist | |
| run: cd python && uv build --sdist | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: cibw-sdist | |
| path: python/dist/*.tar.gz | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| # publish when a GitHub Release is created | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| environment: pypi | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for Trusted Publishing | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| # unpacks wheel files into artifacts | |
| pattern: cibw-* | |
| merge-multiple: false | |
| path: artifacts | |
| - name: Copy everything to the dist folder | |
| run: | | |
| mkdir -p dist | |
| for pattern in artifacts/cibw-sdist/* artifacts/cibw-wheels-macos-*/* artifacts/cibw-wheels-ubuntu-*/* artifacts/cibw-wheels-windows-*/*; do | |
| cp -r $pattern dist 2>/dev/null || echo "No files matched $pattern" | |
| done | |
| echo "Content copied to dist." | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| # repository_url: https://test.pypi.org/legacy/ # to test |