blob: 979e43c34bc37db5bd1ba3386d7d40d986ebfa39 [file]
# 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: CI
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rust cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --workspace -- -D warnings
- name: Test Rust workspace
run: cargo test --workspace
java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rust cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '8'
cache: maven
- name: Build JNI library
run: cargo build --release -p paimon-ftindex-jni
- name: Test Java API
run: mvn -q -f java/pom.xml test
env:
PAIMON_FTINDEX_JNI_LIB_PATH: ${{ github.workspace }}/target/release/libpaimon_ftindex_jni.so
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rust cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build FFI library
run: cargo build --release -p paimon-ftindex-ffi
- name: Test Python API
working-directory: python
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
python -m pytest -q tests
env:
PAIMON_FTINDEX_LIB_PATH: ${{ github.workspace }}/target/release