Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Build Cleanup #1451

Merged
merged 1 commit into from
Jan 3, 2025
Merged

chore: Build Cleanup #1451

merged 1 commit into from
Jan 3, 2025

Conversation

alexrisch
Copy link
Collaborator

@alexrisch alexrisch commented Jan 2, 2025

Removed multi-step usage in favor of faster builds without additional setup Removed scheduled jobs to match current release processes

Summary by CodeRabbit

  • Workflow Updates
    • Modified GitHub Actions workflow to remove scheduled triggers
    • Consolidated Android and iOS build processes into a single workflow
    • Added platform-specific build options (iOS, Android, or all)

Removed multi-step usage in favor of faster builds without additional setup
Removed scheduled jobs to match current release processes
@alexrisch alexrisch requested a review from a team as a code owner January 2, 2025 10:53
Copy link
Contributor

coderabbitai bot commented Jan 2, 2025

Walkthrough

The pull request modifies two GitHub Actions workflow files to streamline the build process. In .github/workflows/build-app-release.yml, scheduled triggers for Tuesday and Thursday builds have been commented out. The .github/workflows/build-internal.yml workflow has been significantly restructured, consolidating Android and iOS build jobs into a single build-with-eas job with a new platform input parameter that allows selective platform building.

Changes

File Change Summary
.github/workflows/build-app-release.yml Commented out scheduled cron triggers for workflow
.github/workflows/build-internal.yml - Consolidated build jobs into build-with-eas
- Added platform input parameter
- Introduced conditional build steps based on platform selection

Sequence Diagram

sequenceDiagram
    participant User
    participant GitHub Actions
    participant Build System
    
    User->>GitHub Actions: Trigger workflow
    GitHub Actions->>Build System: Select platform (all/ios/android)
    alt Platform is all
        Build System->>Build System: Build iOS
        Build System->>Build System: Build Android
    else Platform is iOS
        Build System->>Build System: Build iOS only
    else Platform is Android
        Build System->>Build System: Build Android only
    end
Loading

Possibly related PRs

Suggested reviewers

  • thierryskoda

Poem

🐰 Workflows dancing, builds so neat
Platforms chosen with a rabbit's beat
Android, iOS, or maybe all
One job to rule them, standing tall
CI/CD magic, smooth and bright! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Nitpick comments (1)
.github/workflows/build-internal.yml (1)

89-94: Consider consolidating platform checks

While the platform-specific conditions work correctly, the implementation could be more DRY and informative.

Consider consolidating the platform checks into a shell function:

+ check_platform() {
+   local current_platform=$1
+   local skip_platform=$2
+   if [ "${{ github.event.inputs.platform || 'all' }}" == "$skip_platform" ]; then
+     echo "🚫 Skipping $current_platform build (platform set to $skip_platform)"
+     return 1
+   fi
+   echo "🚀 Proceeding with $current_platform build"
+   return 0
+ }
+
- # Check if platform is android, if so return success without building
- if [ "${{ github.event.inputs.platform || 'all' }}" == "android" ]; then
-   echo "Skipping iOS build for Android"
-   exit 0
- fi
+ if ! check_platform "iOS" "android"; then
+   exit 0
+ fi

- # Check if platform is ios, if so return success without building
- if [ "${{ github.event.inputs.platform || 'all' }}" == "ios" ]; then
-   echo "Skipping Android build for iOS"
-   exit 0
- fi
+ if ! check_platform "Android" "ios"; then
+   exit 0
+ fi

Also applies to: 103-107

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4df8060 and 54c8d8c.

📒 Files selected for processing (2)
  • .github/workflows/build-app-release.yml (1 hunks)
  • .github/workflows/build-internal.yml (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/build-app-release.yml
🔇 Additional comments (3)
.github/workflows/build-internal.yml (3)

20-28: Well-structured platform selection implementation!

The new platform input parameter is well-designed with clear options and a sensible default value, allowing for flexible build targeting.


31-31: Effective job consolidation!

The consolidation of build jobs into a single build-with-eas job streamlines the workflow while maintaining all necessary functionality.


109-113: Verify build status handling

The use of --no-wait flag means the workflow won't track build status. This could lead to:

  1. Missed build failures
  2. No way to automatically retry failed builds
  3. Incomplete status reporting in GitHub

Consider implementing a build status check or removing the --no-wait flag if build status tracking is important.

You could add a status check step:

@alexrisch alexrisch merged commit 640a2f1 into main Jan 3, 2025
1 check passed
@alexrisch alexrisch deleted the ar/build-cleanup branch January 3, 2025 08:50
@coderabbitai coderabbitai bot mentioned this pull request Jan 3, 2025
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