Reduce the preparation work on cold project for build cleaning We don't really need to build everything, just loading the repos and building the genrules.
diff --git a/.github/bin/run-build-cleaner.sh b/.github/bin/run-build-cleaner.sh index d5b03f7..e372646 100755 --- a/.github/bin/run-build-cleaner.sh +++ b/.github/bin/run-build-cleaner.sh
@@ -17,19 +17,25 @@ set -e BANT=$($(dirname $0)/get-bant-path.sh) +BAZEL=bazel # Run build so that we have all dependencies downloaded and genrules # materialized. -bazel build -k --remote_download_outputs=all ... +for f in abseil-cpp nlohmann_json protobuf re2 rules_flex zlib googletest ; do + "${BAZEL}" fetch --repo "@$f" > /dev/null 2>&1 +done -if "${BANT}" -q dwyu ... ; then +"${BAZEL}" build -k --remote_download_outputs=all \ + $(${BANT} genrule-outputs ... -c2) > /dev/null 2>&1 + +if "${BANT}" dwyu $@; then echo "Dependencies ok." >&2 else cat >&2 <<EOF Build dependency issues found, the following one-liner will fix it. Amend PR. -source <(.github/bin/run-build-cleaner.sh) +source <(.github/bin/run-build-cleaner.sh $@) EOF exit 1 fi
diff --git a/.github/workflows/verible-ci.yml b/.github/workflows/verible-ci.yml index 802a7a3..31a7c21 100644 --- a/.github/workflows/verible-ci.yml +++ b/.github/workflows/verible-ci.yml
@@ -51,7 +51,7 @@ echo "--- check formatting ---" CLANG_FORMAT=clang-format-19 ./.github/bin/run-format.sh --show-diff echo "--- check build dependencies ---" - ./.github/bin/run-build-cleaner.sh + ./.github/bin/run-build-cleaner.sh ... echo "--- check potential problems ---" ./.github/bin/check-potential-problems.sh