Skip to content

Conversation

@AnthonyRonning
Copy link
Contributor

@AnthonyRonning AnthonyRonning commented Jan 22, 2026

Master now has the simple revert back to the sequential pipeline. This PR only adds cache improvements on top:

  • Cache Cargo registry + git (keyed on frontend/src-tauri/Cargo.lock)
  • Cache Gradle project build dirs under frontend/src-tauri/gen/android (in addition to ~/.gradle)

No build logic changes.

Summary by CodeRabbit

  • Chores
    • Optimized build infrastructure caching for improved CI/CD pipeline performance.

✏️ Tip: You can customize this high-level summary in your review settings.


Open with Devin

Cache Cargo registry/git and Gradle build dirs for the sequential Tauri Android pipeline to reduce cold-start time.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

Two GitHub Actions workflow files were updated to enhance CI/CD performance by adding Cargo dependency caching and expanding Gradle build artifact caching for Android builds across the registry, git dependencies, and generated Android build directories.

Changes

Cohort / File(s) Summary
CI Workflow Cargo & Gradle Caching
.github/workflows/android-build.yml, .github/workflows/release.yml
Added new Cargo cache step targeting ~/.cargo/registry and ~/.cargo/git with keys based on runner OS and Cargo.lock. Expanded Gradle cache to include frontend/src-tauri/gen/android/.gradle, frontend/src-tauri/gen/android/build, and frontend/src-tauri/gen/android/app/build with updated key dependencies on gradle files and wrapper properties.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 Hopping through the CI lanes,
Caches now prevent the pains,
Cargo deps and Gradle too,
Faster builds for me and you! 🚀

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'ci(android): add cargo + gradle build caches' clearly and accurately summarizes the main change: adding build caching for Cargo and Gradle in Android CI workflows.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: 32bbab8
Status: ✅  Deploy successful!
Preview URL: https://8c45d108.maple-ca8.pages.dev
Branch Preview URL: https://ci-android-cache-improvement.maple-ca8.pages.dev

View logs

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 22, 2026

Greptile Summary

This PR adds two caching improvements to the Android build pipeline: Cargo registry/git caching (keyed on Cargo.lock) and expanded Gradle caching to include project-specific build directories under frontend/src-tauri/gen/android.

  • Added new Cargo cache step for ~/.cargo/registry and ~/.cargo/git with appropriate fallback keys
  • Extended existing Gradle cache paths to include .gradle, build, and app/build directories in the generated Android project
  • Changes are identical in both CI and release workflows, maintaining consistency
  • All cached directories align with .gitignore patterns (.gradle and build are already ignored)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes only add caching layers without modifying any build logic. Cache paths align with gitignored directories and use appropriate key patterns. The implementation is duplicated consistently across both workflows.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/android-build.yml Added Cargo registry/git cache and expanded Gradle cache to include project build directories - straightforward caching improvements
.github/workflows/release.yml Identical caching improvements to android-build.yml for consistency in release pipeline

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Actions
    participant Cache as Actions Cache
    participant Rust as Rust Toolchain
    participant Gradle as Gradle Build
    participant Build as Build Process

    GH->>GH: Setup environment (Java, Android SDK, Bun)
    GH->>Rust: Install Rust with Android targets
    
    Note over GH,Cache: New: Cargo Registry and Git Cache
    GH->>Cache: Check cargo cache<br/>(keyed on Cargo.lock)
    Cache-->>GH: Restore cargo registry and git repos
    
    GH->>GH: Setup Android NDK
    
    Note over GH,Cache: Enhanced: Gradle Cache with Build Dirs
    GH->>Cache: Check gradle cache<br/>(keyed on gradle files)
    Cache-->>GH: Restore gradle wrapper, caches,<br/>and project build dirs
    
    GH->>GH: Install and configure sccache
    GH->>Cache: Restore sccache cache
    
    GH->>Build: Install dependencies and build
    Build->>Rust: Compile Rust code<br/>(leverages cargo cache)
    Build->>Gradle: Build Android app<br/>(leverages gradle cache)
    
    Build-->>GH: Output APK and AAB artifacts
    GH->>Cache: Save updated caches for future runs
Loading

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional flags.

Open in Devin Review

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