mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-27 14:09:56 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e5cf4e833
commit
07f7a5b442
1 file changed
+3
-10
+3
-10
@@ -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 '*'
|
||||
- |
|
||||
|
||||
Reference in new issue
Block a user