Skip to content

Feat/riscv64 build#1297

Closed
rockyzhang wants to merge 2 commits into
larksuite:mainfrom
rockyzhang:feat/riscv64-build
Closed

Feat/riscv64 build#1297
rockyzhang wants to merge 2 commits into
larksuite:mainfrom
rockyzhang:feat/riscv64-build

Conversation

@rockyzhang

@rockyzhang rockyzhang commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add riscv64 as a supported architecture so the CLI builds and installs
natively on RISC-V hardware.

Changes

Makefile: make -race flag conditional. Go's race detector is not
available on linux/riscv64 before Go 1.26, so "make unit-test" fails
without this guard.

Release pipeline: add riscv64 to .goreleaser.yml, package.json,
scripts/build-pkg-pr-new.sh, and scripts/install.js.

Test Plan

Unit tests pass on riscv64 hardware (make unit-test).

Release workflow verified: produced a working lark-cli binary that
runs natively on linux/riscv64.

Related Issues

None

Summary by CodeRabbit

  • New Features

    • Added RISC-V 64-bit (riscv64) platform support for builds and package installations.
  • Documentation

    • Updated build instructions to clarify that race condition testing is conditionally applied based on target architecture.

@CLAassistant

CLAassistant commented Jun 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b768f82-e9b1-4b5f-bda0-7b2f5403ffc7

📥 Commits

Reviewing files that changed from the base of the PR and between 6367aaa and bb8691b.

📒 Files selected for processing (6)
  • .goreleaser.yml
  • AGENTS.md
  • Makefile
  • package.json
  • scripts/build-pkg-pr-new.sh
  • scripts/install.js

📝 Walkthrough

Walkthrough

This PR adds riscv64 architecture support across the build, test, release, and distribution pipeline. The race detector is conditionally disabled for riscv64 in the test runner, and binaries, installers, and package metadata are updated to build and distribute for this architecture.

Changes

RISC-V 64-bit Architecture Support

Layer / File(s) Summary
Test runner configuration for riscv64
Makefile, AGENTS.md
Makefile computes RACE_FLAG based on Go target architecture; -race is disabled on riscv64 and enabled on other architectures. Unit-test target uses the conditional flag, and documentation clarifies that -race is used only where supported.
Release binary builds
.goreleaser.yml
GoReleaser adds riscv64 to the builds[*].goarch target list for binary releases.
Package distribution and installation
package.json, scripts/build-pkg-pr-new.sh, scripts/install.js
Package metadata declares riscv64 CPU support; build script constructs linux/riscv64 binary and generates runtime architecture mapping; installer maps riscv64 to the correct archive filename.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • larksuite/cli#178: Both PRs update AGENTS.md to describe the make unit-test workflow and race behavior in test command guidance.

Suggested reviewers

  • liangshuo-1

Poem

🐰 A new arch hops into the fold,
RISC-V joins the build-time gold!
With -race conditional and true,
The test and release flows know what to do.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Feat/riscv64 build' clearly summarizes the main change: adding riscv64 architecture support to the build pipeline.
Description check ✅ Passed The PR description covers all required template sections: Summary, Changes, Test Plan, and Related Issues with substantive details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.46%. Comparing base (37b17f3) to head (bb8691b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1297      +/-   ##
==========================================
+ Coverage   70.39%   70.46%   +0.07%     
==========================================
  Files         677      679       +2     
  Lines       65599    65611      +12     
==========================================
+ Hits        46176    46231      +55     
+ Misses      15757    15726      -31     
+ Partials     3666     3654      -12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@bb8691ba0d8dceaf473b4194b88a57c1a3249ec2

🧩 Skill update

npx skills add rockyzhang/cli#feat/riscv64-build -y -g

@dc-bytedance

Copy link
Copy Markdown
Collaborator

Superseded by #1382. Thanks @rockyzhang for the contribution! 🎉

Your two original commits were cherry-picked onto the current main, with a follow-up commit applying review feedback: the Makefile -race guard now honors a command-line make GOARCH=riscv64 override, plus a trailing-newline fix.

Closing in favor of #1382.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants