We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c11ea9a commit def1bb2Copy full SHA for def1bb2
1 file changed
Rakefile
@@ -1,5 +1,6 @@
1
# frozen_string_literal: true
2
3
+require "etc"
4
require "pathname"
5
require "securerandom"
6
require "shellwords"
@@ -59,7 +60,11 @@ namespace :test do
59
60
end
61
62
-xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --]
63
+# Cap parallelism at the CPU count. `--max-procs=0` spawns one process per
64
+# 300-file batch with no upper bound; on large SDKs (thousands of files) that
65
+# oversubscribes CPUs and stacks up rubocop processes, exhausting memory and
66
+# slowing CI to the point of timing out.
67
+xargs = %W[xargs --no-run-if-empty --null --max-procs=#{Etc.nprocessors} --max-args=300 --]
68
ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")}
69
70
filtered = ->(ext, dirs) do
0 commit comments