Skip to content

Commit 1655cf6

Browse files
igerberclaude
andcommitted
Fix CI workflow: macOS OpenBLAS paths and python-fallback job
- Add OPENBLAS_DIR and PKG_CONFIG_PATH env vars for macOS builds - Use PYTHONPATH for python-fallback job instead of pip install (maturin requires Rust toolchain which defeats the purpose of testing pure Python fallback) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 21a14c3 commit 1655cf6

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/rust-test.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
if: matrix.os == 'macos-latest'
6666
run: brew install openblas
6767

68+
- name: Set OpenBLAS paths (macOS)
69+
if: matrix.os == 'macos-latest'
70+
run: |
71+
echo "OPENBLAS_DIR=$(brew --prefix openblas)" >> $GITHUB_ENV
72+
echo "PKG_CONFIG_PATH=$(brew --prefix openblas)/lib/pkgconfig" >> $GITHUB_ENV
73+
6874
- name: Install Rust toolchain
6975
uses: dtolnay/rust-toolchain@stable
7076

@@ -87,7 +93,7 @@ jobs:
8793
- name: Run tests with Rust backend
8894
run: DIFF_DIFF_BACKEND=rust pytest tests/ -x -q
8995

90-
# Test pure Python fallback
96+
# Test pure Python fallback (without Rust extension)
9197
python-fallback:
9298
name: Pure Python Fallback
9399
runs-on: ubuntu-latest
@@ -99,15 +105,13 @@ jobs:
99105
with:
100106
python-version: '3.11'
101107

102-
- name: Install dependencies and package
103-
run: |
104-
pip install numpy pandas scipy pytest maturin
105-
# Install in editable mode - Rust build will be skipped if no Rust toolchain
106-
pip install -e . --no-build-isolation || pip install -e .
108+
- name: Install dependencies
109+
run: pip install numpy pandas scipy pytest
107110

108111
- name: Verify pure Python mode
109112
run: |
110-
python -c "from diff_diff import HAS_RUST_BACKEND; print(f'HAS_RUST_BACKEND: {HAS_RUST_BACKEND}')"
113+
# Use PYTHONPATH to import directly (skips maturin build)
114+
PYTHONPATH=. python -c "from diff_diff import HAS_RUST_BACKEND; print(f'HAS_RUST_BACKEND: {HAS_RUST_BACKEND}'); assert not HAS_RUST_BACKEND"
111115
112116
- name: Run tests in pure Python mode
113-
run: DIFF_DIFF_BACKEND=python pytest tests/ -x -q --ignore=tests/test_rust_backend.py
117+
run: PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/ -x -q --ignore=tests/test_rust_backend.py

0 commit comments

Comments
 (0)