From e74db93344b28a41520757359c82c05baf78e0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl?= Date: Tue, 4 Aug 2026 13:36:52 +0200 Subject: [PATCH] ci: cap Gradle workers so test JVMs fit the container --- .github/workflows/tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c156cd8f41..3dbea5c10a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,13 @@ env: # make two builds likelier to coexist; the real fix is sizing the containers to the # host. See the "Report runner capacity" step. GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options=-Xmx2g -XX:+UseG1GC - CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true --no-configuration-cache + # --max-workers caps how many test tasks run at once. build.gradle.kts sets + # maxParallelForks = cores/2 and screenshot tests fork at maxHeapSize=2g, so on these + # 8-core containers the default (workers = cores = 8) allows 8 x 4 x 2g = 64 GB of test + # JVMs against a 48 GiB cgroup limit, with no swap — the daemon gets OOM-killed and + # Gradle reports "the daemon has disappeared". GitHub's 4-core hosted runners reach only + # 2 x 2 x 2g = 16 GB and additionally have the 8 GB swapfile added above. + CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true --no-configuration-cache --max-workers=4 jobs: tests: