From b0dff5660dfd5cd3622d005c6c430552890a9a8b Mon Sep 17 00:00:00 2001 From: titusfortner Date: Fri, 2 May 2025 13:17:49 -0700 Subject: [PATCH 1/2] [build] allow GitHub Actions runner to use 4GB for JVM Heap --- scripts/github-actions/ci-build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/github-actions/ci-build.sh b/scripts/github-actions/ci-build.sh index 89088464376c6..a49c5f23eaa7b 100755 --- a/scripts/github-actions/ci-build.sh +++ b/scripts/github-actions/ci-build.sh @@ -4,6 +4,9 @@ set -eufo pipefail # We want to see what's going on set -x +# Define heap size for GitHub Actions runner +HEAP_SIZE="-Xmx4g" + # Default to auto if no parameter is provided CACHE_RESULTS="auto" @@ -17,6 +20,7 @@ fi # shellcheck disable=SC2046 bazel test --config=rbe-ci --build_tests_only \ --keep_going --flaky_test_attempts=2 \ + --host_jvm_args=${HEAP_SIZE} \ --cache_test_results=${CACHE_RESULTS} \ //... -- $(cat .skipped-tests | tr '\n' ' ') From da19c94973b93853a6f59c150e1cbdb5fa13bd00 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Fri, 2 May 2025 13:26:35 -0700 Subject: [PATCH 2/2] host_jvm_args is a startup option for Bazel, not a command option --- scripts/github-actions/ci-build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/github-actions/ci-build.sh b/scripts/github-actions/ci-build.sh index a49c5f23eaa7b..e1bf8c1e9f24a 100755 --- a/scripts/github-actions/ci-build.sh +++ b/scripts/github-actions/ci-build.sh @@ -18,9 +18,8 @@ fi # Now run the tests. The engflow build uses pinned browsers # so this should be fine # shellcheck disable=SC2046 -bazel test --config=rbe-ci --build_tests_only \ +bazel --host_jvm_args=${HEAP_SIZE} test --config=rbe-ci --build_tests_only \ --keep_going --flaky_test_attempts=2 \ - --host_jvm_args=${HEAP_SIZE} \ --cache_test_results=${CACHE_RESULTS} \ //... -- $(cat .skipped-tests | tr '\n' ' ')