From 07f7a5b4427636e7f4f2b9f93807d0a3837f0bd6 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Sun, 26 Apr 2026 11:34:06 +0300 Subject: [PATCH] ci(clippy): revert persistent CARGO_TARGET_DIR, keep CARGO_HOME fix librocksdb-sys debug build writes a multi-GB librocksdb.a static archive to /cache/cargo-target, filling the volume and causing build failure. Persistent cache is not safe for C++ heavy dependencies. Keep CARGO_HOME=/root/.cargo (avoids re-downloading the Rust crate registry on every run). CARGO_TARGET_DIR stays ephemeral (Docker container fs has ample space). Timeout stays at 3h to cover cold builds on slower runners. Co-Authored-By: Claude Sonnet 4.6 --- .gitlab-ci.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95cb5f6e..49e52c9c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -171,18 +171,11 @@ clippy: SKIP_WASM_BUILD: "1" # Use pre-baked registry in the CI image instead of re-downloading all # crates on every run (global CARGO_HOME=$CI_PROJECT_DIR/.cargo is wiped). + # NOTE: We intentionally do NOT persist CARGO_TARGET_DIR to /cache here — + # librocksdb-sys debug build produces a multi-GB librocksdb.a that fills + # the /cache volume. Docker container's ephemeral target dir is safer. CARGO_HOME: /root/.cargo timeout: 3h - before_script: - - rustup show - - rustc --version && cargo --version - - rustup target add wasm32v1-none - - export CACHE_KEY="$(cat Cargo.lock rust-toolchain.toml | md5sum | cut -c1-12)" - - export CARGO_TARGET_DIR="/cache/cargo-target/${CACHE_KEY}/clippy" - - mkdir -p "$CARGO_TARGET_DIR" - - find /cache/cargo-target -mindepth 1 -maxdepth 1 -type d ! -name "${CACHE_KEY}" -exec rm -rf {} + 2>/dev/null || true - - echo "CARGO_TARGET_DIR=$CARGO_TARGET_DIR (disk $(df -h /cache/cargo-target | tail -1 | awk '{print $3 "/" $2 " used, " $4 " free"}'))" - cache: [] script: - git config --global --add safe.directory '*' - |