mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-10-02 16:44:33 -04:00
ci: fail the test shards on Kotlin compiler warnings (#7468)
This commit is contained in:
1 parent
bb515dbdc9
commit
9a34f78a8f
2 files changed
+4
-1
No files matched your search
@@ -309,7 +309,9 @@ jobs:
|
||||
# CCUD tags every shard with the same `CI job=test-shards`, which is the largest
|
||||
# single CI cost bucket and therefore the one worth splitting. Shard identity is
|
||||
# otherwise only recoverable by parsing the requested task list.
|
||||
./gradlew ${{ matrix.shard.tasks }} $kover_tasks -Pci=true -Pkotlin.daemon.useFallbackStrategy=false --continue \
|
||||
# -PwarningsAsErrors: together the shards compile every main and test source set, so a new Kotlin
|
||||
# compiler warning fails here.
|
||||
./gradlew ${{ matrix.shard.tasks }} $kover_tasks -Pci=true -Pkotlin.daemon.useFallbackStrategy=false -PwarningsAsErrors=true --continue \
|
||||
"-Dscan.value.CI shard=${{ matrix.shard.name }}"
|
||||
|
||||
# A test fork that dies in native code (exit 134) names no test, and the JVM's crash report is the
|
||||
|
||||
@@ -140,6 +140,7 @@ The tiers are named here and the workflows carry the label versions.
|
||||
|
||||
### CI Conventions
|
||||
- **KMP Smoke Compile:** `./gradlew kmpSmokeCompile` is a lifecycle task (registered in `RootConventionPlugin`) that depends on `compileKotlinJvm` + `compileKotlinIosSimulatorArm64` for every KMP module in the hand-maintained `ALL_MODULES_FULL` list, plus `compileAndroidDeviceTest` for `:core:database` and `:core:model`. `scripts/check-module-list.py` fails the PR when that list drifts from `settings.gradle.kts`. CI runs it in `shard-core`.
|
||||
- **Kotlin warnings fail the test shards:** they pass `-PwarningsAsErrors=true`, which sets `allWarningsAsErrors` on every Kotlin compilation (`KotlinAndroid.kt`, plus `desktopApp` and `schema-strings`). The shards don't run the `compile*MainKotlinMetadata` tasks, so a warning only those report doesn't fail CI (today they warn about duplicate KLIB names). Reproduce locally with the same flag on the compile or test tasks you touched.
|
||||
- **`maxParallelForks` CI logic:** `ProjectExtensions.kt` reads the `ci` Gradle property (`providers.gradleProperty("ci")`) and uses full available processors in CI (4 forks on std runners) vs. half locally. All CI invocations pass `-Pci=true`.
|
||||
- **Detekt report formats:** Detekt.kt checks `project.findProperty("ci") == "true"` and disables html, txt, md reports in CI; only xml + sarif are retained for GitHub annotations.
|
||||
- **Robolectric SDK caching:** The `gradle-setup` composite action caches `~/.m2/repository/org/robolectric` to prevent flaky `SocketException` on SDK downloads. Cache key is `robolectric-{os}-{arch}-{hash of gradle/libs.versions.toml}`, restoring from the `robolectric-{os}-{arch}-` prefix, so a catalog change that bumps Robolectric rolls the key without a hand edit.
|
||||
|
||||
Reference in new issue
Block a user