Skip to content

Commit bbb8904

Browse files
committed
Use less threads than we have cores on Jenkins, increase max heap
Using less threads should allow us to increase the maximum heap size without filling up the memory of the Jenkins instance
1 parent 0e32220 commit bbb8904

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

project/Build.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import scala.reflect.io.Path
66

77
object DottyBuild extends Build {
88

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

1311
val JENKINS_BUILD = "dotty.jenkins.build"
1412

test/dotty/partest/DPConsoleRunner.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@ class DPSuiteRunner(testSourcePath: String, // relative path, like "files", or "
6868
scalacExtraArgs: Seq[String] = Seq.empty)
6969
extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs) {
7070

71+
val isJenkins = sys.props.isDefinedAt("dotty.jenkins.build")
72+
val numCores = Runtime.getRuntime.availableProcessors
73+
7174
if (!DPConfig.runTestsInParallel)
7275
sys.props("partest.threads") = "1"
76+
else if (isJenkins)
77+
sys.props("partest.threads") = (numCores / 2).toString
78+
else
79+
sys.props("partest.threads") = numCores.toString
7380

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

0 commit comments

Comments
 (0)