Align local Bazel hydration with CI builds (#7084)

This commit is contained in:
2026-06-11 12:24:00 -07:00
committed by GitHub
parent 63feec92f4
commit 93b7301ee0
7 changed files with 64 additions and 30 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
bazel build //src/main/scala/net/eagle0/eagle:eagle_server
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
bazel build -c opt //src/main/cpp/net/eagle0/shardok:shardok-server
+24 -21
View File
@@ -26,35 +26,38 @@ case "$mode" in
;;
esac
targets=("$@")
if [ "${#targets[@]}" -eq 0 ]; then
targets=(
"//src/main/cpp/net/eagle0/shardok/library:engine"
"//src/main/scala/net/eagle0/eagle:eagle_server"
)
fi
tmp_root="${RUNNER_TEMP:-/private/tmp}"
run_id="${GITHUB_RUN_ID:-local}-$$"
output_base="${tmp_root%/}/eagle0-cache-parity-${mode}-${run_id}"
echo "Mode: $mode"
echo "Output base: $output_base"
echo "Targets:"
printf ' %s\n' "${targets[@]}"
bazel_args=(
"--output_base=$output_base"
"build"
"--remote_download_all"
)
run_bazel() {
echo "Bazel args:"
printf ' %s\n' "$@"
if [ "$mode" = "verify" ]; then
bazel_args+=(
"--remote_upload_local_results=false"
"--experimental_remote_require_cached"
"--disk_cache="
local bazel_args=(
"--output_base=$output_base"
"build"
"--remote_download_all"
)
if [ "$mode" = "verify" ]; then
bazel_args+=(
"--remote_upload_local_results=false"
"--experimental_remote_require_cached"
"--disk_cache="
)
fi
bazel "${bazel_args[@]}" "$@"
}
if [ "$#" -gt 0 ]; then
run_bazel "$@"
exit 0
fi
bazel "${bazel_args[@]}" "${targets[@]}"
run_bazel //src/main/scala/net/eagle0/eagle:eagle_server
run_bazel -c opt //src/main/cpp/net/eagle0/shardok:shardok-server
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
scripts/build_eagle_ci.sh
scripts/build_shardok_ci.sh