Skip to content

ci: optimize release workflows and improve build caching#378

Merged
ignaciosantise merged 3 commits intomainfrom
feat/improve-release-actions
Feb 6, 2026
Merged

ci: optimize release workflows and improve build caching#378
ignaciosantise merged 3 commits intomainfrom
feat/improve-release-actions

Conversation

@ignaciosantise
Copy link
Collaborator

Summary

This PR optimizes the Android and iOS release workflows by improving caching efficiency and removing redundant steps. Key improvements include:

  • Upgraded checkout action from v3 to v4 for security and performance
  • Removed duplicate dependency installations (already handled by ci-setup)
  • Optimized Gradle caching by simplifying cache path logic
  • Improved CocoaPods caching with cross-branch cache sharing and conditional repo updates
  • Added ABI filtering for internal Android builds to reduce build time
  • Enabled Ruby bundler caching on iOS to cache gem dependencies

Performance Impact

These changes should reduce CI/CD workflow execution time by:

  • Skipping pod repo updates on cache hits (potentially saves 2-3 minutes)
  • Reducing Android build matrix for internal releases
  • Sharing pod cache across branches instead of per-branch isolation

Implementation Details

graph LR
    A[Pod Cache Check] --> B{Cache Hit?}
    B -->|Yes| C[Skip repo_update]
    B -->|No| D[Run repo_update]
    C --> E[Faster cocoapods install]
    D --> E
Loading

- Upgrade actions/checkout from v3 to v4
- Remove duplicate dependency install steps (already handled by ci-setup)
- Simplify Gradle and CocoaPods cache paths
- Skip pod repo updates when cache hits occur
- Add ABI filtering for internal Android builds to reduce build time
- Enable Ruby bundler caching on iOS builds

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 5, 2026 17:29
@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-examples Ready Ready Preview, Comment Feb 5, 2026 7:29pm

Request Review

@claude
Copy link

claude bot commented Feb 5, 2026

Claude finished @ignaciosantise's task in 1m 1s —— View job


Code Review

Todo:

  • Read modified workflow and Fastlane files
  • Perform automated security checks
  • Analyze changes for issues
  • Provide feedback

Found 2 issue(s)

Issue 1: Gradle cache path includes conditional that always evaluates

ID: release-android-gradle-path-df23
File: .github/workflows/release-android-base.yaml:139
Severity: LOW
Category: code_quality

Context:

  • Pattern: Cache path changed from ${{ inputs.is-expo-project == false && format('{0}/android/.gradle', inputs.root-path) || '' }} to ${{ inputs.root-path }}/android/.gradle, removing conditional logic
  • Risk: For Expo projects, this may cache unnecessary .gradle folder that gets regenerated during expo prebuild, potentially causing stale cache issues or wasting cache space
  • Impact: Minor - may result in slightly larger cache or rare cache inconsistencies for Expo projects
  • Trigger: When running builds for Expo projects (inputs.is-expo-project == true)

Recommendation: Consider keeping conditional logic or verify .gradle folder is safe to cache for Expo projects:

path: |
  ~/.gradle/caches
  ~/.gradle/wrapper
  ${{ inputs.is-expo-project == false && format('{0}/android/.gradle', inputs.root-path) || '' }}

Issue 2: CocoaPods cache sharing may cause issues across incompatible branches

ID: release-ios-pods-cache-7a8f
File: .github/workflows/release-ios-base.yaml:141
Severity: MEDIUM
Category: performance

Context:

  • Pattern: Cache key changed from ${{ runner.os }}-pods-${{ github.ref_name }}-${{ hashFiles(env.podfile_path) }} to ${{ runner.os }}-pods-${{ hashFiles(env.podfile_path) }}, removing branch isolation
  • Risk: If different branches have same Podfile.lock hash but different CocoaPods specs repo versions, builds may use stale pod definitions. Pod repo updates are now skipped on cache hit, so outdated specs won't get refreshed
  • Impact: Potential for using outdated pod specs when switching between long-lived branches, leading to build failures or runtime issues
  • Trigger: When branches with identical Podfile.lock but different CocoaPods repo states share cache

Recommendation: Add CocoaPods specs repo version to cache key to ensure compatibility:

key: ${{ runner.os }}-pods-${{ hashFiles(env.podfile_path, '~/.cocoapods/repos/trunk/.git/HEAD') }}

Or revert to branch-specific caching if cross-branch sharing causes issues.

Summary

PR optimizations look good overall. Main concerns:

  1. Android: Removed Expo conditional for .gradle cache path - verify this doesn't cause issues for Expo projects
  2. iOS: Cross-branch pod cache sharing without repo version tracking could lead to stale specs when combined with skipped pod repo update

Both changes improve performance but may introduce edge cases. Consider monitoring initial runs after merge.

✅ Automated checks passed: No workflow security issues, no external domains, PR size reasonable (3 files)


Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the Android and iOS release workflows by improving caching strategies and eliminating redundant operations. The changes focus on reducing CI/CD execution time while maintaining build correctness.

Changes:

  • Upgraded GitHub Actions checkout from v3 to v4 for improved security and performance
  • Optimized CocoaPods caching by enabling cross-branch cache sharing and conditionally skipping repository updates on cache hits
  • Streamlined Android builds by removing duplicate dependency installations and adding ABI filtering for internal releases
  • Enabled Ruby bundler caching to avoid redundant gem installations

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
fastlane/Fastfile Added conditional logic to skip CocoaPods repo updates when cache is hit, reducing pod installation time
.github/workflows/release-ios-base.yaml Updated checkout action to v4, simplified pod cache key for cross-branch sharing, enabled bundler-cache, and removed manual gem installation
.github/workflows/release-android-base.yaml Updated checkout action to v4, added ABI filtering for internal builds to reduce build time, simplified Gradle cache path, and removed duplicate package manager install commands

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Restore conditional Gradle cache path for Expo project compatibility
- Restore branch isolation in CocoaPods cache key to prevent stale specs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ignaciosantise ignaciosantise merged commit 1fb65b2 into main Feb 6, 2026
10 checks passed
@ignaciosantise ignaciosantise deleted the feat/improve-release-actions branch February 6, 2026 15:13
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.

1 participant