Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Oct 11, 2025

Summary by CodeRabbit

  • Chores
    • Improved mobile CI/CD reliability by adding steps to free disk space and clean up Gradle build artifacts across build, deploy, and E2E workflows.
    • Expanded Gradle caching paths to speed up Android builds and reduce cache misses.
    • Enabled Corepack and prepared Yarn in E2E flows for more consistent dependency management.
    • Overall impact: faster, more stable Android pipelines with reduced disk-space failures and cleaner post-build environments.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Introduces two new composite GitHub Actions for freeing disk space and cleaning Gradle artifacts, expands Gradle cache paths, and wires these actions into multiple mobile workflows (CI, deploy, E2E, SDK demo). Also adds corepack enable/prepare for Yarn in one E2E workflow.

Changes

Cohort / File(s) Summary of changes
Gradle cache action
.github/actions/cache-gradle/action.yml
Expanded default Gradle cache paths to include ~/.gradle/caches/modules-*, .../jars-*, .../build-cache-*, keeping ~/.gradle/wrapper.
Actions: disk and Gradle cleanup
.github/actions/free-disk-space/action.yml, .github/actions/cleanup-gradle-artifacts/action.yml
Added composite actions: one removes preinstalled toolchains to reclaim space; the other deletes Gradle build intermediates, daemon artifacts, locks, and temp files, then reports disk usage.
Mobile workflows
.github/workflows/mobile-ci.yml, .github/workflows/mobile-deploy.yml, .github/workflows/mobile-e2e.yml, .github/workflows/mobile-sdk-demo-e2e.yml
Inserted “Free up disk space” before dependency/Gradle caching and Android setup; added “Clean up Gradle build artifacts” after Android build/verification. In mobile-e2e, added corepack enable and corepack prepare [email protected] --activate before yarn build:deps.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant WF as GitHub Workflow
  participant FS as Free Disk Space (action)
  participant DC as Dependency Cache
  participant GR as Gradle (Build)
  participant CL as Cleanup Gradle Artifacts (action)

  WF->>FS: Run free-disk-space
  FS-->>WF: Disk space reclaimed
  WF->>DC: Cache/restore deps (Yarn/Gradle)
  WF->>GR: Build Android
  GR-->>WF: Build completes
  WF->>CL: Cleanup Gradle artifacts
  CL-->>WF: Cleanup complete
Loading
sequenceDiagram
  autonumber
  participant WF as mobile-e2e
  participant CP as Corepack
  participant YN as Yarn deps build

  WF->>CP: corepack enable
  WF->>CP: corepack prepare [email protected] --activate
  CP-->>WF: Yarn v4.6.0 active
  WF->>YN: yarn build:deps
  YN-->>WF: Deps built
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

codex

Suggested reviewers

  • remicolin

Poem

CI sweeps the runner’s room so clean,
Caches grow lean, yet builds stay keen.
Gradle crumbs vanish, disks breathe free,
Corepack whispers, “Yarn four point three… six!”
Pipelines hum—tidy, swift, and serene.

Pre-merge checks and finishing touches

✅ 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 succinctly captures the PR’s primary goal of reducing disk usage in GitHub workflows by optimizing cache paths and adding cleanup steps, clearly reflecting the main changes made to improve cache space management.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch justin/fix-android-build-caching-issue

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fafb533 and fb24a5e.

📒 Files selected for processing (2)
  • .github/actions/free-disk-space/action.yml (1 hunks)
  • .github/workflows/mobile-e2e.yml (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*.{yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

.github/workflows/**/*.{yml,yaml}: In GitHub workflows, use the shared composite actions in .github/actions for dependency caching instead of calling actions/cache directly
Use the cache-yarn composite action for Yarn dependency caching in workflows
Use the cache-bundler composite action for Ruby gems caching in workflows
Use the cache-gradle composite action for Gradle caching in workflows
Use the cache-pods composite action for CocoaPods caching in workflows

Files:

  • .github/workflows/mobile-e2e.yml
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-10-04T05:29:43.587Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Use the cache-gradle composite action for Gradle caching in workflows
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-10-04T05:29:43.587Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Use the cache-yarn composite action for Yarn dependency caching in workflows
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build-deps
  • GitHub Check: analyze-android
  • GitHub Check: analyze-ios
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test

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.

@transphorm transphorm changed the title update workflows with cleaner caching logic optimize github workflow cache space Oct 11, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38e2bea and fafb533.

📒 Files selected for processing (7)
  • .github/actions/cache-gradle/action.yml (1 hunks)
  • .github/actions/cleanup-gradle-artifacts/action.yml (1 hunks)
  • .github/actions/free-disk-space/action.yml (1 hunks)
  • .github/workflows/mobile-ci.yml (2 hunks)
  • .github/workflows/mobile-deploy.yml (2 hunks)
  • .github/workflows/mobile-e2e.yml (2 hunks)
  • .github/workflows/mobile-sdk-demo-e2e.yml (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*.{yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

.github/workflows/**/*.{yml,yaml}: In GitHub workflows, use the shared composite actions in .github/actions for dependency caching instead of calling actions/cache directly
Use the cache-yarn composite action for Yarn dependency caching in workflows
Use the cache-bundler composite action for Ruby gems caching in workflows
Use the cache-gradle composite action for Gradle caching in workflows
Use the cache-pods composite action for CocoaPods caching in workflows

Files:

  • .github/workflows/mobile-e2e.yml
  • .github/workflows/mobile-deploy.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
🧠 Learnings (1)
📚 Learning: 2025-10-04T05:29:43.587Z
Learnt from: CR
PR: selfxyz/self#0
File: AGENTS.md:0-0
Timestamp: 2025-10-04T05:29:43.587Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Use the cache-gradle composite action for Gradle caching in workflows

Applied to files:

  • .github/actions/cache-gradle/action.yml
  • .github/actions/cleanup-gradle-artifacts/action.yml
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: e2e-ios
  • GitHub Check: build-deps
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android

@transphorm transphorm merged commit ae4aebb into dev Oct 11, 2025
36 checks passed
@transphorm transphorm deleted the justin/fix-android-build-caching-issue branch October 11, 2025 21:56
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