Skip to content

feat: add new target riscv64gc-unknown-linux-musl#96

Merged
JounQin merged 4 commits intomainfrom
feat/linux-riscv64-musl
Apr 24, 2025
Merged

feat: add new target riscv64gc-unknown-linux-musl#96
JounQin merged 4 commits intomainfrom
feat/linux-riscv64-musl

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Apr 24, 2025

close #95


Important

Add riscv64gc-unknown-linux-musl target and update release workflow to always build.

  • New Features:
    • Added riscv64gc-unknown-linux-musl target to build matrix in release-napi.yml and package.json.
  • Workflow Changes:
    • Updated release-napi.yml to always run the build process by commenting out the version check condition.

This description was created by Ellipsis for 997f373. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Added support for the RISC-V 64-bit Linux (musl) platform, allowing users on this architecture to use the package.
  • Chores

    • Updated release workflow to always run the build process and include the new RISC-V 64-bit target.

@JounQin JounQin requested a review from Copilot April 24, 2025 00:30
@coderabbitai
Copy link

coderabbitai bot commented Apr 24, 2025

"""

Walkthrough

The changes update the build and packaging process to add support for the riscv64gc-unknown-linux-musl target. In the GitHub Actions workflow, a new build matrix entry is introduced for this target without additional cross-compiler installation steps. The URL for version checking in the release workflow is updated. In the package.json, the new RISC-V target is appended to the list of supported napi.targets, enabling distribution of prebuilt binaries for this architecture.

Changes

File(s) Change Summary
.github/workflows/release-napi.yml Added riscv64gc-unknown-linux-musl to build matrix; updated version check URL.
npm/package.json Added "riscv64gc-unknown-linux-musl" to the napi.targets array.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Build Environment

    Developer->>GitHub Actions: Push code / trigger release workflow
    GitHub Actions->>Build Environment: Start build job (no version check gating)
    Build Environment->>Build Environment: Build for riscv64gc-unknown-linux-musl
    Build Environment->>GitHub Actions: Upload build artifacts
Loading

Assessment against linked issues

Objective Addressed Explanation
Add prebuild and packaging support for linux/riscv64 to resolve EBADPLATFORM errors (#95)

Poem

A riscv64 dream, now takes flight,
With musl and compilers set just right.
No more bad platforms, no more delay,
Prebuilds for all, hip-hip-hooray!
In the warren of code, we hop with cheer,
For every new platform, the future is here!
🐇✨
"""


📜 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 7250ca3 and 6708802.

📒 Files selected for processing (1)
  • .github/workflows/release-napi.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release-napi.yml
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: zizmor

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.
    • 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.
  • @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.

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 introduces a new build target for riscv64gc-unknown-linux-musl and temporarily removes the condition that checks for version changes during the build process.

  • Commented out a condition that restricts builds based on version changes.
  • Added a new build configuration for the riscv64gc-unknown-linux-musl target.
Files not reviewed (1)
  • npm/package.json: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/release-napi.yml:45

  • Commenting out the version check condition may cause builds to run even when no version change has occurred. Confirm if this removal is intentional or consider re-adding a conditional check.
# if: needs.check.outputs.version_changed == 'true'

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 153d870 in 40 seconds. Click for details.
  • Reviewed 40 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/release-napi.yml:45
  • Draft comment:
    The version check condition is commented out. Confirm if builds should always run or if this was temporary.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm their intention regarding a commented-out version check condition. This violates the rule against asking the author to confirm their intention or ensure behavior is intended. Therefore, this comment should be removed.
2. .github/workflows/release-napi.yml:90
  • Draft comment:
    New target for riscv64gc-unknown-linux-musl is added. Verify that 'gcc-riscv64-linux-musl' packages are available on ubuntu-latest and the build command matches expectations.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. npm/package.json:40
  • Draft comment:
    New target 'riscv64gc-unknown-linux-musl' added in the napi.targets array. Confirm ordering and consistency with other target entries.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. .github/workflows/release-napi.yml:45
  • Draft comment:
    The 'if:' condition is commented out. Confirm if this is intentional to always trigger builds; if not, re-enable the condition.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm their intention regarding a commented-out condition. This violates the rule against asking the author to confirm their intention or ensure behavior is intended. The comment should be removed.
