Skip to content

Cache Rust build artifacts in CI#237

Merged
kwsantiago merged 7 commits into
mainfrom
Cache-Rust
Apr 14, 2026
Merged

Cache Rust build artifacts in CI#237
kwsantiago merged 7 commits into
mainfrom
Cache-Rust

Conversation

@wksantiago
Copy link
Copy Markdown
Contributor

@wksantiago wksantiago commented Apr 14, 2026

Summary by CodeRabbit

  • Chores
    • Optimized build pipeline caching strategy to improve build performance and reduce redundant compilation steps.

Note: This release contains infrastructure improvements with no user-facing changes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

Warning

Rate limit exceeded

@kwsantiago has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 32 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 32 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dadce979-198b-4ae5-b813-574572588a19

📥 Commits

Reviewing files that changed from the base of the PR and between 1f08344 and 7640bf4.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml

Walkthrough

CI workflows (ci.yml and release.yml) are updated to cache Rust build outputs (compiled jniLibs and uniffi bindings) to avoid rebuilding when dependencies haven't changed. A new cache step with conditional skip logic is added, and the Swatinem/rust-cache configuration is narrowed from keep/keep-mobile to keep in ci.yml.

Changes

Cohort / File(s) Summary
CI workflow caching updates
.github/workflows/ci.yml
Modified Swatinem/rust-cache to cache only keep instead of keep/keep-mobile. Added actions/cache step to cache app/src/main/jniLibs and uniffi bindings with a composite key including OS, architecture, Rust/cargo-ndk versions, and file hashes. Conditionally skip Install cargo-ndk and Build native libraries steps when cache hits.
Release workflow caching additions
.github/workflows/release.yml
Added Swatinem/rust-cache step for cargo registry with cache-targets: "false". Added actions/cache step for native build outputs (app/src/main/jniLibs and uniffi bindings) keyed by OS, NDK/Rust versions, input hashes, and commit SHA. Made cargo-ndk installation and ./build-rust.sh execution conditional on cache misses.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • Cache Rust build artifacts in CI #222: Directly addresses the same CI workflow caching enhancements—both expand rust caching, add actions/cache for jniLibs and uniffi outputs, and implement conditional build step skipping.

Possibly related PRs

  • Wire build-rust.sh into Gradle preBuild #221: Related through shared build outputs—manages Gradle task outputs and up-to-date inputs for the same jniLibs and uniffi bindings that this PR caches in CI.
  • Enforce exact toolchain versions #231: Related through overlapping workflow steps—pins and adds preflight checks to the same cargo-ndk installation and native library build steps that this PR conditionally skips on cache hits.
  • Add bit-for-bit APK reproducibility #233: Related through release workflow modifications—cache key explicitly includes build-rust.sh and scripts/\\/\*.sh, which are modified in that PR.

Poem

🐰 Caching spells, we rabbits weave,
Build outputs now on disk stay,
No more rebuilds we receive,
Swift CI pipelines save the day! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Cache Rust build artifacts in CI' directly and clearly summarizes the main changes—adding caching for Rust build outputs in both ci.yml and release.yml workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Cache-Rust

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@wksantiago wksantiago self-assigned this Apr 14, 2026
@wksantiago wksantiago linked an issue Apr 14, 2026 that may be closed by this pull request
@wksantiago
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@wksantiago
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@wksantiago wksantiago requested a review from kwsantiago April 14, 2026 17:38
Copy link
Copy Markdown
Contributor

@kwsantiago kwsantiago left a comment

Choose a reason for hiding this comment

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

ACK 1f08344

@kwsantiago kwsantiago merged commit c0598b8 into main Apr 14, 2026
4 checks passed
@kwsantiago kwsantiago deleted the Cache-Rust branch April 14, 2026 20:25
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.

Cache Rust build artifacts in CI

2 participants