Skip to content

Commit 2fd070c

Browse files
committed
fix(ci): build Rust ext via maturin for tests; cap YAML sweep
1 parent 338589d commit 2fd070c

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101

102102
- name: Build and test
103103
working-directory: diffctx
104+
env:
105+
DIFFCTX_YAML_CASES_LIMIT: "20"
104106
run: |
105107
cargo test --release
106108
cargo build --release
@@ -136,10 +138,30 @@ jobs:
136138
cache: 'pip'
137139
cache-dependency-path: 'pyproject.toml'
138140

141+
- name: Install Rust
142+
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
143+
with:
144+
toolchain: stable
145+
146+
- name: Cache Cargo
147+
uses: actions/cache@v5
148+
with:
149+
path: |
150+
~/.cargo/registry
151+
~/.cargo/git
152+
diffctx/target
153+
key: cargo-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('diffctx/Cargo.lock') }}
154+
restore-keys: cargo-${{ runner.os }}-py${{ matrix.python-version }}-
155+
139156
- name: Install Dependencies
140157
run: |
141158
python -m pip install --upgrade pip
142159
pip install -e ".[dev,full]"
160+
pip install "maturin>=1,<2"
161+
162+
- name: Build and install diffctx Rust extension
163+
working-directory: diffctx
164+
run: maturin develop --release
143165

144166
- name: Run Tests with Coverage
145167
shell: bash

whitelist_vulture.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
from treemapper.diffctx.graph import CSRGraph, Graph
2+
from treemapper.diffctx.tokenizer import detect_profile, is_nlp_available
3+
14
from treemapper.clipboard import clipboard_available
25
from treemapper.diffctx import file_importance, fragmentation, git, graph_analytics, types, universe
3-
from treemapper.diffctx.graph import CSRGraph, Graph
46
from treemapper.diffctx.graph_analytics import QuotientNode
57
from treemapper.diffctx.pipeline import DiffContextTimeoutError
68
from treemapper.diffctx.project_graph import ProjectGraph
7-
from treemapper.diffctx.tokenizer import detect_profile, is_nlp_available
89
from treemapper.mcp.server import get_diff_context, get_file_context, get_tree_map, run_server
910

1011
_ = clipboard_available

0 commit comments

Comments
 (0)