5. .github/workflows/release-napi.yml:90
  • Draft comment:
    New matrix entry for 'riscv64gc-unknown-linux-musl' added with its own cross-compiler setup. Ensure the apt packages (gcc/g++ for riscv64-linux-musl) are available and correct.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that the apt packages are available and correct, which violates the rule against asking the author to ensure things. It doesn't provide a specific suggestion or point out a specific issue with the code.
6. npm/package.json:40
  • Draft comment:
    Added 'riscv64gc-unknown-linux-musl' to the NAPI targets. This should resolve the EBADPLATFORM issue for riscv64 systems; please verify the build output behaves as expected.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is informative and asks the PR author to verify the build output, which violates the rules. It doesn't provide a specific code suggestion or ask for a specific test to be written.

Workflow ID: wflow_CwIXuE6qSmskOUVi

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 7250ca3 in 1 minute and 6 seconds. Click for details.
  • Reviewed 28 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/release-napi.yml:93
  • Draft comment:
    Ensure that using 'pnpm build -x' for the riscv64gc-unknown-linux-musl target properly configures the compiler and environment. This differs from the riscv64gc-unknown-linux-gnu target, which explicitly installs and sets CC/CXX. Verify that no additional setup is needed for MUSL.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to verify that the setup for a specific build target is correct. It is not making a specific code suggestion or pointing out a specific issue with the code. It falls under the category of asking the author to ensure behavior is intended, which is against the rules.
2. .github/workflows/release-napi.yml:10
  • Draft comment:
    Good addition: the new pull_request trigger ensures CI runs on PRs per common practice.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. .github/workflows/release-napi.yml:87
  • Draft comment:
    Using 'pnpm build -x' for riscv64gc-unknown-linux-musl now aligns with other musl targets. Ensure that any necessary cross-compiler setup (previously done via apt-get and env vars) isn’t required for a correct build.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50% None

Workflow ID: wflow_C8UutUiG8RQfbtXS

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed ce91401 in 46 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/release-napi.yml:37
  • Draft comment:
    Ensure the new URL (https://app.unpkg.com/unrs-resolver@latest/files/package.json) reliably returns the expected package.json. This change should be validated to avoid potential version mismatches or broken content.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. .github/workflows/release-napi.yml:37
  • Draft comment:
    Ensure the new file URL (https://app.unpkg.com/unrs-resolver@latest/files/package.json) returns the expected package.json structure for accurate version checking and isn’t affected by caching issues.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. .github/workflows/release-napi.yml:93
  • Draft comment:
    The new riscv64gc-unknown-linux-musl target uses 'pnpm build -x', similar to other musl targets. Confirm that no additional cross-compilation tooling is needed for this target.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_dRl31ZNeYy4AWlYC

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@JounQin JounQin force-pushed the feat/linux-riscv64-musl branch from ce91401 to 997f373 Compare April 24, 2025 00:46
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 997f373 in 39 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/release-napi.yml:37
  • Draft comment:
    Ensure switching the file-url from jsDelivr to unpkg is intentional. Verify that the package.json from unpkg reliably reflects the latest version, especially since it affects version-check for new targets.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. .github/workflows/release-napi.yml:37
  • Draft comment:
    The file-url has been updated to use unpkg.com instead of cdn.jsdelivr.net. Consider pinning a specific version instead of using '@latest' for consistent behavior.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_aGowNLgAifuuEgL4

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@sonarqubecloud
Copy link

id: version
with:
static-checking: localIsNew
file-url: https://cdn.jsdelivr.net/npm/unrs-resolver@latest/package.json
Copy link
Member Author

Choose a reason for hiding this comment

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

@JounQin JounQin merged commit faa6985 into main Apr 24, 2025
17 checks passed
@JounQin JounQin deleted the feat/linux-riscv64-musl branch April 24, 2025 01: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.

linux/riscv64: Build fails with EBADPLATFORM

2 participants