Fix memory usage in reproducible-build GitHub workflow #14574
+9
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First time contributor checklist
Contributor checklist
Fixes #1234syntaxDescription
Fix reproducible-build github workflow.
The current name, “Reproducible Build Check,” is misleading; people might think this workflow actually checks the reproducibility of the Signal APK.
Actually, the Docker build is consuming too much RAM (as you can see in all the last runs), which causes the GitHub Actions VM kernel to kill the Docker daemon (OOM killer).
This can be fixed with the following adjustments:
--memory=12g: Limits the container's RAM usage to 12GB. Actual Github Action memory limit is 16GB (but only 14GB available).--no-daemon: Runs Gradle without a background daemon process.--max-workers=1: Limits parallel task workers to 1; runs tasks sequentially to reduce memory usage.-Dorg.gradle.jvmargs="-Xmx4g -XX:MaxMetaspaceSize=512m": Sets JVM args for Gradle process: max heap 4GB, max metaspace 512 MB.-Dkotlin.compiler.execution.strategy=in-process: Runs Kotlin compiler in the same JVM process as Gradle (reduce memory usage).You can see a successfull workflow here: https://github.com/BarbossHack/Signal-Android/actions/runs/21552219583
Note that this does not affect the reproduciblity, all these successfull reproducible checks were made with these settings.