perf: compute HNSW level counts after build #11473
Workflow file for this run
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
| name: Build and Run Java JNI Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/** | |
| pull_request: | |
| branches: | |
| - main | |
| - release/** | |
| 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 | |
| RUST_BACKTRACE: "1" | |
| jobs: | |
| rust-clippy-fmt: | |
| runs-on: ubuntu-24.04 | |
| name: Rust Clippy and Fmt Check | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| lance | |
| java/lance-jni -> ../target/rust-maven-plugin/lance-jni | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| - uses: rui314/setup-mold@v1 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Run cargo fmt | |
| working-directory: java/lance-jni | |
| run: cargo fmt --check | |
| - name: Rust Clippy | |
| working-directory: java/lance-jni | |
| run: cargo clippy --all-targets -- -D warnings | |
| build-and-test-java: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| java-version: [11, 17, 21] | |
| name: Build and Test with Java ${{ matrix.java-version }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| # pin the toolchain version to avoid surprises | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - uses: rui314/setup-mold@v1 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: java/lance-jni -> ../target/rust-maven-plugin/lance-jni | |
| - name: Set up Java ${{ matrix.java-version }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.java-version }} | |
| cache: "maven" | |
| - name: Running code style check with Java ${{ matrix.java-version }} | |
| working-directory: java | |
| run: | | |
| mvn spotless:check | |
| - name: Start localstack | |
| run: | | |
| docker compose -f docker-compose.yml up -d --wait | |
| - name: Running tests with Java ${{ matrix.java-version }} | |
| working-directory: java | |
| env: | |
| LANCE_INTEGRATION_TEST: "1" | |
| run: | | |
| mvn install |