Repository navigation
Conversation
A cold build recompiles the bundled DuckDB's C++ amalgamation, and cold is every release and every CI run after a new rustc: v0.40.0's runs took 43 min on Windows CI and 34-50 min per release leg, and the first run under Rust 1.100 took an hour. libduckdb-sys builds DuckDB through CMake and forwards CMAKE_C/CXX_COMPILER_LAUNCHER, so setting those to sccache (GitHub Actions cache backend) wraps exactly DuckDB's compiles and leaves rustc to rust-cache. A new local action, .github/actions/sccache-cpp, does it for the three CI jobs and the release. On Windows it also loads the MSVC developer environment, because CMake ignores a launcher under the Visual Studio generator and libduckdb-sys picks Ninja only when ninja is on PATH; the job fails if it is not. Unmeasured until the probe in the next commit has run: whether a release build hits the objects CI's dev build stored.
Builds schemaic-db cold in the dev profile, then in release, and on Linux with cargo-zigbuild as well, printing sccache's stats after each, with rust-cache off so DuckDB is compiled every time. The release build's hit rate is the number docs/roadmap.md says to measure before relying on sccache. Delete before merging.
Owner
Author
|
Closed without merging. The duckdb crate is built with |
fadion
added a commit
that referenced
this pull request
Nov 19, 2026
The sccache plan assumed DuckDB compiles through CMake, which forwards compiler launchers. Under the `bundled` feature it compiles through the `cc` crate from sources unpacked into the build script's OUT_DIR, whose path changes with the profile and the rustc version. sccache keys on those paths, so a release would never hit CI's objects and neither would the first build after a new rustc. The attempt (#32) was closed unmerged. The roadmap now holds the finding, the remaining option (`bundled-cmake` plus sccache, with what it would change for every build) as an open recommendation, and three new traps the attempt ran into.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of the roadmap's "Keep the DuckDB compile out of every build".
What
.github/actions/sccache-cpp, a local composite action. It setsCMAKE_C_COMPILER_LAUNCHERandCMAKE_CXX_COMPILER_LAUNCHERto sccache, using the GitHub Actions cache backend. libduckdb-sys forwards both to CMake, so only DuckDB's C/C++ compiles are wrapped. rustc stays with rust-cache.ninjais on PATH. The job fails if Ninja is missing, so the launcher can't be ignored silently.release.yml.sccache-probe.yml(temporary): cold dev → release → zigbuild builds ofschemaic-dbwith rust-cache off, printing sccache stats after each.To measure before merging
zig ccworks at all.Then delete the probe, record the numbers in
docs/architecture/(and drop the phase from the roadmap), and merge.