Skip to content

chore: [SDK-4958] parallelize Android SDK CI - #2698

Merged
fadi-george merged 7 commits into
mainfrom
fadi/sdk-4958
Jul 28, 2026
Merged

chore: [SDK-4958] parallelize Android SDK CI#2698
fadi-george merged 7 commits into
mainfrom
fadi/sdk-4958

Conversation

@fadi-george

@fadi-george fadi-george commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Run code quality, unit tests/coverage, and demo release builds in parallel with Gradle-aware caching.

Before:

Screenshot 2026-07-28 at 11 27 59 AM

After:

Screenshot 2026-07-28 at 11 27 47 AM

Details

Motivation

The previous required build job ran all workloads serially and took 10m40s. Its setup restored a broad 1.66 GB Gradle cache and replaced the hosted runner's preinstalled Android command-line tools.

Scope

  • Split CI into independent code-quality, test, and demo-build jobs.
  • Keep a final build gate so the existing required check remains stable.
  • Replace the manual Gradle cache with gradle/actions/setup-gradle@v6.
  • Use the test job as the sole cache writer for trusted same-repository PRs and protected branches; other jobs and fork PRs remain read-only.
  • Use the hosted runner Android SDK instead of reinstalling command-line tools and platform-tools.
  • Update GitHub Actions to their latest major versions and add SDK team ownership.
  • Upload failed unit-test reports/results from every module.

CI evidence

Baseline run 30326989887 completed in 10m50s end-to-end. The final warm-cache run 30386948655 completed in 6m09s, a 4m41s / 43% wall-time reduction.

The warm workloads started independently: code quality finished in 1m07s, tests/coverage in 2m48s, and demo builds in 5m59s. The final stable build gate passed in 4s.

The segmented Gradle cache restored dependencies, transforms, wrappers, DSL state, and build outputs across all jobs. The test job increased from 37 cache hits cold to 118 warm and fell from 6m44s to 2m05s of Gradle execution. The demo build fell from 7m57s cold to 5m42s, while code-quality fell from 2m14s to 1m07s end-to-end.

Android SDK setup investigation

The baseline runner had ANDROID_HOME=/usr/local/lib/android/sdk and command-line tools 12 preinstalled. android-actions/setup-android@v3 rejected that version because the workflow pinned command-line tools 11, then accepted licenses and reinstalled tools and platform-tools. It did not install the project's required compile SDK 34, so platform availability already came from the hosted image. All code-quality, test, coverage, GMS release, and Huawei release tasks passed using only the hosted SDK.

Testing

Manual testing

  • actionlint .github/workflows/*.yml
  • git diff --check
  • ./gradlew help --console=plain
  • Cold-cache seed, warm-cache rerun, and final GitHub Actions runs completed.
  • All PR checks pass.

Affected code checklist

  • Notifications
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • No Public API changes

Testing

  • Test coverage is not needed for workflow-only changes
  • All automated tests pass
  • Device testing is not applicable to workflow-only changes

Final pass

  • Code is as readable as possible
  • I have reviewed this PR myself

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📊 Diff Coverage Report

Diff Coverage Report (Changed Lines Only)

Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff).

Changed Files Coverage

✅ No main-source changes to gate

No Kotlin/Java changes in the diff.

📥 View workflow run

fadi-george and others added 3 commits July 28, 2026 10:54
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
fadi-george and others added 2 commits July 28, 2026 11:03
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george

Copy link
Copy Markdown
Contributor Author

Warm-cache rerun completed in 6m21s versus the 10m50s baseline: 4m29s / 41% faster. Jobs were code quality 1m28s, tests/coverage 2m40s, and demo build 6m07s. Same-repo PRs now seed through the test job; fork PRs remain read-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george

Copy link
Copy Markdown
Contributor Author

Fixed the OperationRepo test race by queueing all three operations before starting queue processing. Verified with 20 repeated targeted runs, the full core test suite, Spotless, and the PR CI run.

@fadi-george
fadi-george requested a review from nan-li July 28, 2026 19:06
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george merged commit 4b88412 into main Jul 28, 2026
8 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-4958 branch July 28, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants