Skip to content

Comments

Fix Linux Issues#52

Merged
iamEvanYT merged 6 commits intomainfrom
evan/fix-linux-issues
May 25, 2025
Merged

Fix Linux Issues#52
iamEvanYT merged 6 commits intomainfrom
evan/fix-linux-issues

Conversation

@iamEvanYT
Copy link
Member

@iamEvanYT iamEvanYT commented May 17, 2025

closes #33

Issues

  • Sharp not loading correctly
  • Build for arm64

Summary by CodeRabbit

  • New Features
    • Added support for building and releasing on Ubuntu 24.04 ARM architecture, expanding platform compatibility.
  • Enhancements
    • Updated build artifacts for Linux to include architecture in filenames for easier identification.
    • Improved Linux build configuration with new executable arguments and updated application category.
    • Added support for additional unpacked resources and specified a new application icon.
  • Chores
    • Updated workflow automation to conditionally install dependencies and run steps for the new ARM platform.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 17, 2025

Walkthrough

The build and release workflows were updated to add support for the ubuntu-24.04-arm environment. Workflow steps were adjusted to run on both the new ARM Ubuntu and the existing Ubuntu platform. The Electron Builder configuration was modified to adjust unpack paths, Linux category, executable arguments, icon, and artifact naming to include architecture.

Changes

File(s) Change Summary
.github/workflows/build-and-release.yml,
.github/workflows/build.yml
Added ubuntu-24.04-arm to the build matrix; updated steps to run on both Ubuntu variants; added ARM-specific dependency installation and commands.
electron-builder.json Modified asarUnpack paths, changed Linux category, added executableArgs and icon, and updated artifact naming to include architecture.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Ubuntu-latest
    participant Ubuntu-24.04-arm
    participant macOS
    participant Windows

    GitHub Actions->>Ubuntu-latest: Run build steps
    GitHub Actions->>Ubuntu-24.04-arm: Run build steps (with ARM-specific steps)
    GitHub Actions->>macOS: Run build steps
    GitHub Actions->>Windows: Run build steps
    Ubuntu-24.04-arm->>Ubuntu-24.04-arm: Install ARM-specific dependencies
    Ubuntu-24.04-arm->>Ubuntu-24.04-arm: Run bun use-stock-electron
    Ubuntu-latest->>Ubuntu-latest: Standard build steps
    Ubuntu-24.04-arm->>Ubuntu-24.04-arm: Standard build steps
Loading

Suggested labels

bug

Poem

A new ARM hare hops in the field,
Ubuntu 24.04, its power revealed.
Ruby and gems, dependencies align,
Artifacts now show their arch in the sign.
🐇 With Electron packed and icons anew,
This bunny builds for many—now ARM joins too!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between dc0f0ad and 2715f3d.

📒 Files selected for processing (3)
  • .github/workflows/build-and-release.yml (3 hunks)
  • .github/workflows/build.yml (4 hunks)
  • electron-builder.json (2 hunks)
🔇 Additional comments (19)
electron-builder.json (5)

59-59: Verify asarUnpack path inclusion
Ensure that the directory node_modules/@img/** exists and contains the assets you intend to unpack.


80-80: Update Linux desktop category per XDG spec
The change from "Utility" to "Network;WebBrowser;" aligns with the expected categories for a browser.


81-82: Add Linux-specific executable arguments and icon
The --ozone-platform-hint=auto flag can help with rendering on some Linux setups; also confirm that build/icon.png is correctly referenced and exists.


85-85: Include architecture in AppImage artifact naming
Adding ${arch} to the filename helps differentiate builds; this matches the new ARM targets.


88-88: Include architecture in Flatpak artifact naming
Consistently adding the ${arch} placeholder ensures both AppImage and Flatpak artifacts are identifiable by architecture.

.github/workflows/build-and-release.yml (6)

23-23: Add ARM Ubuntu variant to release matrix
Including ubuntu-24.04-arm ensures that ARM builds are produced alongside x64, fulfilling the PR’s Linux support goal.


38-41: Run stock Electron for Ubuntu ARM only
This conditional step should ensure ARM-specific Electron binaries are used. Confirm that bun run use-stock-electron exists and functions as expected on the ARM runner.


43-47: Install core Linux build dependencies on ARM and x64
The apt-get install now runs on both ubuntu-latest and ubuntu-24.04-arm, ensuring Flatpak and packaging tools are available on ARM.


48-53: Install additional ARM-specific packaging tools
Installing ruby, ruby-dev, and fpm is necessary for packaging; this step correctly scopes to the ARM variant.


55-58: Setup Flatpak on both Ubuntu platforms
Conditionally configuring Flatpak on ARM and x64 ensures your Flatpak builds can proceed.


84-85: Trigger Linux builds for ARM
The bun run build:linux -p always now runs on both Ubuntu variants, producing the artifacts for ARM.

.github/workflows/build.yml (8)

42-42: Add ARM Ubuntu variant to build matrix
Mirroring the release workflow, adding ubuntu-24.04-arm here ensures ARM builds run for pull requests.


57-60: Run stock Electron for Ubuntu ARM in PR builds
This step ensures the ARM CI uses matching Electron binaries; verify that the use-stock-electron script is available in your bun scripts.


62-66: Install Linux build dependencies for ARM and x64
Including flatpak-builder, elfutils, and packaging tools on ARM aligns with the release workflow.


67-72: Install ARM-specific Ruby and FPM for packaging
This dedicated step sets up fpm on the ARM runner, which is required by electron-builder.


74-77: Setup Flatpak on both Ubuntu variants
Conditional Flatpak setup ensures pull request builds can prepare Flatpak artifacts on ARM and x64.


80-81: Ignore global libvips for Sharp
Setting SHARP_IGNORE_GLOBAL_LIBVIPS=1 ensures the bundled libvips is used, fixing the Linux Sharp loading issue.


105-108: Use system FPM only for ARM builds
The USE_SYSTEM_FPM environment variable is set based on the matrix; ensure that GitHub Actions treats the boolean expression correctly as a string.


148-148: Add ARM Linux artifact link to PR comments
Including a link to the ARM build artifacts provides visibility to reviewers and matches the new ARM support.


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
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

@github-actions
Copy link
Contributor

github-actions bot commented May 17, 2025

Build artifacts for all platforms are ready! 🚀

Download the artifacts from:

(execution 15239149340 / attempt 1)

@iamEvanYT iamEvanYT force-pushed the evan/fix-linux-issues branch from 7c69c07 to 03f4b77 Compare May 24, 2025 21:17
@iamEvanYT iamEvanYT force-pushed the evan/fix-linux-issues branch 2 times, most recently from 7f4e799 to b75328e Compare May 25, 2025 09:31
@iamEvanYT iamEvanYT force-pushed the evan/fix-linux-issues branch from b75328e to ea9f1f4 Compare May 25, 2025 14:18
@iamEvanYT iamEvanYT marked this pull request as ready for review May 25, 2025 15:14
@iamEvanYT iamEvanYT merged commit e6fb4f2 into main May 25, 2025
9 checks passed
@iamEvanYT iamEvanYT deleted the evan/fix-linux-issues branch May 25, 2025 15:24
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.

Run errors in ArchLinux about sharp

1 participant