Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
build:
runs-on: [self-hosted, linux, x64]
timeout-minutes: 30
timeout-minutes: 45
steps:
- uses: actions/checkout@v7

Expand All @@ -37,14 +37,17 @@ jobs:
restore-keys: gradle-

- name: Build + Test
run: ./gradlew test assembleDebug lint --no-daemon --parallel --build-cache --stacktrace
# 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()
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
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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") ?: ""
Expand Down
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -8,3 +10,14 @@ plugins {
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
}

subprojects {
tasks.withType<Test>().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/",
)
}
}
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down