Isolate Jenkins cargo environment

This commit is contained in:
2026-05-02 21:56:07 +08:00
parent 6c519970b4
commit 73d5ef40ed
4 changed files with 44 additions and 2 deletions

View File

@@ -62,7 +62,8 @@ pipeline {
sh '''
bash -lc '
set -euo pipefail
mkdir -p "${CARGO_HOME}" "${CARGO_TARGET_DIR}" "${SCCACHE_DIR}"
chmod +x scripts/jenkins-prepare-cargo-env.sh
source scripts/jenkins-prepare-cargo-env.sh
if ! command -v sccache >/dev/null 2>&1; then
echo "[api-build] 未找到 sccache改用 rustc 直接构建。"
unset RUSTC_WRAPPER

View File

@@ -63,7 +63,8 @@ pipeline {
sh '''
bash -lc '
set -euo pipefail
mkdir -p "${CARGO_HOME}" "${CARGO_TARGET_DIR}" "${SCCACHE_DIR}"
chmod +x scripts/jenkins-prepare-cargo-env.sh
source scripts/jenkins-prepare-cargo-env.sh
if ! command -v sccache >/dev/null 2>&1; then
echo "[stdb-build] 未找到 sccache改用 rustc 直接构建。"
unset RUSTC_WRAPPER