diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7c9258..5cc7a27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: - name: Install dependencies run: | - pip install "gemmology-cdl-parser @ git+https://github.com/gemmology-dev/cdl-parser.git" + pip install gemmology-cdl-parser pip install -e ".[dev]" -v - name: Verify native module loaded @@ -103,7 +103,7 @@ jobs: - name: Install without native module run: | - pip install "gemmology-cdl-parser @ git+https://github.com/gemmology-dev/cdl-parser.git" + pip install gemmology-cdl-parser # Install without building native module (skip cmake) pip install numpy scipy pytest pytest-cov ruff mypy pip install -e . --no-build-isolation --config-settings=cmake.define.SKIP_NATIVE=ON || pip install -e . @@ -146,7 +146,7 @@ jobs: - name: Install dependencies run: | - pip install "gemmology-cdl-parser @ git+https://github.com/gemmology-dev/cdl-parser.git" + pip install gemmology-cdl-parser pip install -e ".[dev]" --no-build-isolation || pip install numpy scipy ruff mypy - name: Lint with Ruff @@ -173,7 +173,7 @@ jobs: - name: Install dependencies run: | - pip install "gemmology-cdl-parser @ git+https://github.com/gemmology-dev/cdl-parser.git" + pip install gemmology-cdl-parser # Install build deps and dev dependencies first, then package pip install scikit-build-core pybind11 numpy scipy pytest pytest-cov pip install -e . --no-build-isolation diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 3d164ad..2f241a9 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -37,12 +37,16 @@ jobs: CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*" # Skip musllinux (Alpine) and PyPy CIBW_SKIP: "*-musllinux* pp*" - # Install Eigen before building (detect package manager) + # Skip in-container tests (CI already runs the full test suite). + # Testing inside cibuildwheel fails because scipy needs OpenBLAS + # to build from source in the manylinux container. + CIBW_TEST_SKIP: "*" + # Install Eigen and OpenBLAS before building CIBW_BEFORE_ALL_LINUX: | if command -v yum &> /dev/null; then - yum install -y eigen3-devel + yum install -y eigen3-devel openblas-devel elif command -v apt-get &> /dev/null; then - apt-get update && apt-get install -y libeigen3-dev + apt-get update && apt-get install -y libeigen3-dev libopenblas-dev fi CIBW_BEFORE_ALL_MACOS: | brew install eigen @@ -53,9 +57,7 @@ jobs: CMAKE_PREFIX_PATH="C:\\ProgramData\\chocolatey\\lib\\eigen\\share\\eigen3\\cmake" # Install cdl-parser dependency before building CIBW_BEFORE_BUILD: > - pip install "gemmology-cdl-parser @ git+https://github.com/gemmology-dev/cdl-parser.git" - # Skip wheel test - cdl-parser dependency not available in cibuildwheel test env - # CIBW_TEST_COMMAND: python -c "from crystal_geometry import get_backend; print(f'Backend: {get_backend()}')" + pip install gemmology-cdl-parser # Repair wheels (bundle libraries) CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair -w {dest_dir} {wheel}" CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-wheel -w {dest_dir} {wheel}" diff --git a/pyproject.toml b/pyproject.toml index fcd6731..af49d5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,11 +94,12 @@ USE_OPENMP = "OFF" build = "cp310-* cp311-* cp312-* cp313-*" # Skip musllinux and PyPy skip = "*-musllinux* pp*" -# Test the built wheel -test-command = "python -c \"from crystal_geometry import get_backend; print(f'Backend: {get_backend()}')\"" +# Skip in-container tests (CI runs the full test suite separately). +# Testing inside cibuildwheel fails because scipy needs OpenBLAS in manylinux. +test-skip = "*" [tool.cibuildwheel.linux] -before-all = "yum install -y eigen3-devel || (apt-get update && apt-get install -y libeigen3-dev)" +before-all = "yum install -y eigen3-devel openblas-devel || (apt-get update && apt-get install -y libeigen3-dev libopenblas-dev)" repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}" [tool.cibuildwheel.macos]