diff --git a/.gitea/workflows/android.yml b/.gitea/workflows/android.yml index cd00014d..e4b039ad 100644 --- a/.gitea/workflows/android.yml +++ b/.gitea/workflows/android.yml @@ -26,5 +26,11 @@ jobs: run: | $ErrorActionPreference = 'Stop' if ((git rev-parse HEAD).Trim() -ne $env:GITHUB_SHA) { throw 'Checkout SHA mismatch' } - .\gradlew.bat testDebugUnitTest assembleDebug compileReleaseKotlin --no-daemon --console=plain + Get-CimInstance Win32_OperatingSystem | Select-Object TotalVisibleMemorySize, FreePhysicalMemory + # A fresh runner compiles both variants from scratch. Keep their compiler + # heaps separate in time; the previous shared 2 GiB heap exhausted itself. + $buildArgs = @('--no-daemon', '--console=plain', '--max-workers=1', '-Pkotlin.daemon.jvmargs=-Xmx4096m') + .\gradlew.bat testDebugUnitTest assembleDebug @buildArgs + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + .\gradlew.bat compileReleaseKotlin @buildArgs exit $LASTEXITCODE