Commit 84fa30f
ci: fix sccache C++ caching on Windows for Python builds (#174)
* ci: build Python wheel once per OS, test across Python versions
Split the Python CI workflow into build and test phases. The build
job compiles the abi3 wheel once per OS, then test jobs download
and install it across Python 3.10-3.13. This avoids redundant Rust
compilation — particularly on Windows where builds take ~30 min each.
Also removes path filters so Python tests run on all repo changes,
since the build overhead is now minimal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: use Python 3.11 for wheel build step
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Revert "ci: use Python 3.11 for wheel build step"
This reverts commit d8b29c5.
* ci: set CC_WRAPPER=sccache to cache C/C++ builds on Windows
sccache sees zero C/C++ compilations on Windows because the cc crate
doesn't auto-detect sccache as a compiler wrapper with MSVC. Setting
CC_WRAPPER=sccache explicitly routes cl.exe calls through sccache,
enabling caching of DuckDB and other C/C++ dependency builds.
The first run will still be slow (all cache misses), but subsequent
runs should benefit from ~300 cached C/C++ compilation results.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: use CC/CXX=sccache cl on Windows to cache DuckDB C++ builds
CC_WRAPPER didn't work because the cc crate doesn't check that env var.
The real issue: when the cc crate finds MSVC cl.exe via find_msvc_tools,
it bypasses the RUSTC_WRAPPER-based sccache fallback that works on Linux.
Setting CC/CXX='sccache cl' on Windows makes the cc crate's env_tool
parser recognize "sccache" as a known wrapper and "cl" as the compiler.
This routes the ~21-minute libduckdb-sys C++ build through sccache.
First run will still be slow (cache seeding), but subsequent runs should
see C/C++ cache hits and significantly faster Windows builds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: use ilammy/msvc-dev-cmd to put cl.exe on PATH for sccache
The previous attempt failed because sccache couldn't find bare 'cl' -
MSVC tools aren't on PATH by default. ilammy/msvc-dev-cmd runs vcvarsall
to set up the MSVC environment, putting cl.exe on PATH so that
'sccache cl' works as a CC/CXX wrapper.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: simplify back to single test job now that sccache caches C++ on Windows
Remove the build/test split since sccache should make Windows builds
fast enough (~5 min) that compiling per Python version is acceptable.
The diff from main is now minimal: remove path filters, add MSVC setup
+ CC/CXX env vars for sccache C++ caching on Windows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 254a2b0 commit 84fa30f
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
0 commit comments