mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-26 22:59:57 +00:00
this introduces some breaking changes in terms of rust API of creating FTS index, and the default index params changed Signed-off-by: BubbleCal <bubble-cal@outlook.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated default settings for full-text search (FTS) index creation: stemming, stop word removal, and ASCII folding are now enabled by default, while token position storage is disabled by default. - **Refactor** - Simplified and streamlined the configuration and handling of FTS index parameters for improved maintainability and consistency across interfaces. - Enhanced serialization and request construction for FTS index parameters to reduce manual handling and improve code clarity. - Improved test coverage by explicitly enabling positional indexing in FTS tests to support phrase queries. - **Chores** - Upgraded all internal dependencies related to FTS indexing to the latest version for enhanced compatibility and performance. - Updated package versions for Node.js, Python, and Rust components to the latest beta releases. - Improved CI workflows by adding Rust toolchain setup with formatting and linting tools. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: BubbleCal <bubble-cal@outlook.com> Co-authored-by: Will Jones <willjones127@gmail.com>
119 lines
4.2 KiB
YAML
119 lines
4.2 KiB
YAML
name: Build and Run Java JNI Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- java/**
|
|
pull_request:
|
|
paths:
|
|
- java/**
|
|
- rust/**
|
|
- .github/workflows/java.yml
|
|
env:
|
|
# This env var is used by Swatinem/rust-cache@v2 for the cache
|
|
# key, so we set it to make sure it is always consistent.
|
|
CARGO_TERM_COLOR: always
|
|
# Disable full debug symbol generation to speed up CI build and keep memory down
|
|
# "1" means line tables only, which is useful for panic tracebacks.
|
|
RUSTFLAGS: "-C debuginfo=1"
|
|
RUST_BACKTRACE: "1"
|
|
# according to: https://matklad.github.io/2021/09/04/fast-rust-builds.html
|
|
# CI builds are faster with incremental disabled.
|
|
CARGO_INCREMENTAL: "0"
|
|
CARGO_BUILD_JOBS: "1"
|
|
jobs:
|
|
linux-build-java-11:
|
|
runs-on: ubuntu-22.04
|
|
name: ubuntu-22.04 + Java 11
|
|
defaults:
|
|
run:
|
|
working-directory: ./java
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: java/core/lancedb-jni
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
components: rustfmt
|
|
- name: Run cargo fmt
|
|
run: cargo fmt --check
|
|
working-directory: ./java/core/lancedb-jni
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler libssl-dev
|
|
- name: Install Java 11
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 11
|
|
cache: "maven"
|
|
- name: Java Style Check
|
|
run: mvn checkstyle:check
|
|
# Disable because of issues in lancedb rust core code
|
|
# - name: Rust Clippy
|
|
# working-directory: java/core/lancedb-jni
|
|
# run: cargo clippy --all-targets -- -D warnings
|
|
- name: Running tests with Java 11
|
|
run: mvn clean test
|
|
linux-build-java-17:
|
|
runs-on: ubuntu-22.04
|
|
name: ubuntu-22.04 + Java 17
|
|
defaults:
|
|
run:
|
|
working-directory: ./java
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: java/core/lancedb-jni
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
components: rustfmt
|
|
- name: Run cargo fmt
|
|
run: cargo fmt --check
|
|
working-directory: ./java/core/lancedb-jni
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler libssl-dev
|
|
- name: Install Java 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
cache: "maven"
|
|
- run: echo "JAVA_17=$JAVA_HOME" >> $GITHUB_ENV
|
|
- name: Java Style Check
|
|
run: mvn checkstyle:check
|
|
# Disable because of issues in lancedb rust core code
|
|
# - name: Rust Clippy
|
|
# working-directory: java/core/lancedb-jni
|
|
# run: cargo clippy --all-targets -- -D warnings
|
|
- name: Running tests with Java 17
|
|
run: |
|
|
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS \
|
|
-XX:+IgnoreUnrecognizedVMOptions \
|
|
--add-opens=java.base/java.lang=ALL-UNNAMED \
|
|
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED \
|
|
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
|
|
--add-opens=java.base/java.io=ALL-UNNAMED \
|
|
--add-opens=java.base/java.net=ALL-UNNAMED \
|
|
--add-opens=java.base/java.nio=ALL-UNNAMED \
|
|
--add-opens=java.base/java.util=ALL-UNNAMED \
|
|
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
|
|
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
|
|
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED \
|
|
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
|
|
--add-opens=java.base/sun.nio.cs=ALL-UNNAMED \
|
|
--add-opens=java.base/sun.security.action=ALL-UNNAMED \
|
|
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED \
|
|
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED \
|
|
-Djdk.reflect.useDirectMethodHandle=false \
|
|
-Dio.netty.tryReflectionSetAccessible=true"
|
|
JAVA_HOME=$JAVA_17 mvn clean test
|