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
|
printf 'sdk.dir=%s\n' "$ANDROID_HOME" > local.properties
|
||||||
fi
|
fi
|
||||||
chmod +x ./gradlew
|
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 \
|
||||||
./gradlew --no-daemon --max-workers=1 --version
|
"-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
|
- name: Check code format
|
||||||
run: |
|
run: |
|
||||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
./gradlew --no-daemon --max-workers=1 \
|
||||||
./gradlew --no-daemon --max-workers=1 spotlessCheck
|
"-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
|
- name: Build app
|
||||||
run: |
|
run: |
|
||||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
./gradlew --no-daemon --max-workers=1 \
|
||||||
./gradlew --no-daemon --max-workers=1 assembleRelease -Penable-updater -Pdisable-code-shrink
|
"-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
|
- name: Run unit tests
|
||||||
run: |
|
run: |
|
||||||
GRADLE_OPTS="-Xmx2g -XX:MaxMetaspaceSize=768m -Dkotlin.daemon.enabled=false -Dkotlin.compiler.execution.strategy=in-process" \
|
./gradlew --no-daemon --max-workers=1 \
|
||||||
./gradlew --no-daemon --max-workers=1 testReleaseUnitTest
|
"-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
|
- name: Rename release artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ kotlin.mpp.androidSourceSetLayoutVersion=2
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.configureondemand=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
|
org.gradle.parallel=true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue