Skip Namespace remote cache probe on macOS
This commit is contained in:
parent
4a1ea9b471
commit
06375ba328
2 changed files with 20 additions and 4 deletions
|
|
@ -52,6 +52,23 @@ configure_bazel_remote_cache() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
local bazelrc_path
|
||||
bazelrc_path="${NSC_BAZELRC_PATH:-${TMPDIR:-/tmp}/burrow-nsc-cache.bazelrc}"
|
||||
portable_mkdir -p "$(dirname "$bazelrc_path")"
|
||||
|
||||
if [[ "$(uname -s 2>/dev/null || true)" == "Darwin" ]]; then
|
||||
append_bazel_storage_cache "$bazelrc_path"
|
||||
export BURROW_BAZEL_NSCCACHE_ACTIVE=0
|
||||
export BURROW_BAZEL_NSCCACHE_BAZELRC="$bazelrc_path"
|
||||
echo "::warning ::Namespace Bazel remote cache probe skipped on macOS; using local Bazel repository/disk cache."
|
||||
if [[ -n "${GITHUB_ENV:-}" ]]; then
|
||||
echo "BURROW_BAZEL_NSCCACHE_ACTIVE=0" >> "$GITHUB_ENV"
|
||||
echo "BURROW_BAZEL_NSCCACHE_BAZELRC=$bazelrc_path" >> "$GITHUB_ENV"
|
||||
echo "NSC_BAZELRC_PATH=$bazelrc_path" >> "$GITHUB_ENV"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
export BURROW_BAZEL_NSCCACHE_ACTIVE=0
|
||||
if ! command -v nsc >/dev/null 2>&1; then
|
||||
if bash Scripts/ci/ensure-nsc.sh; then
|
||||
|
|
@ -68,9 +85,6 @@ configure_bazel_remote_cache() {
|
|||
fi
|
||||
fi
|
||||
|
||||
local bazelrc_path
|
||||
bazelrc_path="${NSC_BAZELRC_PATH:-${TMPDIR:-/tmp}/burrow-nsc-cache.bazelrc}"
|
||||
portable_mkdir -p "$(dirname "$bazelrc_path")"
|
||||
local probe_timeout="${BURROW_NSC_CACHE_PROBE_TIMEOUT:-30s}"
|
||||
if optional_timeout "$probe_timeout" nsc auth check-login >/dev/null 2>&1 &&
|
||||
optional_timeout "$probe_timeout" nsc cache bazel setup --bazelrc "$bazelrc_path" >/dev/null 2>&1; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue