ci: enable Rust build artifact caching in Python tests#143
Open
beinan wants to merge 4 commits intolance-format:mainfrom
Open
ci: enable Rust build artifact caching in Python tests#143beinan wants to merge 4 commits intolance-format:mainfrom
beinan wants to merge 4 commits intolance-format:mainfrom
Conversation
Fix Rust cache configuration to properly cache compiled artifacts. This should significantly reduce the maturin develop step time in CI by reusing cached builds when Rust code hasn't changed. Changes: - Set correct workspace path to crates/lance-graph-python - Remove cache-targets: false to enable artifact caching (defaults to true) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Configure all workflows to share a single Rust dependency cache using shared-key. This allows different workflows to reuse compiled artifacts for dependencies like Arrow, DataFusion, Tokio, and aws-lc-sys. Changes: - Add shared-key: "lance-graph-deps" to all rust-cache configurations - Include both crates/lance-graph and crates/lance-graph-python workspaces - Remove cache-targets: false to enable target directory caching - Apply to: python-test.yml, build.yml, rust-test.yml, style.yml Expected impact: - First workflow run compiles dependencies and populates shared cache - Subsequent workflows (even different ones) reuse cached dependencies - Massive time savings: 5+ min build → <1 min for unchanged dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This trivial change will test if the shared Rust cache is working. Expected: Build time should drop from 23min to <2min.
Root cause: CARGO_INCREMENTAL=0 was preventing cargo from reusing any cached compilation artifacts, making rust-cache ineffective. Setting CARGO_INCREMENTAL=1 allows cargo to: - Reuse compiled .rlib files from cache - Skip recompiling unchanged dependencies - Dramatically reduce build times (5min -> <1min expected) Applied to: python-test.yml, build.yml, rust-test.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
shared-key: "lance-graph-deps"to share a single cachecrates/lance-graphandcrates/lance-graph-pythoncache-targets: falseto cache compiled artifactsHow it works
Expected Impact
Before:
After:
Test plan
🤖 Generated with Claude Code