Skip to content

Quote glob env values in wheels.yml#171

Merged
astomodynamics merged 6 commits into
masterfrom
fix/quote-wheels-env-globs
Apr 5, 2026
Merged

Quote glob env values in wheels.yml#171
astomodynamics merged 6 commits into
masterfrom
fix/quote-wheels-env-globs

Conversation

@astomodynamics
Copy link
Copy Markdown
Owner

Summary

  • Quote CIBW_BUILD and CIBW_SKIP env values in wheels.yml to fix YAML parse error
  • Unquoted * characters were interpreted as YAML special syntax, causing workflow validation to fail on line 61

Unquoted `*` in CIBW_BUILD and CIBW_SKIP caused YAML parse errors.
Eigen's FetchContent was configuring its entire test suite
(CHOLMOD, UMFPACK, CUDA, Qt, Boost, etc.) causing slow builds
and failures in isolated CI environments like manylinux.
@astomodynamics astomodynamics force-pushed the fix/quote-wheels-env-globs branch from 07bb160 to 8c0a7b3 Compare April 4, 2026 22:29
Eigen's unsupported/test/ creates a custom target named "autodiff"
which collides with the real autodiff library when both are added
via FetchContent_MakeAvailable. Since Eigen is header-only, use
FetchContent_Populate to download without add_subdirectory, then
create the Eigen3::Eigen target manually.
FetchContent_Populate is deprecated in CMake 4.x (CMP0169), so
switch back to FetchContent_MakeAvailable. Use EXCLUDE_FROM_ALL
to limit Eigen's scope and BUILD_TESTING=OFF to prevent Eigen's
unsupported/test from creating an "autodiff" custom target that
collides with the real autodiff library.

Set Eigen3_DIR to the build tree so autodiff's find_package(Eigen3)
can locate the generated Eigen3Config.cmake.
- Add _USE_MATH_DEFINES for MSVC so M_PI is defined in <cmath>
- Remove macos-13 from build matrix (deprecated x86 runner)
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates CI wheel-build workflows to avoid YAML parsing issues with glob patterns, and also adjusts build configuration around Eigen/autodiff and MSVC compilation.

Changes:

  • Quote CIBW_BUILD / CIBW_SKIP values in the wheel build workflow to prevent YAML interpreting * as special syntax.
  • Remove macos-13 from the OS matrices in wheel build and publish workflows.
  • Modify CMake Eigen FetchContent settings (disable Eigen tests/docs, set Eigen3_DIR, add EXCLUDE_FROM_ALL) and add an MSVC compile definition.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
CMakeLists.txt Adjusts Eigen FetchContent configuration and adds an MSVC compile definition.
.github/workflows/wheels.yml Quotes cibuildwheel glob env values and updates the OS matrix.
.github/workflows/publish.yml Updates the OS matrix used for building artifacts prior to publish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt
endif()
# Point Eigen3_DIR at the build tree so autodiff's find_package(Eigen3)
# finds the generated Eigen3Config.cmake
set(Eigen3_DIR "${eigen_BINARY_DIR}" CACHE PATH "" FORCE)
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Eigen3 isn't found, this block fetches Eigen and sets Eigen3_DIR, but it never re-runs find_package(Eigen3) (nor does it recreate the Eigen3::Eigen target). Later the project links against Eigen3::Eigen, so configuration can fail unless the FetchContent'd Eigen happens to define that target. Consider re-invoking find_package(Eigen3 CONFIG REQUIRED) after setting Eigen3_DIR (or restoring the fallback creation of Eigen3::Eigen) to guarantee the target exists.

Suggested change
set(Eigen3_DIR "${eigen_BINARY_DIR}" CACHE PATH "" FORCE)
set(Eigen3_DIR "${eigen_BINARY_DIR}" CACHE PATH "" FORCE)
find_package(Eigen3 3.4 CONFIG REQUIRED NO_MODULE)

Copilot uses AI. Check for mistakes.
Comment thread CMakeLists.txt Outdated
Comment thread .github/workflows/wheels.yml
Comment thread .github/workflows/publish.yml
Comment thread CMakeLists.txt Outdated
Eigen's full configure probes for Fortran, Qt4, CUDA, OpenMP etc.
adding ~30s+ per wheel on Windows. Since Eigen is header-only, use
SOURCE_SUBDIR pointing to a nonexistent path so FetchContent downloads
the source without running add_subdirectory. Create the Eigen3::Eigen
target manually and write a minimal Eigen3Config.cmake for autodiff.
@astomodynamics astomodynamics merged commit 6ff8a55 into master Apr 5, 2026
6 checks passed
@astomodynamics astomodynamics deleted the fix/quote-wheels-env-globs branch April 5, 2026 00:00
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