Skip to content

Add sedonaDB worker to Sedona vectorized udfs #5817

Add sedonaDB worker to Sedona vectorized udfs

Add sedonaDB worker to Sedona vectorized udfs #5817

Workflow file for this run

# 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: Docs build
on:
push:
branches:
- master
- branch-*
pull_request:
branches:
- '*'
permissions:
contents: write
env:
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: true # zizmor: ignore[credential-persistence]
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '11'
- name: Compile JavaDoc
run: mvn -q clean install -DskipTests && mkdir -p docs/api/javadoc/spark && cp -r spark/common/target/apidocs/* docs/api/javadoc/spark/
- name: Compile ScalaDoc
run: mvn generate-sources scala:doc -pl !common,!snowflake,!flink && mkdir -p docs/api/scaladoc/spark && cp -r spark/common/target/site/scaladocs/* docs/api/scaladoc/spark
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'docs-overrides/package-lock.json'
- name: Install docs-overrides dependencies
run: |
cd docs-overrides
npm ci
- name: Build docs-overrides assets
run: |
cd docs-overrides
npx gulp build
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Sync doc environment
run: uv sync --group docs
- run: sudo apt update
- uses: r-lib/actions/[email protected]
with:
r-version: release
use-public-rspm: true
- name: Query R dependencies
uses: r-lib/actions/[email protected]
with:
cache: true
extra-packages: |
any::pkgdown
working-directory: './R'
- run: Rscript -e 'pkgdown::build_site(pkg = "./R", preview = FALSE, override = list(destination = "../docs/api/rdocs"))'
- name: Install Python documentation dependencies
run: |
# Get Spark version from pom.xml
SPARK_VERSION=$(mvn help:evaluate -Dexpression=spark.version -q -DforceStdout)
# Install pyspark matching Spark version (other deps handled by uv sync)
uv pip install pyspark==$SPARK_VERSION
# Install sedona with all optional dependencies for complete documentation
uv pip install -e python/.[all]
- name: Build Python API documentation with Sphinx
env:
CI: true
run: |
# Use uv run so sphinx-build from the virtual environment is on PATH
uv run bash -c 'cd python/sedona/doc && make clean && make html'
mkdir -p docs/api/pydocs
cp -r python/sedona/doc/_build/html/* docs/api/pydocs/
- run: git config --global user.name = "GitHub Action"
- run: git config --global user.email = "[email protected]"
- run: uv run mkdocs build
- name: Deploy the doc to the website branch
if: ${{ github.event_name != 'pull_request' && github.repository == 'apache/sedona' }}
run: |
if [[ "${GITHUB_REF##*/}" == "master" ]]; then
git fetch origin website --depth=1
uv run mike deploy latest-snapshot -b website -p
elif [[ "${GITHUB_REF##*/}" =~ ^branch-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
git fetch origin website --depth=1
version="${GITHUB_REF##*/branch-}"
uv run mike deploy --update-aliases "$version" latest -b website -p
fi
- run: mkdir staging
- run: cp -r site/* staging/
- uses: actions/upload-artifact@v6
with:
name: generated-docs
path: staging
- name: Cache Python packages
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache Node modules
uses: actions/cache@v5
with:
path: docs-overrides/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('docs-overrides/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-