From d3467a6ccdc1dd8dfc382f5a640a6ec9e2006054 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Mon, 9 Nov 2026 17:08:56 +0100 Subject: [PATCH 1/5] ci: bump job timeout to 45m, match flavored APK output paths --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2267cb1..7c2ca40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ permissions: jobs: build: runs-on: [self-hosted, linux, x64] - timeout-minutes: 30 + timeout-minutes: 45 steps: - uses: actions/checkout@v7 @@ -44,7 +44,7 @@ jobs: uses: actions/upload-artifact@v6 with: name: debug-apk - path: app/build/outputs/apk/debug/*.apk + path: app/build/outputs/apk/*/debug/*.apk if-no-files-found: ignore - name: Upload Test Results From 60873b56ba0ca0198b0616de4de77d0bdd427c51 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Tue, 10 Nov 2026 09:38:47 +0100 Subject: [PATCH 2/5] ci: mirror Maven Central via Google, guard empty keystore env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kern runs are failing fleet-wide on repo.maven.apache.org 429s (nativeruntime-dist-compat for Robolectric unit tests). Google hosts a full read-only mirror — trying it before central avoids the rate limit without changing resolution semantics. Release runs also die on 'Cannot convert "" to File' when NOTHING_MODES_KEYSTORE arrives empty (kern GITHUB_ENV propagation); empty now falls back to the debug key like a missing var. Authored By: TDvorak Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- app/build.gradle.kts | 2 +- settings.gradle.kts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0ca42a0..6755829 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -26,7 +26,7 @@ android { // Never hardcode passwords. If no config is present, release builds fall // back to the debug key for local testing. val keystorePath = System.getenv("NOTHING_MODES_KEYSTORE") - if (keystorePath != null) { + if (!keystorePath.isNullOrEmpty()) { storeFile = file(keystorePath) storePassword = System.getenv("NOTHING_MODES_KEYSTORE_PASSWORD") ?: "" keyAlias = System.getenv("NOTHING_MODES_KEY_ALIAS") ?: "" diff --git a/settings.gradle.kts b/settings.gradle.kts index 5ffb7eb..57be825 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,6 +9,8 @@ dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) repositories { google() + // Google's read-only Maven Central mirror — repo.maven.apache.org rate-limits the CI fleet (429). + maven { url = uri("https://maven-central.storage-download.googleapis.com/maven2/") } mavenCentral() } } From 2a8f0cea24d05ac3017d09b58bae3b8b5104524c Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Tue, 10 Nov 2026 09:57:34 +0100 Subject: [PATCH 3/5] ci: bound Gradle memory on job containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 429 fix holds — the daemon now dies mid-build, OOM-killed in the job container: 4g daemon heap plus unbounded parallel compiles and Robolectric test forks overcommit the cgroup limit. Cap workers at 3 and run the Kotlin compiler in-process (no separate Kotlin daemon) on CI only; local builds are unaffected. Authored By: TDvorak Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c2ca40..076ceac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,9 @@ jobs: restore-keys: gradle- - name: Build + Test - run: ./gradlew test assembleDebug lint --no-daemon --parallel --build-cache --stacktrace + # workers.max + in-process Kotlin compiler bound peak memory — the job + # container OOM-kills the Gradle daemon on unconstrained parallel builds. + run: ./gradlew test assembleDebug lint --no-daemon --parallel --build-cache --stacktrace -Dorg.gradle.workers.max=3 -Dkotlin.compiler.execution.strategy=in-process - name: Upload APK if: always() From 69a5ff754415fc0d3afad74fcbadd72ca8f651a7 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Tue, 10 Nov 2026 10:20:29 +0100 Subject: [PATCH 4/5] ci: cap Gradle daemon heap under the 6g job container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit workers.max wasn't enough — the daemon still died at :app compile. Kern job containers run with --memory 6g (KERN_JOB_MEMORY on the fleet); a 4g-heap daemon plus metaspace, native dex and test forks crosses that at peak. Budget the whole cgroup: 2.6g heap, 768m metaspace, max 3 worker forks. Authored By: TDvorak Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 076ceac..a23e59c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,10 @@ jobs: restore-keys: gradle- - name: Build + Test - # workers.max + in-process Kotlin compiler bound peak memory — the job - # container OOM-kills the Gradle daemon on unconstrained parallel builds. - run: ./gradlew test assembleDebug lint --no-daemon --parallel --build-cache --stacktrace -Dorg.gradle.workers.max=3 -Dkotlin.compiler.execution.strategy=in-process + # Job containers are capped at 6g (kern KERN_JOB_MEMORY). Bound the + # whole JVM budget: 2.6g daemon heap (Kotlin compiles in-process), 768m + # metaspace, max 3 worker forks — unbounded, the daemon gets OOM-killed. + run: ./gradlew test assembleDebug lint --no-daemon --parallel --build-cache --stacktrace -Dorg.gradle.workers.max=3 -Dkotlin.compiler.execution.strategy=in-process -Dorg.gradle.jvmargs='-Xmx2560m -XX:MaxMetaspaceSize=768m' - name: Upload APK if: always() From daf1e9830d4c4f812fafe47e8e59c7ffa7c62f28 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Tue, 10 Nov 2026 10:31:32 +0100 Subject: [PATCH 5/5] ci: mirror Robolectric's runtime fetcher too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OOM fix held — the daemon survived and unit tests finally ran, only to fail inside MavenArtifactFetcher: Robolectric downloads android-all at test time through its own HTTP client, which ignores Gradle repository config and hits the same Central 429. Point the fetcher at the Google mirror via robolectric.dependency.repo.url on every Test task. Authored By: TDvorak Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index af5081d..efc18d8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import org.gradle.api.tasks.testing.Test + plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false @@ -8,3 +10,14 @@ plugins { alias(libs.plugins.ksp) apply false alias(libs.plugins.hilt) apply false } + +subprojects { + tasks.withType().configureEach { + // Robolectric fetches android-all at test time via its own downloader, + // ignoring Gradle repository config — Central 429s kill every test JVM. + systemProperty( + "robolectric.dependency.repo.url", + "https://maven-central.storage-download.googleapis.com/maven2/", + ) + } +}