Commit 0ba80e5
ci: optimize build times with shared caching and streamlined workflows (#43)
## Summary
Apply learnings from
[lance-graph#143](lance-format/lance-graph#143)
to dramatically improve CI performance. That PR achieved a **74% speedup
(24min → 6min)** in Python tests through better caching and eliminating
duplicate builds.
## Changes
### 1. Shared Rust Cache Across All Workflows ⭐
- Switched from manual `cache@v4` to `Swatinem/rust-cache@v2`
- Added `shared-key: "lance-context-deps"` to all workflows
- **Impact**: Prevents duplicate compilation of Rust dependencies across
Python, Rust, and Style workflows
- Cache is now shared across all jobs instead of being isolated
### 2. Remove Nightly from Test Matrix
- Only test on `stable` toolchain (matches upstream lance project)
- **Impact**: ~50% reduction in Rust test time, prevents nightly
breakage from blocking PRs
- Stable is the primary deployment target
### 3. Standardize CARGO_INCREMENTAL=0
- Added to `python-test.yml` (was missing)
- Added to `style.yml` (was missing)
- Already present in `rust-test.yml`
- **Impact**: Consistent CI environment, no wasted incremental
compilation artifacts
### 4. Optimized Cache Configuration
- Removed `CARGO_TARGET_DIR` override (rust-cache handles this better)
- Standardized workspaces across all workflows to include both
`crates/lance-context-core` and `python`
- **Impact**: Better cache hit rates and management
## Expected Performance Impact
Based on the improvements seen in lance-graph:
- ✅ Reduced duplicate Rust compilations via shared cache key
- ✅ Faster CI runs with streamlined test matrix
- ✅ Better cache efficiency with rust-cache action
- ✅ Consistent build environment across all workflows
## Test Plan
- [x] All workflow files updated consistently
- [ ] Verify CI passes with new caching strategy
- [ ] Monitor CI times to confirm performance improvement
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7b9a528 commit 0ba80e5
3 files changed
Lines changed: 21 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
| |||
89 | 85 | | |
90 | 86 | | |
91 | 87 | | |
92 | | - | |
93 | | - | |
| 88 | + | |
94 | 89 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
102 | 94 | | |
103 | 95 | | |
104 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments