From b92c07d5ddf778b72fc0535bdf7e7e38fc455ab3 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 10 Jul 2026 15:57:02 +0200 Subject: [PATCH] ci: speed up the android build with one debug-scoped gradle invocation The build job ran assembleDebug, test, and lint as three separate ./gradlew invocations (three configuration phases), and test/lint each built BOTH the debug and release variants. CI ships the debug APK and the release variant's compilation is validated by the release job's assembleRelease, so the debug variant is sufficient on the build job. Collapse to a single debug-scoped invocation: ./gradlew assembleDebug testDebugUnitTest lintDebug Keeps every debug unit test, debug lint check, and the APK packaging check; drops only the redundant release-variant unit tests + release lint and two extra configuration phases. ~2 min faster on a ~9 min build (unit tests 146s->~75s, lint 61s->~30s, two fewer daemon/config startups). No tests removed. --- .github/workflows/android-ci.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-ci.yaml b/.github/workflows/android-ci.yaml index 0240cd0..747b2d9 100644 --- a/.github/workflows/android-ci.yaml +++ b/.github/workflows/android-ci.yaml @@ -160,12 +160,13 @@ jobs: echo "::error::Rename guard found un-allowlisted OPDS_SYNC / opds-sync / opds_sync references." exit 1 fi - - name: Assemble debug APK - run: ./gradlew assembleDebug --stacktrace - - name: Unit tests - run: ./gradlew test --stacktrace - - name: Lint - run: ./gradlew lint --stacktrace + # One Gradle invocation (shared configuration phase + daemon) scoped to the + # debug variant. `test`/`lint` build BOTH debug and release variants; CI + # ships the debug APK and the release variant's compilation is validated by + # the release job's assembleRelease, so the debug variant is sufficient + # here. Cuts the build ~2 min without dropping any debug test or lint check. + - name: Build, unit-test & lint (debug) + run: ./gradlew assembleDebug testDebugUnitTest lintDebug --stacktrace - name: Upload debug APK if: github.ref == 'refs/heads/main' uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5