Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ jobs:
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
# pin the toolchain version to avoid surprises
Comment thread
Xuanwo marked this conversation as resolved.
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
- uses: rui314/setup-mold@v1
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down Expand Up @@ -77,6 +73,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
workspaces: java/core/lance-jni -> ../target/rust-maven-plugin/lance-jni
cache-targets: false
cache-workspace-crates: true
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
FORCE_COLOR: "1"
# Change this to bust all caches (may be needed periodically if the caches accumulate
# a lot of cruft).
CACHE_PREFIX: "1"
CACHE_PREFIX: "2"

jobs:
lint:
Expand All @@ -60,6 +60,8 @@ jobs:
with:
workspaces: python
prefix-key: ${{ env.CACHE_PREFIX }}
cache-targets: false
cache-workspace-crates: true
- name: Install linting tools
run: |
pip install ruff==0.11.2 maturin tensorflow tqdm ray[data] pyright datasets polars[pyarrow,pandas]
Expand All @@ -73,10 +75,6 @@ jobs:
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
- name: Install rustfmt
run: rustup component add rustfmt
- name: Install clippy
run: rustup component add clippy
- name: Lint Rust
run: |
ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v protoc | sort | uniq | paste -s -d "," -`
Expand Down Expand Up @@ -117,6 +115,8 @@ jobs:
with:
workspaces: python
prefix-key: ${{ env.CACHE_PREFIX }}
cache-targets: false
cache-workspace-crates: true
- uses: ./.github/workflows/build_linux_wheel
- uses: ./.github/workflows/run_tests
- name: Generate forward compatibility files
Expand All @@ -132,9 +132,7 @@ jobs:
source venv/bin/activate
pip install pytest --pre --extra-index-url https://pypi.fury.io/lancedb/ pylance==0.29.1.beta2
pytest python/tests/forward_compat --run-forward
# Make sure wheels are not included in the Rust cache
- name: Delete wheels
run: sudo rm -rf target/wheels

linux-arm:
timeout-minutes: 45
runs-on: ubuntu-2404-4x-arm64
Expand All @@ -156,6 +154,8 @@ jobs:
with:
workspaces: python
prefix-key: ${{ env.CACHE_PREFIX }}
cache-targets: false
cache-workspace-crates: true
- uses: ./.github/workflows/build_linux_wheel
with:
arm-build: "true"
Expand All @@ -165,9 +165,6 @@ jobs:
sudo apt update -y -qq
sudo apt install -y libhdf5-dev
- uses: ./.github/workflows/run_tests
# Make sure wheels are not included in the Rust cache
- name: Delete wheels
run: sudo rm -rf target/wheels
mac:
timeout-minutes: 45
name: Python macOS 3.12 ARM
Expand All @@ -189,13 +186,13 @@ jobs:
with:
workspaces: python
prefix-key: ${{ env.CACHE_PREFIX }}
cache-targets: false
cache-workspace-crates: true
- uses: ./.github/workflows/build_mac_wheel
- uses: ./.github/workflows/run_tests
with:
skip-torch: "true"
# Make sure wheels are not included in the Rust cache
- name: Delete wheels
run: rm -rf target/wheels

windows:
runs-on: windows-latest
timeout-minutes: 90
Expand All @@ -212,6 +209,8 @@ jobs:
with:
workspaces: python
prefix-key: ${{ env.CACHE_PREFIX }}
cache-targets: false
cache-workspace-crates: true
- uses: ./.github/workflows/build_windows_wheel
- uses: ./.github/workflows/run_tests
aws-integtest:
Expand All @@ -234,12 +233,11 @@ jobs:
with:
workspaces: python
prefix-key: ${{ env.CACHE_PREFIX }}
cache-targets: false
cache-workspace-crates: true
- uses: ./.github/workflows/build_linux_wheel
- name: Install dependencies
run: |
pip install ray[data]
pip install torch --index-url https://download.pytorch.org/whl/cpu
- uses: ./.github/workflows/run_integtests
# Make sure wheels are not included in the Rust cache
- name: Delete wheels
run: sudo rm -rf target/wheels
56 changes: 35 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-workspace-crates: true
- name: Install dependencies
run: |
sudo apt update
Expand All @@ -56,11 +56,9 @@ jobs:
run: |
ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v protoc | sort | uniq | paste -s -d "," -`
echo "ALL_FEATURES=${ALL_FEATURES}" >> $GITHUB_ENV
- uses: auguwu/clippy-action@1.4.0
with:
check-args: --locked --features ${{ env.ALL_FEATURES }} --tests --benches --examples
token: ${{secrets.GITHUB_TOKEN}}
deny: warnings
- name: Clippy
run: cargo clippy --locked --features ${{ env.ALL_FEATURES }} --all-targets -- -D warnings

cargo-deny:
name: Check Rust dependencies (cargo-deny)
runs-on: ubuntu-24.04
Expand All @@ -70,6 +68,7 @@ jobs:
with:
log-level: warn
command: check

linux-build:
runs-on: "ubuntu-24.04"
timeout-minutes: 60
Expand All @@ -85,18 +84,19 @@ jobs:
steps:
- uses: actions/checkout@v4
# pin the toolchain version to avoid surprises
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
# When using the nightly toolchain, do not surface warnings as check annotations
matcher: ${{ matrix.toolchain != 'nightly'}}
- name: Setup rust toolchain
run: |
rustup toolchain install ${{ matrix.toolchain }}
rustup default ${{ matrix.toolchain }}
Comment thread
Xuanwo marked this conversation as resolved.
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-workspace-crates: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Start DynamodDB and S3
run: docker compose -f docker-compose.yml up -d --wait
- name: Install cargo-llvm-cov
Expand Down Expand Up @@ -130,11 +130,15 @@ jobs:
timeout-minutes: 75
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "stable"
- name: Setup rust toolchain
run: |
rustup toolchain install stable
rustup default stable
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-workspace-crates: true
- name: Install dependencies
run: |
sudo apt -y -qq update
Expand Down Expand Up @@ -191,7 +195,6 @@ jobs:
working-directory: ./rust
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Select new xcode
# Default XCode right now is 15.0.1, which contains a bug that causes
# backtraces to not show properly. See:
Expand All @@ -202,6 +205,10 @@ jobs:
- name: Set up Rust
run: |
rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-workspace-crates: true
- name: Build tests
run: |
cargo test --locked --features fp16kernels,cli,tensorflow,dynamodb,substrait --no-run
Expand All @@ -219,6 +226,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-workspace-crates: true
- name: Install Protoc v21.12
working-directory: C:\
run: |
Expand All @@ -234,6 +244,7 @@ jobs:
run: cargo test
- name: Check benchmarks
run: cargo check --benches

msrv:
# Check the minimum supported Rust version
name: MSRV Check - Rust v${{ matrix.msrv }}
Expand All @@ -250,14 +261,17 @@ jobs:
with:
submodules: true
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-workspace-crates: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
- name: Install ${{ matrix.msrv }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.msrv }}
run: |
rustup toolchain install ${{ matrix.msrv }}
rustup default ${{ matrix.msrv }}
- name: cargo +${{ matrix.msrv }} check
run: |
ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v protoc | sort | uniq | paste -s -d "," -`
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# Feel free to upgrade to bring in new lints.
[toolchain]
channel = "1.86.0"
components = ["rustfmt", "clippy", "rust-analyzer"]
Loading