Skip to content

Commit

Permalink
fix(builds): Fixes JVM memory for builds to be set and lowers compila…
Browse files Browse the repository at this point in the history
…tion (#6161)

* fix(builds): Fixes JVM memory for builds to be set and lowers compilation memory usage

* fix(gha): Reduce JVM memory for builds significantly and increase test memory
  • Loading branch information
jasonmcintosh authored Feb 27, 2024
1 parent 6d6afde commit 538a637
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx16g -Xms16g -Xss8192k
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx4g -Xms4g -Xss8192k

jobs:
it-test-kubernetes:
Expand Down
5 changes: 5 additions & 0 deletions clouddriver-artifacts/clouddriver-artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ task integrationTest(type: Test) {
classpath = sourceSets.integration.runtimeClasspath
shouldRunAfter test


minHeapSize = "512m"
maxHeapSize = "${testJvmMaxMemory}"
maxParallelForks = 4

testlogger {
theme 'standard'
showStandardStreams true
Expand Down
4 changes: 4 additions & 0 deletions clouddriver-aws/clouddriver-aws.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ task integrationTest(type: Test) {
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
shouldRunAfter test
maxParallelForks = 4

minHeapSize = "512m"
maxHeapSize = "${testJvmMaxMemory}"

testlogger {
theme 'mocha'
Expand Down
5 changes: 5 additions & 0 deletions clouddriver-ecs/clouddriver-ecs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,9 @@ task integrationTest(type: Test) {
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
shouldRunAfter test

// maxParallelForks = 4

minHeapSize = "512m"
maxHeapSize = "${testJvmMaxMemory}"
}
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ kotlinVersion=1.5.32
#fiatComposite=true
#korkComposite=true

org.gradle.jvmargs=-Xmx12g -Xms12g

## This memory ONLY impacts build time. Tests are forked to a separate JVM process. IF hitting JVM OOPS you can adjust per integration test JVM memory.
org.gradle.jvmargs=-Xmx4g -Xms4g

testJvmMaxMemory=4g

0 comments on commit 538a637

Please sign in to comment.