From d1a2d8b3921d85bc873226e8f4a18940e15d1111 Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Fri, 28 Aug 2026 11:34:08 -0500 Subject: [PATCH] Enable sccache preprocessor-cache mode for wheel builds Wheel builds run in a fresh container path on every CI run, which defeats sccache's default direct-mode cache key (it hashes the literal compiler invocation, including include paths). Preprocessor-cache mode hashes the preprocessed source instead, so it survives that. sccache itself was already configured here via rapids-configure-sccache (shared with the conda build), but the preprocessor-cache env vars were never set. cudf's and rmm's wheel builds set the same two vars in the same place; rapids-configure-sccache (gha-tools) does not set them itself, so they're expected to be opt-in per repo. Co-Authored-By: Claude Sonnet 5 --- ci/build_wheel.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 92ec1cc2f2..fec5040544 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -28,6 +28,13 @@ source rapids-configure-sccache source rapids-datetime-string source rapids-init-pip +# Wheel builds happen in a fresh checkout path on every run, which breaks sccache's default +# direct-mode cache key (it includes the literal compiler invocation, e.g. include paths). +# Preprocessor-cache mode keys on the preprocessed source instead, so it survives that. Same +# pattern as cudf's and rmm's wheel builds. +export SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX="${package_name}-${RAPIDS_CONDA_ARCH}-cuda${RAPIDS_CUDA_VERSION%%.*}-wheel-preprocessor-cache" +export SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true + # Update the version to accomodate nightly and release changes for the wheel name RAPIDS_VERSION_SUFFIX=".post${RAPIDS_DATETIME_STRING}" \ rapids-generate-version > ./VERSION