mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
Align local Bazel hydration with CI builds (#7084)
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
bazel build //src/main/scala/net/eagle0/eagle:eagle_server
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
bazel build -c opt //src/main/cpp/net/eagle0/shardok:shardok-server
|
||||
@@ -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
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
scripts/build_eagle_ci.sh
|
||||
scripts/build_shardok_ci.sh
|
||||
Reference in New Issue
Block a user