Expanded Forge build budgets

- Sandbox nested builds divide reserved workers across matrix lanes
- Sandbox nested JVM processor counts follow each lane worker budget
- Forge targets reserve eight workers and 16 GiB with two test forks
This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-21 07:08:26 -04:00
1 parent e1ff5447ca
commit 826a752437
2 files changed
+12 -6

No files matched your search

+8 -3
View File
@@ -333,11 +333,16 @@ Provider<IrisModdedBuildService> matrixWorkers = gradle.sharedServices.registerI
maxParallelUsages.set(matrixParallelism)
}
List<String> nestedBuildArguments = [gradle.startParameter.buildCacheEnabled ? '--build-cache' : '--no-build-cache']
if (providers.gradleProperty('multiplexorSandbox').getOrElse('false').toBoolean()) {
boolean multiplexorSandbox = providers.gradleProperty('multiplexorSandbox').getOrElse('false').toBoolean()
int nestedWorkers = multiplexorSandbox
? Math.max(1, gradle.startParameter.maxWorkerCount.intdiv(matrixParallelism))
: Math.min(2, gradle.startParameter.maxWorkerCount)
int nestedProcessors = multiplexorSandbox ? nestedWorkers : 2
if (multiplexorSandbox) {
nestedBuildArguments.addAll(['--no-daemon', '-PmultiplexorSandbox=true'])
}
String nestedJvmArguments = providers.gradleProperty('org.gradle.jvmargs').getOrElse('') +
' -XX:ActiveProcessorCount=2'
" -XX:ActiveProcessorCount=${nestedProcessors}"
if (gradle.startParameter.rerunTasks) {
nestedBuildArguments.add('--rerun-tasks')
}
@@ -373,7 +378,7 @@ irisModTargets.each { String targetMinecraft, Map<String, Object> target ->
javaRuntime.set((int) target.java)
List<String> command = [rootProject.file(moddedWrapperScript).absolutePath, 'assemble', 'compileTestJava',
'verifyLoggingPolicy', 'verifyNativeClassBoundary', '--console=plain',
"--max-workers=${Math.min(2, gradle.startParameter.maxWorkerCount)}",
"--max-workers=${nestedWorkers}",
"-Dorg.gradle.jvmargs=${nestedJvmArguments.trim()}",
"-Dorg.gradle.daemon.registry.base=${rootProject.file(".gradle/iris-daemons/slot-${daemonSlot}").absolutePath}",
'-Dorg.gradle.daemon.idletimeout=3600000',