Skip to content

Conversation

@LimHyungTae
Copy link
Member

Summary

Add comprehensive CI workflows for Windows and macOS platforms to support both C++ and Python builds across multiple versions and architectures.

Features Added

🪟 Windows Support

  • C++ Builds: Visual Studio 2019/2022 with x64 architecture
  • Python Builds: Python 3.9-3.12 across Windows 2019/2022
  • Dependencies: vcpkg for Eigen3, TBB, FLANN
  • Compiler: MSVC with Visual Studio generators

🍎 macOS Support

  • C++ Builds: macOS 12, 13, 14 (Intel x86_64 + Apple Silicon arm64)
  • Python Builds: Python 3.9-3.12 across all macOS versions
  • Dependencies: Homebrew for Eigen3, TBB, FLANN
  • Compiler: Clang with ccache optimization

Build Matrix

C++ Workflows (ci-cpp-windows-macos.yml)

  • Windows 2019/2022 (Visual Studio, x64)
  • macOS 12/13/14 (Clang, x86_64/arm64)
  • vcpkg (Windows) + Homebrew (macOS) dependency management

Python Workflows (ci-python-windows-macos.yml)

  • Windows: 2019, 2022 × Python 3.9, 3.10, 3.11, 3.12
  • macOS: 12, 13, 14 × Python 3.9, 3.10, 3.11, 3.12
  • Cross-platform pip install -e python/ testing
  • Import and functionality validation

Technical Details

Windows Enhancements

  • ✅ vcpkg integration for native dependencies
  • ✅ Visual Studio 2019/2022 generator support
  • ✅ x64 architecture targeting
  • ✅ PowerShell and cmd compatibility
  • ✅ Windows-specific artifact handling

macOS Enhancements

  • ✅ Universal binary support (x86_64 + arm64)
  • ✅ Homebrew dependency management
  • ✅ ccache build acceleration
  • ✅ Clang compiler optimization
  • ✅ macOS version compatibility (12-14)

Cross-Platform Features

  • ✅ Consistent Python package installation
  • ✅ Platform-specific caching strategies
  • ✅ Comprehensive error handling
  • ✅ Build artifact collection
  • ✅ Detailed summary reporting

Benefits

  • Broader platform support for contributors and users
  • Multi-architecture testing (x64, x86_64, arm64)
  • Comprehensive Python version coverage (3.9-3.12)
  • Native dependency management per platform
  • Optimized build performance with caching

This PR ensures KISS-Matcher builds reliably across all major platforms! 🚀

🤖 Generated with Claude Code

LimHyungTae and others added 20 commits September 15, 2025 15:37
Features:
- C++ build support for Windows (2019, 2022) and macOS (12, 13, 14)
- Python build support across multiple Python versions (3.9-3.12)
- Windows: Visual Studio generators with vcpkg dependencies
- macOS: Clang compiler with Homebrew dependencies
- Cross-platform dependency management (Eigen3, TBB, FLANN)
- Platform-specific optimizations (ccache on macOS, MSBuild on Windows)
- Comprehensive testing matrix covering x64 (Windows) and x86_64/arm64 (macOS)
- Build artifact uploads and detailed summary reports

Windows builds:
- Visual Studio 2019/2022 with x64 architecture
- vcpkg for dependency management
- MSVC compiler toolchain

