Skip to content

Use less threads than we have cores on Jenkins, increase max heap #1032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import scala.reflect.io.Path

object DottyBuild extends Build {

// Currently, this cannot be increased without hitting the maximum amount of memory
// available on the Jenkins VMs
val travisMemLimit = List("-Xmx1100m")
val travisMemLimit = List("-Xmx1500m")

val JENKINS_BUILD = "dotty.jenkins.build"

Expand Down
7 changes: 7 additions & 0 deletions test/dotty/partest/DPConsoleRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,15 @@ class DPSuiteRunner(testSourcePath: String, // relative path, like "files", or "
scalacExtraArgs: Seq[String] = Seq.empty)
extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs) {

val isJenkins = sys.props.isDefinedAt("dotty.jenkins.build")
val numCores = Runtime.getRuntime.availableProcessors

if (!DPConfig.runTestsInParallel)
sys.props("partest.threads") = "1"
else if (isJenkins)
sys.props("partest.threads") = (numCores / 2).toString
else
sys.props("partest.threads") = numCores.toString

sys.props("partest.root") = "."

Expand Down