Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b3e5f16
Add GitHub Actions CI/CD workflow
shaia Nov 28, 2025
2c7a352
Update CI workflow for cross-repo release triggering
shaia Nov 29, 2025
f7eabff
Fix CI checkout path - use workspace subdirectory
shaia Nov 29, 2025
e0a2aa1
Simplify build-wheels workflow and improve testing
shaia Nov 29, 2025
7daa3be
Remove unnecessary before-all in Linux cibuildwheel config
shaia Nov 29, 2025
11a413a
Fix CFD_ROOT override in CI workflow
shaia Nov 29, 2025
0456ac4
Add debug output and simplify before-build commands
shaia Nov 29, 2025
bb02227
Fix before-build commands to use cmake -S/-B flags
shaia Nov 29, 2025
648f57a
Fix CMake library path for single-config generators
shaia Nov 29, 2025
9b95179
Improve error handling for C extension import failures
shaia Nov 29, 2025
ab09e91
Add wheelhouse/ and src/cfd_lib/ to .gitignore
shaia Nov 29, 2025
29c4903
Use latest cfd release tag for wheel builds
shaia Nov 29, 2025
5e304d0
Pin pypa/gh-action-pypi-publish to v1.12.4
shaia Nov 29, 2025
6eae137
Improve test robustness and CI error handling
shaia Nov 29, 2025
e54b613
Fix cibuildwheel CFD_ROOT path for Linux containers
shaia Nov 29, 2025
2b5b906
Override platform-specific cibuildwheel settings for CI
shaia Nov 29, 2025
776e347
Consolidate cibuildwheel config in pyproject.toml
shaia Nov 29, 2025
3e7140b
Add wheel contents debugging to CI
shaia Nov 29, 2025
ca575f4
Add more debugging to test_package job
shaia Nov 29, 2025
0fe789c
Add CMake debug output and env var support for options
shaia Nov 29, 2025
c72dfd2
Add debug output to Linux before-build commands
shaia Nov 29, 2025
2fb0761
Add debug output to test-command to show extension files
shaia Nov 29, 2025
a84e6a4
Fix PyInit symbol visibility for Python extension
shaia Nov 29, 2025
f78f633
Add detailed debugging for wheel extension verification
shaia Nov 29, 2025
a2ea2bf
Add verbose cibuildwheel output for debugging
shaia Nov 29, 2025
f0b8274
Enable stable ABI (abi3) wheel generation in scikit-build
shaia Nov 29, 2025
ad87845
Fix extension suffix for stable ABI (abi3) wheels
shaia Nov 29, 2025
b1da0bd
Fix Windows extension suffix - use .pyd not .abi3.pyd
shaia Nov 29, 2025
67394ea
Use static MSVC runtime on Windows to avoid DLL dependencies
shaia Nov 29, 2025
74235aa
Skip Windows builds for now due to DLL linking issues
shaia Nov 29, 2025
ed15adf
Simplify CI to Python 3.12 on Linux only for debugging
shaia Nov 29, 2025
2e5701c
Build cp38-abi3 wheel and test on Python 3.8 and 3.12
shaia Nov 29, 2025
95cf38a
Simplify CI to basic Python 3.8 Linux build
shaia Nov 30, 2025
7ec99bc
Fix test job to use installed wheel, not source directory
shaia Nov 30, 2025
9e98294
Add macOS builds to CI
shaia Nov 30, 2025
b0c6670
Add stable ABI (abi3) wheel support for Python 3.8+
shaia Nov 30, 2025
a6e1808
Add Windows support to CI build matrix
shaia Nov 30, 2025
a32b65a
Fix Windows stable ABI linking by explicitly linking python3.lib
shaia Nov 30, 2025
46fc738
Fix Windows DLL load by using static MSVC runtime
shaia Nov 30, 2025
761fcaf
Use default MSVC runtime (/MD) to match CFD library
shaia Nov 30, 2025
356e785
Run CI on push to main/master only, PRs trigger separately
shaia Nov 30, 2025
5e3dada
Use static MSVC runtime for self-contained Windows wheel
shaia Nov 30, 2025
7a7a00d
Use MinGW instead of MSVC for Windows builds
shaia Nov 30, 2025
e367e22
Fix MinGW setup by using choco directly
shaia Nov 30, 2025
fadb721
Statically link MinGW runtime for self-contained Windows wheel
shaia Nov 30, 2025
3558227
Switch back to MSVC and add DLL dependency diagnostics
shaia Nov 30, 2025
4746ebd
Fix Windows stable ABI by manually linking python3.lib
shaia Nov 30, 2025
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
185 changes: 185 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: Build and Test Wheels

on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:

jobs:
build_wheel:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Checkout CFD C library
- name: Checkout CFD C library
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/cfd
path: cfd
fetch-depth: 0

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build scikit-build-core setuptools-scm

- name: Build CFD library (Unix)
if: runner.os != 'Windows'
run: |
cmake -S cfd -B cfd/build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build cfd/build --config Release
echo "=== CFD library built ==="
ls -la cfd/build/lib/

- name: Build CFD library (Windows)
if: runner.os == 'Windows'
run: |
cmake -S cfd -B cfd/build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
cmake --build cfd/build --config Release
echo "=== CFD library built ==="
dir cfd\build\lib\Release

- name: Build wheel (Unix)
if: runner.os != 'Windows'
env:
CFD_ROOT: ${{ github.workspace }}/cfd
CFD_STATIC_LINK: "ON"
run: |
echo "CFD_ROOT=$CFD_ROOT"
echo "Checking CFD library location..."
ls -la $CFD_ROOT/build/lib/ || echo "Library dir not found"
pip wheel . --no-deps --wheel-dir dist/
echo "=== Wheel built ==="
ls -la dist/

- name: Build wheel (Windows)
if: runner.os == 'Windows'
env:
CFD_ROOT: ${{ github.workspace }}/cfd
CFD_STATIC_LINK: "ON"
run: |
echo "CFD_ROOT=$env:CFD_ROOT"
echo "Checking CFD library location..."
dir "$env:CFD_ROOT\build\lib\Release"
pip wheel . --no-deps --wheel-dir dist/
echo "=== Wheel built ==="
dir dist

- name: Inspect wheel contents
run: |
python -c "
import glob, zipfile
for wheel in glob.glob('dist/*.whl'):
print(f'=== Contents of {wheel} ===')
with zipfile.ZipFile(wheel) as zf:
for name in zf.namelist():
print(name)
"

- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}
path: dist/*.whl

test_wheel:
name: Test wheel on ${{ matrix.os }} with Python ${{ matrix.python }}
needs: [build_wheel]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.8", "3.12"]

steps:
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python }}"

- uses: actions/download-artifact@v4
with:
name: wheel-${{ matrix.os }}
path: dist

- name: Install wheel (Unix)
if: runner.os != 'Windows'
run: |
python -m pip install --upgrade pip
pip install dist/*.whl
pip install pytest numpy

- name: Install wheel (Windows)
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade pip
pip install (Get-ChildItem dist/*.whl).FullName
pip install pytest numpy

- name: Debug Windows DLL (Windows)
if: runner.os == 'Windows'
run: |
# Find package directory via pip
$pkg_dir = python -c "import sysconfig; print(sysconfig.get_paths()['purelib'])"
$pkg_dir = "$pkg_dir\cfd_python"
echo "Package directory: $pkg_dir"
dir $pkg_dir
# Check what the .pyd file depends on
$pyd_file = Get-ChildItem "$pkg_dir\*.pyd" | Select-Object -First 1
echo "PYD file: $pyd_file"
if ($pyd_file) {
# Use dumpbin to show dependencies
$dumpbin = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" | Select-Object -First 1
echo "Using dumpbin: $dumpbin"
& $dumpbin.FullName /dependents $pyd_file.FullName
}

- name: Test import (Unix)
if: runner.os != 'Windows'
run: |
cd /tmp
python -c "
import cfd_python
print('Package loaded:', cfd_python.__file__)
print('Version:', cfd_python.__version__)
print('Has list_solvers:', hasattr(cfd_python, 'list_solvers'))
if hasattr(cfd_python, 'list_solvers'):
print('Solvers:', cfd_python.list_solvers())
"

- name: Test import (Windows)
if: runner.os == 'Windows'
run: |
cd $env:TEMP
python -c "import cfd_python; print('Package loaded:', cfd_python.__file__); print('Version:', cfd_python.__version__); print('Has list_solvers:', hasattr(cfd_python, 'list_solvers')); print('Solvers:', cfd_python.list_solvers()) if hasattr(cfd_python, 'list_solvers') else None"

# Checkout only tests directory for running tests
- uses: actions/checkout@v4
with:
sparse-checkout: tests
sparse-checkout-cone-mode: false

- name: Run tests (Unix)
if: runner.os != 'Windows'
run: |
cd /tmp
pytest $GITHUB_WORKSPACE/tests/ -v

- name: Run tests (Windows)
if: runner.os == 'Windows'
run: |
cd $env:TEMP
pytest "$env:GITHUB_WORKSPACE\tests" -v
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ _deps/
# Build directories
_skbuild/
*.egg-info/
wheelhouse/

# Local copy of CFD library (created during builds)
src/cfd_lib/

# VTK output files
*.vtk
Expand Down
Loading
Loading