macOS builds:
- macOS 12, 13, 14 support (Intel and Apple Silicon)
- Homebrew for dependency management
- Clang compiler with ccache optimization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Simplify CI matrix to only windows-2022 and macos-14 platforms
- Reduce Python versions to 3.9, 3.11, 3.12 for faster builds
- Fix macOS dependency installation with individual package installs
- Add proper Homebrew paths (PKG_CONFIG_PATH, CMAKE_PREFIX_PATH)
- Add CMAKE_FIND_FRAMEWORK=LAST flag for better dependency resolution
- Improve dependency verification steps for troubleshooting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Remove cmake from brew install list as it's already available on runners
- Prevents installation conflict between local/pinned and homebrew/core taps
- Keeps cmake verification in place to ensure it's working

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Install llvm via Homebrew for OpenMP support
- Set CC and CXX to use LLVM clang compilers instead of system clang
- System clang on macOS doesn't include OpenMP support
- Add verification to check LLVM installation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Install lz4 package through vcpkg for Windows builds
- Fixes CMake error: Could not find LZ4_LIBRARY using the following names: lz4
- Applied to both C++ and Python workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add LDFLAGS and CPPFLAGS for LLVM OpenMP libraries on macOS
- Ensures Python package build can find and link OpenMP libraries
- Resolves import/linking issues in Python binding compilation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add debugging output for vcpkg packages
- Improve LZ4 finding logic to work with vcpkg
- Use find_package(lz4) first, fallback to find_library
- Add proper target linking for LZ4 library
- Add USE_SYSTEM_LZ4=ON flag for CMake configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Fix environment variable syntax for Windows PowerShell ($env:GITHUB_ENV)
- Simplify LZ4 detection to use pkg-config first (vcpkg provides liblz4)
- Use unified LZ4_LIBRARIES variable for consistent linking
- This should resolve CMAKE_TOOLCHAIN_FILE being empty

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- PMC project hardcodes Unix-style flags (-Werror, -Wall, -Wextra)
- These flags are incompatible with MSVC compiler
- Remove problematic Unix flags and replace with MSVC equivalents (/W4)
- Apply fix after ROBIN/PMC targets are created via FetchContent

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…linking

- Remove complex Windows workflows due to MSVC compatibility issues
- Create focused macOS-only workflow for C++ and Python builds
- Add LZ4 Homebrew installation and library path configuration
- Fix LZ4 library discovery with Homebrew hints (/opt/homebrew/lib)
- Add proper LDFLAGS and CPPFLAGS for Python binding compilation
- Remove Windows-specific MSVC flag handling code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Critical fix for symbol not found error '__ZNSt3__113__hash_memoryEPKvm':

- Use system clang (not LLVM clang) for Python builds to match Python framework
- Explicitly force -stdlib=libc++ to ensure system C++ stdlib compatibility
- Configure OpenMP properly for system clang with Homebrew libomp
- Prevent mixing of LLVM libc++ and system libc++ that causes runtime symbol conflicts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Disable OpenMP completely for Python builds using CMAKE_DISABLE_FIND_PACKAGE_OpenMP=ON
- Allow CMake to build gracefully without OpenMP (set empty OpenMP_LIBS)
- Keep OpenMP enabled for C++ builds but disabled for Python extension
- This eliminates complex libomp/libc++ symbol linking issues on macOS

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Change include(FindOpenMP) to find_package(OpenMP QUIET)
- QUIET prevents CMake from erroring when OpenMP is not found
- Allows graceful building without OpenMP when disabled
- Fixes 'Could NOT find OpenMP' configuration errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…ython build

- Strip out all CC/CXX/CMAKE_ARGS customization
- Use default system environment for Python package build
- Let pip and scikit-build-core handle everything automatically
- This eliminates all potential environment variable conflicts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Debug environment variables and compiler settings
- Check all dependencies (eigen3, tbb, liblz4) availability
- Verify library paths in /opt/homebrew/lib
- This will help identify what's missing or misconfigured

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The Python build was failing because the ROBIN dependency requires OpenMP,
but the Python build step wasn't setting up the proper compiler environment.
Added the same LLVM clang compiler setup that works for the C++ build.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The ROBIN dependency was failing due to CMake version compatibility issues
with its PMC (ParMETIS Cooperative) sub-dependency. Added cmake flags to:
- Force disable USE_SYSTEM_ROBIN=OFF to avoid system dep issues
- Set CMAKE_POLICY_VERSION_MINIMUM=3.5 to handle compatibility
- Apply same fixes to both C++ and Python builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The tagged v.1.2.4 was failing due to CMake compatibility issues with
its PMC sub-dependency. Using the main branch to get latest fixes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The repository uses 'master' as the default branch, not 'main'.
This should fix the git clone error.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The PMC sub-dependency was causing CMake version compatibility issues.
Added flags to skip PMC tests/examples which should avoid the problematic
CMakeLists.txt with old cmake_minimum_required version.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants