From dae26e4e91ea034b9f2b8cb187e1587a737f1737 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 13 Jun 2024 13:56:50 -0500 Subject: [PATCH] chore(gradle): Fix gradle test memory allocation (#4748) * chore(gradle): Update gradle test memory fixes test usage memory. * chore(gradle): Change gradle memory to be a bit lower vs. test memory * chore(gradle): Reduce GHA runner memory for gradle * chore(gradle): Reduce memory on releases as well since increased on tests * chore(gradle): Reduce memory on releases as well since increased on tests * chore(gradle): Reduce memory on releases as well since increased on tests * chore(gradle): Reduce memory on releases as well since increased on tests * chore(gradle): Spotless --- .github/workflows/build.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 2 +- build.gradle | 4 ++++ gradle.properties | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f77598c899..db85e9519b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: - release-* env: - GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g + GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx4g -Xms4g CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker jobs: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6574b215e8..56082ad7e0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -3,7 +3,7 @@ name: PR Build on: [ pull_request ] env: - GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g + GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx4g -Xms4g CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6da9c14730..68351dea3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" env: - GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.http.connectionTimeout=120000 -Dorg.gradle.internal.remote.repository.deploy.max.attempts=6 + GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx4g -Xms4g -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.http.connectionTimeout=120000 -Dorg.gradle.internal.remote.repository.deploy.max.attempts=6 CONTAINER_REGISTRY: us-docker.pkg.dev/spinnaker-community/docker jobs: diff --git a/build.gradle b/build.gradle index 05b12f1d16..26188f5903 100644 --- a/build.gradle +++ b/build.gradle @@ -69,6 +69,10 @@ subprojects { } test { + minHeapSize = "512m" + maxHeapSize = "2g" + maxParallelForks = 4 + testLogging { exceptionFormat = "full" } diff --git a/gradle.properties b/gradle.properties index 8bb87f07ed..a55844eac8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ fiatVersion=1.48.0 korkVersion=7.230.0 kotlinVersion=1.6.21 org.gradle.parallel=true -org.gradle.jvmargs=-Xmx6g +org.gradle.jvmargs=-Xmx4g spinnakerGradleVersion=8.32.1 targetJava11=true