Use less --local_test_jobs on macOS and Windows.
Windows seems to need this, as otherwise tests just fail all over the place.
macOS might give overall better performance, but feel free to revert this if it makes it even slower.
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index 73065db..fa1b95d 100644
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -608,6 +608,15 @@
return str(multiprocessing.cpu_count())
+def concurrent_test_jobs(platform):
+ if platform == "windows":
+ return str(multiprocessing.cpu_count() // 4)
+ elif platform == "macos":
+ return str(multiprocessing.cpu_count() // 2)
+ else:
+ return str(multiprocessing.cpu_count())
+
+
def execute_bazel_build(bazel_binary, platform, flags, targets, bep_file):
print_expanded_group(":bazel: Build")
common_flags = ["--show_progress_rate_limit=5", "--curses=yes", "--color=yes", "--keep_going",
@@ -628,7 +637,7 @@
print_expanded_group(":bazel: Test")
common_flags = ["--show_progress_rate_limit=5", "--curses=yes", "--color=yes", "--keep_going",
"--flaky_test_attempts=3", "--build_tests_only",
- "--jobs=" + concurrent_jobs(), "--local_test_jobs=" + concurrent_jobs(),
+ "--jobs=" + concurrent_jobs(), "--local_test_jobs=" + concurrent_test_jobs(),
"--build_event_json_file=" + bep_file,
"--experimental_build_event_json_file_path_conversion=false"]
caching_flags = []