ci: stabilize Forgejo Gradle build under runner memory limits
Some checks failed
Forgejo Release Builder / release (push) Failing after 7m28s
Some checks failed
Forgejo Release Builder / release (push) Failing after 7m28s
This commit is contained in:
parent
48436e3c46
commit
72fa8ee325
2 changed files with 24 additions and 9 deletions
|
|
@ -102,23 +102,38 @@ jobs:
|
|||
printf 'sdk.dir=%s\n' "$ANDROID_HOME" > local.properties
|
||||
fi
|
||||
chmod +x ./gradlew
|
||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
||||
./gradlew --no-daemon --max-workers=1 --version
|
||||
./gradlew --no-daemon --max-workers=1 \
|
||||
"-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8" \
|
||||
-Dkotlin.daemon.enabled=false \
|
||||
-Dkotlin.compiler.execution.strategy=in-process \
|
||||
--version
|
||||
|
||||
- name: Check code format
|
||||
run: |
|
||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
||||
./gradlew --no-daemon --max-workers=1 spotlessCheck
|
||||
./gradlew --no-daemon --max-workers=1 \
|
||||
"-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8" \
|
||||
-Dkotlin.daemon.enabled=false \
|
||||
-Dkotlin.compiler.execution.strategy=in-process \
|
||||
--stacktrace --info \
|
||||
spotlessCheck
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
||||
./gradlew --no-daemon --max-workers=1 assembleRelease -Penable-updater -Pdisable-code-shrink
|
||||
./gradlew --no-daemon --max-workers=1 \
|
||||
"-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8" \
|
||||
-Dkotlin.daemon.enabled=false \
|
||||
-Dkotlin.compiler.execution.strategy=in-process \
|
||||
--stacktrace --info \
|
||||
assembleRelease -Penable-updater -Pdisable-code-shrink
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
||||
./gradlew --no-daemon --max-workers=1 testReleaseUnitTest
|
||||
./gradlew --no-daemon --max-workers=1 \
|
||||
"-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8" \
|
||||
-Dkotlin.daemon.enabled=false \
|
||||
-Dkotlin.compiler.execution.strategy=in-process \
|
||||
--stacktrace --info \
|
||||
testReleaseUnitTest
|
||||
|
||||
- name: Rename release artifacts
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ kotlin.mpp.androidSourceSetLayoutVersion=2
|
|||
|
||||
org.gradle.caching=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m -Dfile.encoding=UTF-8
|
||||
org.gradle.parallel=true
|
||||
|
|
|
|||
Loading…
Reference in a new issue