Skip to content

DEV-1115 Give the CI Gradle daemon 4 GB and a 30-minute timeout - #125

Merged
JongChern merged 1 commit into
DEV-1115_ci_buildfrom
DEV-1115_ci_build_fixes
Oct 18, 2026
Merged

JongChern merged 1 commit into
DEV-1115_ci_buildfrom
DEV-1115_ci_build_fixes

Conversation

@MAzalya

@MAzalya MAzalya commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Fix for #124, whose only CI run never finished. This PR targets DEV-1115_ci_build, so merging it folds the fix into #124.

What went wrong

The run ran out of heap about 4 minutes in. Gradle's default heap is 512 MB, and D8 runs out while dexing bluetoothManagerExample. The daemon then hung instead of failing, until GitHub cancelled the job at 6 hours:

##[error]Exception in thread "ForkJoinPool-1-worker-2" java.lang.OutOfMemoryError: Java heap space
##[error]The operation was canceled.

Fix

  • Pass -Dorg.gradle.jvmargs="-Xmx4g -XX:MaxMetaspaceSize=1g" on the command line. It can't go in a file because gradle.properties is gitignored. Public-repo runners have 16 GB.
  • Add timeout-minutes: 30 to the job.

Tested locally (JDK 17, Gradle 8.5, the same command as CI)

  • At -Xmx512m the build fails with D8: java.lang.OutOfMemoryError: Java heap space, which reproduces the CI failure.
  • At -Xmx4g, after a clean, the build passes in 4m47s, with assembleDebug run in all 12 modules.

CI does not run on this PR, because ci.yml only triggers on PRs into master. Once this is merged into DEV-1115_ci_build, #124's own run is the check on GitHub.

🤖 Generated with Claude Code

The first CI run ran out of heap (Gradle's default 512 MB) while D8
dexed the examples, and the daemon then hung until GitHub cancelled the
job at 6 hours. gradle.properties is gitignored, so pass
org.gradle.jvmargs on the command line, and cap the job at 30 minutes.

Reproduced locally (JDK 17, Gradle 8.5): at -Xmx512m the build fails
with "D8: java.lang.OutOfMemoryError: Java heap space"; at -Xmx4g it
passes in 4m47s with assembleDebug run in all 12 modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JongChern
JongChern merged commit d7b8faf into DEV-1115_ci_build Oct 18, 2026
JongChern added a commit that referenced this pull request Oct 18, 2026
Three follow-ups ahead of review:
- The release build job now also builds every example app against the
  driver this release ships with, before anything is published. ci.yml
  only ever builds them against master's default driver, so a release
  that picks a newer driver was never built with the examples (raised
  in #126). Both build steps pass the 4 GB daemon heap from #125.
- The publishing block accepts gpr.usr as well as gpr.user, since the
  root build.gradle reads gpr.usr (also raised in #126).
- actions/* steps are pinned to commit SHAs, matching #124: each is the
  commit its v4 tag points at today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants