mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Use os.availableParallelism() instead of os.cpus().length
* As https://nodejs.org/api/os.html#oscpus says: os.cpus().length should not be used to calculate the amount of parallelism available to an application. Use os.availableParallelism() for this purpose.
This commit is contained in:
+1
-1
@@ -209,7 +209,7 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b
|
||||
}
|
||||
|
||||
// Number of jobs should scale with runner, up to a point
|
||||
const jobs = Math.min(os.cpus().length, 8)
|
||||
const jobs = Math.min(os.availableParallelism(), 8)
|
||||
// Always run 'bundle install' to list the gems
|
||||
await exec.exec('bundle', ['install', '--jobs', jobs])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user