Skip to content

Conversation

paultiq
Copy link
Contributor

@paultiq paultiq commented Sep 19, 2025

While working on the 3.14 stuff, I noticed how slow the Windows builds were in GHA Runners. With some experimentation, I found enabling Ninja makes a significant impact.

This PR speeds Windows builds by enabling Ninja.

Changes to packaging_wheels.yml workflow:

  • Sets vcvar's using ilammy/msvc-dev-cmd action. This (or similar env vars) are needed to find the linker.
  • Enables Ninja by passing "-G Ninja" to cmake.args

Functional changes:

  • None

Impact:

  • Average build times cut from ~45 minutes to ~30 minutes

edit:

  • An alternative to CIBW_ENVIRONMENT_WINDOWS: PYTHON_GIL=1 CMAKE_BUILD_TYPE=Release is to exclude Jemalloc on Debug builds too... I'm not sure why it's only disabled for Release.

…ction), disable unnecessary ccache from Windows CIBW
@evertlammerts
Copy link
Collaborator

Thanks @paultiq, I'm putting this on the list to dig in to. We should check whether we can do this on core before making the change here, since that's where duckdb itself is tested in excruciating depth.

@paultiq
Copy link
Contributor Author

paultiq commented Sep 23, 2025

Thinking about this for a moment, if this is of interest, the next step should really be to do a side by side comparison of the compiler flags being passed by ninja and msbuild. There's a few differences.

Alternatives for improving build time:

  • Enable msbuild parallelism
  • Using ninja for dev or PR smoketests. I also have a branch that cuts build times to < 10 minutes using an sccache. Not meant for release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants