Skip to content

ci(android): restore sequential tauri Android builds with caching - #397

Closed
AnthonyRonning wants to merge 1 commit into
masterfrom
ci/android-sequential-fast
Closed

ci(android): restore sequential tauri Android builds with caching#397
AnthonyRonning wants to merge 1 commit into
masterfrom
ci/android-sequential-fast

Conversation

@AnthonyRonning

@AnthonyRonningAnthonyRonning commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Reverts the split Android CI/release pipeline back to the 2.0.12-style single-job , while keeping aggressive caching (NDK local-cache, Cargo registry/git, Gradle, Bun, sccache) and the 16KB page-size rustflags.

Goal: reduce Tauri reverse-engineering/hand-rolled Android generation and get back to the known-good packaging path.

Summary by CodeRabbit

  • Chores
    • Optimized internal Android build workflows for streamlined compilation and artifact generation.
    • Consolidated Rust and Java toolchain setup with improved caching strategies.
    • Simplified CI/CD pipeline configuration to reduce build complexity and maintenance overhead.

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

Undo the split frontend/rust/gradle jobs and build via cargo tauri like v2.0.12, while keeping aggressive caching (NDK local-cache, Cargo, Gradle, Bun, sccache) and 16KB page-size rustflags.
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@coderabbitai

coderabbitaiBot commented Jan 22, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

These changes consolidate two Android CI workflows (android-build.yml and release.yml) from multi-stage, multi-target architectures into streamlined single-stage pipelines. Java 21 and Android SDK setup are introduced, Rust toolchain installation is unified with a single Cargo configuration step, and artifact handling is simplified through consolidated cargo-tauri-based builds.

Changes

Cohort / File(s)Summary
Android CI Workflow Consolidation
.github/workflows/android-build.yml, .github/workflows/release.yml
Removes per-target Rust Android matrix build stages and multi-step frontend artifact pipelines. Introduces unified Java 21/Android SDK setup, consolidated Tauri CLI installation, and single cargo tauri android build flow. Reworks caching from per-target registry/git keys to generic cargo-android and new Gradle cache. Adds Linux dependency installation, configures 16KB page-size Cargo settings, and unifies NDK/cross-compiler environment setup with inline exports for aarch64/armv7/x86_64/i686. Replaces per-ABI OpenSSL/JNI copying with consolidated signed release build. Introduces sccache stats reporting post-build.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 Workflows once sprawling, now lean and tight,
Multi-targets merged into one unified flight,
Gradle caches dance, Tauri sings its tune,
From fragmented stages to streamlined June!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly describes the main change: restoring sequential Tauri Android builds with caching improvements in the CI pipeline.

✏️ 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
Copy Markdown

Deploying maple with Cloudflare Pages Cloudflare Pages

Latest commit:e28949b
Status: ✅ Deploy successful!
Preview URL:https://f5693355.maple-ca8.pages.dev
Branch Preview URL:https://ci-android-sequential-fast.maple-ca8.pages.dev

View logs

@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Summary

Reverts Android CI from a split 3-job pipeline (frontend → rust-matrix → android) back to a single-job sequential build using cargo tauri android build, restoring the "known-good" 2.0.12-style approach.

Major changes:

  • Eliminates manual Gradle codegen steps (Kotlin bindings, Tauri settings, plugin includes) — now handled by Tauri CLI
  • Removes artifact upload/download between jobs (frontend-dist, rust-lib-* artifacts)
  • Removes manual jniLibs installation — Tauri CLI manages native library placement
  • Changes from parallel 4-target matrix builds to sequential builds within cargo tauri android build
  • Retains all aggressive caching: NDK (local-cache), Cargo registry/git, Gradle, Bun, sccache, and Tauri CLI binary
  • Preserves 16KB page-size rustflags for Android 15+ compatibility
  • Frontend environment variables now passed directly to cargo tauri android build step
  • Output artifacts (APK/AAB paths) remain unchanged

Benefits:

  • Simplifies CI by delegating Android project generation to Tauri tooling
  • Reduces reverse-engineering and hand-rolled script maintenance
  • Returns to proven packaging path used in v2.0.12

Trade-offs:

  • Sequential builds may be slower than parallelized matrix builds (though caching should mitigate this)
  • Less visibility into individual architecture build failures (now happens inside single Tauri CLI invocation)

Confidence Score: 4/5

  • Safe to merge with low risk — returns to proven Tauri CLI approach
  • The changes simplify the build pipeline by delegating to Tauri's official tooling rather than hand-rolled scripts. All critical caching layers are preserved (NDK, Gradle, Cargo, sccache), and the 16KB page-size support for Android 15+ is maintained. Output artifact paths remain unchanged, ensuring compatibility with downstream consumers. The main concern is the shift from parallel to sequential builds, which may increase build time, though this is partially offset by caching. Score is 4/5 (not 5) due to the lack of explicit verification that cargo tauri android build handles all the manual codegen steps correctly.
  • No files require special attention — both workflow files apply identical, symmetric changes

Important Files Changed

FilenameOverview
.github/workflows/android-build.ymlConsolidated from 3 jobs (frontend-build, rust-build matrix, build-android) into single job using cargo tauri android build. Preserved caching for NDK, Gradle, Cargo, sccache, and Bun. Replaced manual artifact passing with Tauri CLI integration.
.github/workflows/release.ymlIdentical consolidation to android-build.yml for release workflow. Changed from parallel matrix strategy to sequential build with cargo tauri android build. All caching layers retained.

Sequence Diagram

sequenceDiagram
participant GH as GitHub Actions
participant Cache as Cache Layer
participant Bun as Bun/Frontend
participant Tauri as Tauri CLI
participant Cargo as Cargo/Rust
participant NDK as Android NDK
participant Gradle as Gradle Build
Note over GH: Single build-android Job
GH->>Cache: Restore Bun cache
GH->>Cache: Restore Cargo registry/git cache
GH->>Cache: Restore NDK local cache
GH->>Cache: Restore Gradle cache
GH->>Cache: Restore sccache cache
GH->>Cache: Restore Tauri CLI binary cache
GH->>Bun: bun install (frontend deps)
GH->>Tauri: Install tauri-cli 2.9.2
GH->>GH: Setup Android signing keystore
GH->>GH: Generate version in tauri.properties
GH->>GH: Create .cargo/config.toml (16KB page size)
GH->>GH: Configure sccache env vars
Note over Tauri,Gradle: cargo tauri android build
Tauri->>Bun: Build frontend (with VITE_* env vars)
Bun-->>Tauri: frontend/dist output
Tauri->>Cargo: Build Rust for all 4 targets sequentially
Note over Cargo,NDK: aarch64, armv7, x86_64, i686
Cargo->>NDK: Cross-compile with Android toolchain
NDK-->>Cargo: libapp_lib.so (4 ABIs)
Cargo-->>Tauri: Native libraries
Tauri->>Gradle: Invoke Gradle with assembled libs
Gradle->>Gradle: Package APK + AAB (universal release)
Gradle-->>Tauri: app-universal-release.{apk,aab}
Tauri-->>GH: Build complete
GH->>GH: Show sccache stats
GH->>GH: Upload APK artifact
GH->>GH: Upload AAB artifact
Loading

@AnthonyRonning
AnthonyRonning deleted the ci/android-sequential-fast branch January 22, 2026 23:43
Sign up for freeto 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.

1 participant

@AnthonyRonning