ci(android): fix CI runner (JDK/SDK/gradlew) + variant test #4

Merged
whitlocktech merged 2 commits from ci/android-build-fixes into main 2026-07-19 18:52:57 +00:00
Member

Fix the M0 CI so it actually runs on the self-hosted runner

PR #2 merged the M0 scaffold with the initial CI workflow, which fails on this runner. This is the fix-forward, on a fresh branch off current main so the workflow is unambiguously the corrected version. Four issues, each surfaced by a real run:

# Symptom Fix
1 Set up JDK 17getaddrinfo EAI_AGAIN api.adoptium.net Install openjdk-17-jdk-headless via apt + export JAVA_HOME; drop actions/setup-java (the runner can't resolve Adoptium; Ubuntu mirrors work)
2 (pre-empt) AGP needing SDK packages Explicit sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
3 ./gradlew: Permission denied (exit 126) chmod +x ./gradlew in the run step — this runner's checkout drops the git exec bit (I also set the 100755 bit, but that alone didn't survive checkout)
4 testReleaseUnitTest failed Drop the BuildConfig.DEBUG assertion (the test task runs both debug and release variants); assert VERSION_NAME. Also removed a redundant android:label (RedundantLabel lint)

Verification

Built locally against the Android Studio SDK (platform 35 + build-tools 35.0.0): ./gradlew lint test assembleDebug passes and produces a debug APK. This PR's own run is the fresh end-to-end check on the runner.

Note on the earlier PRs

#2 merged early (at its first commit), so these fixes never landed; #3 (a full-scaffold re-do off pre-merge main) was redundant and is closed. This focused PR is the one to review/merge.


AI-assisted contribution disclosure: authored with Claude Code (Claude Opus); commit carries a Co-Authored-By: Claude trailer.

🤖 Generated with Claude Code

## Fix the M0 CI so it actually runs on the self-hosted runner PR #2 merged the M0 scaffold with the **initial** CI workflow, which fails on this runner. This is the fix-forward, on a **fresh branch off current `main`** so the workflow is unambiguously the corrected version. Four issues, each surfaced by a real run: | # | Symptom | Fix | |---|---|---| | 1 | `Set up JDK 17` → `getaddrinfo EAI_AGAIN api.adoptium.net` | Install `openjdk-17-jdk-headless` via apt + export `JAVA_HOME`; drop `actions/setup-java` (the runner can't resolve Adoptium; Ubuntu mirrors work) | | 2 | (pre-empt) AGP needing SDK packages | Explicit `sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"` | | 3 | `./gradlew: Permission denied` (exit 126) | `chmod +x ./gradlew` **in the run step** — this runner's checkout drops the git exec bit (I also set the 100755 bit, but that alone didn't survive checkout) | | 4 | `testReleaseUnitTest` failed | Drop the `BuildConfig.DEBUG` assertion (the `test` task runs both debug **and** release variants); assert `VERSION_NAME`. Also removed a redundant `android:label` (RedundantLabel lint) | ### Verification Built locally against the Android Studio SDK (platform 35 + build-tools 35.0.0): `./gradlew lint test assembleDebug` **passes** and produces a debug APK. This PR's own run is the fresh end-to-end check on the runner. ### Note on the earlier PRs #2 merged early (at its first commit), so these fixes never landed; #3 (a full-scaffold re-do off pre-merge main) was redundant and is closed. This focused PR is the one to review/merge. --- **AI-assisted contribution disclosure:** authored with **Claude Code** (Claude Opus); commit carries a `Co-Authored-By: Claude` trailer. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wtclaude added 1 commit 2026-07-19 18:38:30 +00:00
ci(android): fix CI runner (JDK/SDK/gradlew) + variant test
Some checks failed
PR Checks / android-build (pull_request) Failing after 2m48s
3647d25be2
PR #2 merged the M0 scaffold with the initial CI, which fails on this
self-hosted runner. Fix forward:

- JDK 17 via apt (openjdk-17-jdk-headless) + JAVA_HOME, replacing
  actions/setup-java: the runner can't resolve api.adoptium.net (EAI_AGAIN).
- Explicit `sdkmanager` install of platform-tools + platforms;android-35 +
  build-tools;35.0.0 so the build never relies on AGP auto-download.
- `chmod +x ./gradlew` in the run step (and set the 100755 git bit): this
  runner's checkout drops file modes, so `./gradlew` alone hit
  "Permission denied" (exit 126).
- ScaffoldSanityTest: drop the BuildConfig.DEBUG assertion, which fails under
  testReleaseUnitTest (the `test` task runs both variants); assert VERSION_NAME.
- Remove the redundant android:label on MainActivity (RedundantLabel lint).

Verified locally against the Android Studio SDK (platform 35 + build-tools
35.0.0): `./gradlew lint test assembleDebug` passes and builds a debug APK.

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech approved these changes 2026-07-19 18:39:14 +00:00
wtclaude added 1 commit 2026-07-19 18:43:35 +00:00
ci(android): stop yes|sdkmanager SIGPIPE from failing the step
All checks were successful
PR Checks / android-build (pull_request) Successful in 8m43s
e714980600
The SDK install succeeds (reaches 100% unzip) but the step reported exit
141: with -o pipefail, 'yes' dying of SIGPIPE (128+13) once sdkmanager
closes the pipe poisons the pipeline status. Disable pipefail for that line
so only sdkmanager's exit gates success.

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech merged commit 6f243b0af9 into main 2026-07-19 18:52:57 +00:00
whitlocktech deleted branch ci/android-build-fixes 2026-07-19 18:52:58 +00:00
Sign in to join this conversation.
No description provided.