Skip to content

Commit 7de594d

Browse files
igerberclaude
andcommitted
Fix CI: add rlib crate-type and use maturin build
- Add rlib to crate-type so cargo test can compile the library - Replace maturin-action develop with maturin build + pip install (develop command requires virtualenv which isn't set up) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1655cf6 commit 7de594d

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/rust-test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ jobs:
7474
- name: Install Rust toolchain
7575
uses: dtolnay/rust-toolchain@stable
7676

77-
- name: Build with maturin
78-
uses: PyO3/maturin-action@v1
79-
with:
80-
command: develop
81-
args: --release
82-
8377
- name: Install test dependencies
8478
run: pip install pytest numpy pandas scipy
8579

80+
- name: Build and install with maturin
81+
run: |
82+
pip install maturin
83+
maturin build --release
84+
pip install target/wheels/*.whl
85+
8686
- name: Verify Rust backend is available
8787
run: |
8888
python -c "from diff_diff import HAS_RUST_BACKEND; assert HAS_RUST_BACKEND, 'Rust backend not available'"

rust/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ license = "MIT"
77

88
[lib]
99
name = "diff_diff_rust"
10-
crate-type = ["cdylib"]
10+
# cdylib for Python extension, rlib for running tests
11+
crate-type = ["cdylib", "rlib"]
1112

1213
[dependencies]
1314
pyo3 = { version = "0.20", features = ["extension-module"] }

0 commit comments

Comments
 (0)