Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 .
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading