Skip to content

Commit 017a1dc

Browse files
authored
Merge branch 'RT-Thread:master' into master
2 parents 5586747 + fa6f86e commit 017a1dc

File tree

1,708 files changed

+145891
-38440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,708 files changed

+145891
-38440
lines changed

.github/ALL_BSP_COMPILE.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
"renesas/ra6e2-ek",
257257
"renesas/ra6e2-fpb",
258258
"renesas/ra4e2-eco",
259+
"renesas/ra4m1-ek",
259260
"renesas/ra4m2-eco",
260261
"renesas/ra2l1-cpk",
261262
"renesas/ra8m1-ek",
@@ -481,6 +482,7 @@
481482
"RTT_BSP": "xuantie",
482483
"RTT_TOOL_CHAIN": "sourcery-Xuantie-900-gcc-elf-newlib",
483484
"SUB_RTT_BSP": [
485+
"xuantie/smartl/e901",
484486
"xuantie/smartl/e902",
485487
"xuantie/smartl/e906",
486488
"xuantie/smartl/e907",

.github/copilot-instructions.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,29 @@ When reviewing code, provide feedback in **both English and Chinese** to ensure
1818

1919
1. **Real-Time Performance / 实时性能**
2020
- Verify interrupt handling efficiency / 验证中断处理效率
21-
2221
2. **Memory Management / 内存管理**
2322
- Detect memory leaks / 检测内存泄漏
2423
- Verify proper memory allocation/deallocation / 验证正确的内存分配/释放
2524
- Check stack usage optimization / 检查栈使用优化
26-
2725
3. **Code Style / 代码风格**
2826
- Follow RT-Thread coding standards / 遵循 RT-Thread 编码标准
2927
- Maintain consistent naming conventions / 保持一致的命名约定
3028
- Ensure proper code comments (not documentation) / 确保适当的代码注释(而非文档)
29+
4. **PR Title Naming Guidelines / PR 标题命名规范**
30+
- **Specify the module or keyword / 明确模块或关键字**
31+
- 标题需明确指出涉及的具体模块、子系统或关键字,例如具体的 BSP(Board Support Package)或芯片厂商名称(如 STM32, ESP32, NXP 等)。
32+
- 示例:[STM32][I2C] Fix Kconfig parsing error 而非 fix:I2C——Kconfig修改。
33+
- **Clearly describe the content being repaired or modified / 清晰描述修复或更改内容**
34+
- 标题需简洁清晰地描述修复的问题、添加的功能或修改的内容,避免模糊或过于简略的描述。
35+
- 示例:[STM32][SPI] Fix buffer overflow in SPI driver 而非 SPI bug fix。
36+
- **Format Recommendations / 格式建议**
37+
- 推荐使用 [模块/厂商][子系统] 具体描述 的格式,确保标题结构化且信息完整。
38+
- 使用英文描述问题(除非项目明确要求使用其他语言),以提高国际化可读性。
39+
- 示例:[NXP][UART] Add timeout handling for UART receive。
40+
- **Issues to Avoid / 避免的问题**
41+
- 不要使用模糊的术语,如“修复问题”或“代码优化”,需具体说明问题或优化的内容。
42+
- 避免使用不规范的符号(如 ——),建议使用标准英文字符(如 - 或 :)。
43+
- 不要省略关键上下文信息,如 BSP 或芯片厂商。
3144

3245
### Review Comment Format / 审查评论格式
3346

@@ -46,7 +59,6 @@ Example/示例:
4659
// Your code example here / 你的代码示例
4760
```
4861
```
49-
5062
### Common Issues to Check / 常见问题检查
5163
5264
1. **Resource Management / 资源管理**
@@ -194,3 +206,4 @@ When suggesting improvements:
194206
- [RT-Thread Coding Style Guide](https://github.com/RT-Thread/rt-thread/blob/master/documentation/coding_style_en.md)
195207
- [RT-Thread 文档中心](https://www.rt-thread.org/document/site/)
196208
- [RT-Thread 编码规范](https://github.com/RT-Thread/rt-thread/blob/master/documentation/coding_style_cn.md)
209+
```
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# CI Results Comment Workflow
2+
3+
## Overview / 概述
4+
5+
This feature automatically posts CI test results as comments on Pull Requests, making it easier for contributors and reviewers to see the status of all CI checks at a glance.
6+
7+
此功能自动将 CI 测试结果作为评论发布到 Pull Request 中,使贡献者和审阅者更容易一目了然地看到所有 CI 检查的状态。
8+
9+
## Implementation / 实现方式
10+
11+
The feature uses **two complementary approaches** to ensure CI results are always visible:
12+
该功能使用**两种互补方法**来确保 CI 结果始终可见:
13+
14+
### 1. Direct Workflow Integration (Immediate) / 直接工作流集成(立即生效)
15+
16+
Each main CI workflow includes a `post-ci-status` job that:
17+
每个主要 CI 工作流都包含一个 `post-ci-status` 作业,它:
18+
19+
- ✅ Works immediately on PR branches (no merge required) / 立即在 PR 分支上生效(无需合并)
20+
- 📝 Updates a single comment with workflow status / 使用工作流状态更新单个评论
21+
- 🔄 Runs after each workflow completes / 在每个工作流完成后运行
22+
23+
**Modified Workflows:**
24+
- `bsp_buildings.yml`
25+
- `static_code_analysis.yml`
26+
- `format_check.yml`
27+
- `utest_auto_run.yml`
28+
29+
### 2. Workflow Run Trigger (After Merge) / 工作流运行触发器(合并后)
30+
31+
The `ci_results_comment.yml` workflow:
32+
`ci_results_comment.yml` 工作流:
33+
34+
- ⏰ Triggers when CI workflows complete / 在 CI 工作流完成时触发
35+
- 📊 Provides comprehensive summary of all workflows / 提供所有工作流的全面摘要
36+
- 🔍 Shows detailed job-level information / 显示详细的作业级信息
37+
- ⚠️ **Only works after merged to master** / **仅在合并到 master 后才有效**
38+
39+
## Features / 功能特性
40+
41+
1. **Automatic Updates / 自动更新**: The comment is automatically created when CI workflows complete and updated as new workflows finish.
42+
/ 当 CI 工作流完成时自动创建评论,并在新工作流完成时更新。
43+
44+
2. **Comprehensive Summary / 全面总结**: Shows the status of all major CI workflows including:
45+
/ 显示所有主要 CI 工作流的状态,包括:
46+
- RT-Thread BSP Static Build Check / BSP 静态构建检查
47+
- Static code analysis / 静态代码分析
48+
- Check File Format and License / 文件格式和许可证检查
49+
- utest_auto_run / 单元测试自动运行
50+
51+
3. **Status Indicators / 状态指示器**:
52+
- ✅ Success / 成功
53+
- ❌ Failure / 失败
54+
- 🟠 Queued / 排队中
55+
- 🟡 In Progress / 进行中
56+
- ⏭️ Skipped / 已跳过
57+
58+
4. **Detailed Information / 详细信息**: Expandable sections show individual job results within each workflow.
59+
/ 可展开的部分显示每个工作流中的各个作业结果。
60+
61+
## How It Works / 工作原理
62+
63+
1. The workflow is triggered when any of the monitored CI workflows complete.
64+
/ 当任何受监控的 CI 工作流完成时,将触发此工作流。
65+
66+
2. It collects the status of all workflows and jobs for the associated Pull Request.
67+
/ 它收集关联 Pull Request 的所有工作流和作业的状态。
68+
69+
3. A formatted comment is posted (or updated if one already exists) with the current CI status.
70+
/ 发布(或更新已存在的)格式化评论,显示当前 CI 状态。
71+
72+
## Comment Format / 评论格式
73+
74+
The comment includes:
75+
评论包括:
76+
77+
- **Overall Summary / 总体摘要**: Quick statistics showing count of passed, failed, queued, in-progress, and skipped workflows.
78+
/ 快速统计数据,显示通过、失败、排队、进行中和跳过的工作流数量。
79+
80+
- **Detailed Results / 详细结果**: Collapsible sections for each workflow with links to individual jobs.
81+
/ 每个工作流的可折叠部分,包含指向各个作业的链接。
82+
83+
## Benefits / 优势
84+
85+
1. **Visibility / 可见性**: Contributors can immediately see which CI checks have passed or failed without navigating to the Actions tab.
86+
/ 贡献者无需导航到 Actions 选项卡即可立即查看哪些 CI 检查通过或失败。
87+
88+
2. **Efficiency / 效率**: Reviewers can quickly assess the CI status before reviewing the code.
89+
/ 审阅者可以在审查代码之前快速评估 CI 状态。
90+
91+
3. **Transparency / 透明度**: All stakeholders have a clear view of the PR's CI status.
92+
/ 所有利益相关者都可以清楚地了解 PR 的 CI 状态。
93+
94+
## Permissions Required / 所需权限
95+
96+
The workflow requires the following permissions:
97+
工作流需要以下权限:
98+
99+
- `pull-requests: write` - To create and update comments / 创建和更新评论
100+
- `issues: write` - To post comments on PR issues / 在 PR 问题上发布评论
101+
- `actions: read` - To read workflow run status / 读取工作流运行状态
102+
- `checks: read` - To read check run status / 读取检查运行状态
103+
104+
## Configuration / 配置
105+
106+
The workflow monitors the following workflows by default:
107+
工作流默认监控以下工作流:
108+
109+
```yaml
110+
workflows:
111+
- "RT-Thread BSP Static Build Check"
112+
- "Static code analysis"
113+
- "Check File Format and License"
114+
- "utest_auto_run"
115+
```
116+
117+
To add more workflows to monitor, edit the `.github/workflows/ci_results_comment.yml` file and add workflow names to the `workflows` list.
118+
119+
要监控更多工作流,请编辑 `.github/workflows/ci_results_comment.yml` 文件并将工作流名称添加到 `workflows` 列表中。
120+
121+
## Troubleshooting / 故障排除
122+
123+
### Comment not appearing / 评论未出现
124+
125+
1. Ensure the workflow has the required permissions / 确保工作流具有所需权限
126+
2. Check that the PR is from a branch in the repository (not a fork) / 检查 PR 是否来自存储库中的分支(而非分支)
127+
3. Verify the workflow is enabled in the repository settings / 验证工作流在存储库设置中已启用
128+
129+
### Comment not updating / 评论未更新
130+
131+
1. The comment updates when a monitored workflow completes / 当受监控的工作流完成时,评论会更新
132+
2. Check the Actions tab to see if the workflow is running / 检查 Actions 选项卡以查看工作流是否正在运行
133+
3. Look for errors in the workflow logs / 在工作流日志中查找错误
134+
135+
## Contributing / 贡献
136+
137+
Contributions to improve this workflow are welcome! Please follow the standard contribution process outlined in the CONTRIBUTING.md file.
138+
139+
欢迎改进此工作流的贡献!请遵循 CONTRIBUTING.md 文件中概述的标准贡献流程。

.github/workflows/bsp_buildings.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ name: RT-Thread BSP Static Build Check
1313
# Controls when the action will run. Triggers the workflow on push or pull request
1414
# events but only for the RT-Thread organization master branch
1515
on:
16-
# Runs at 16:00 UTC (BeiJing 00:00) every day
17-
schedule:
18-
- cron: '0 16 * * *'
1916
push:
2017
branches:
2118
- master
@@ -46,6 +43,12 @@ on:
4643
types:
4744
- online-pkgs-static-building-trigger-event
4845
workflow_dispatch:
46+
inputs:
47+
trigger_type:
48+
description: '触发类型'
49+
required: false
50+
default: 'manual'
51+
type: string
4952

5053
concurrency:
5154
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -177,10 +180,10 @@ jobs:
177180
- name: Install Xuantie-900-gcc-elf-newlib Tools
178181
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-Xuantie-900-gcc-elf-newlib' && success() }}
179182
run: |
180-
wget -q https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1744884010580/Xuantie-900-gcc-elf-newlib-x86_64-V3.0.2-20250410.tar.gz
181-
sudo tar -zxvf Xuantie-900-gcc-elf-newlib-x86_64-V3.0.2-20250410.tar.gz -C /opt
182-
/opt/Xuantie-900-gcc-elf-newlib-x86_64-V3.0.2/bin/riscv64-unknown-elf-gcc --version
183-
echo "RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V3.0.2/bin" >> $GITHUB_ENV
183+
wget -q https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1751370399722/Xuantie-900-gcc-elf-newlib-x86_64-V3.2.0-20250627.tar.gz
184+
sudo tar -zxvf Xuantie-900-gcc-elf-newlib-x86_64-V3.2.0-20250627.tar.gz -C /opt
185+
/opt/Xuantie-900-gcc-elf-newlib-x86_64-V3.2.0/bin/riscv64-unknown-elf-gcc --version
186+
echo "RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V3.2.0/bin" >> $GITHUB_ENV
184187
185188
- name: Install Xuantie-900-gcc-linux-musl Tools
186189
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-Xuantie-900-gcc-linux-musl' && success() }}
@@ -288,4 +291,17 @@ jobs:
288291
uses: actions/upload-artifact@main
289292
with:
290293
name: 00_all_bsp_output_${{ github.sha }}
291-
path: output/
294+
path: output/
295+
296+
# # Post CI status to PR comment
297+
# post-ci-status:
298+
# needs: build
299+
# if: always() && github.event_name == 'pull_request' && github.repository_owner == 'RT-Thread'
300+
# uses: ./.github/workflows/post_ci_status.yml
301+
# with:
302+
# workflow_name: "RT-Thread BSP Static Build Check"
303+
# workflow_status: ${{ needs.build.result }}
304+
# pr_number: ${{ github.event.pull_request.number }}
305+
# permissions:
306+
# pull-requests: write
307+
# issues: write

0 commit comments

Comments
 (0)