添加配置文件管理和完整文档系统
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 30s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 42s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 41s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 54s
Build and Release / release (push) Has been skipped
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 30s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 42s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 41s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 54s
Build and Release / release (push) Has been skipped
- 重构配置方式:使用 params.conf 替代命令行参数 - postinst 自动创建配置文件,升级时保护用户配置 - 初始化 llmdoc 文档系统(概述、架构、指南、参考) - 创建 README.md 和配置指南 - 提供完整的配置模板示例 配置文件优势:升级安全、集中管理、易于维护
This commit is contained in:
83
llmdoc/architecture/cicd-architecture.md
Normal file
83
llmdoc/architecture/cicd-architecture.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# CI/CD 架构
|
||||
|
||||
## 流水线概述
|
||||
|
||||
P2Pool 构建系统使用 Gitea Actions 实现自动化构建、测试和发布流程。
|
||||
|
||||
## 构建矩阵
|
||||
|
||||
### 架构支持
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
### 发行版本
|
||||
- Ubuntu
|
||||
- Alpine Linux
|
||||
|
||||
### 构建组合
|
||||
- 总计 4 种构建变体:
|
||||
1. amd64 + Ubuntu
|
||||
2. amd64 + Alpine
|
||||
3. arm64 + Ubuntu
|
||||
4. arm64 + Alpine
|
||||
|
||||
## 流水线触发条件
|
||||
|
||||
### 自动触发
|
||||
- 推送到 `main` 和 `develop` 分支
|
||||
- 创建 Git 标签(发布版本)
|
||||
|
||||
## 流水线阶段
|
||||
|
||||
### 构建与测试阶段
|
||||
```yaml
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64, arm64]
|
||||
distro: [ubuntu, alpine]
|
||||
|
||||
# 使用原生架构的 runner
|
||||
runs-on: >-
|
||||
${{
|
||||
matrix.arch == 'amd64' && 'ubuntu-latest-amd64' ||
|
||||
'ubuntu-latest-arm64'
|
||||
}}
|
||||
```
|
||||
|
||||
### 关键步骤
|
||||
1. 设置 Docker Buildx
|
||||
2. 构建二进制文件
|
||||
3. 打包为 tar.gz
|
||||
4. 对于 Ubuntu:创建 Debian 包
|
||||
5. 上传构建产物
|
||||
|
||||
### 发布阶段
|
||||
- 下载所有构建产物
|
||||
- 上传到 Gitea 通用包仓库
|
||||
- 上传 Debian 包
|
||||
- 创建发布版本
|
||||
- 附加下载链接
|
||||
|
||||
## 性能特点
|
||||
|
||||
### 原生架构构建
|
||||
- 比 QEMU 跨架构编译快 3-10 倍
|
||||
- 构建稳定性高
|
||||
- 需要专用的 amd64 和 arm64 runner
|
||||
|
||||
### 编译并行度
|
||||
- amd64:使用一半 CPU 核心
|
||||
- arm64:使用全部 CPU 核心
|
||||
- 跨架构编译:限制为 2 个并行作业
|
||||
|
||||
## 关键配置文件
|
||||
|
||||
- [.gitea/workflows/ci.yaml](../../.gitea/workflows/ci.yaml):主要 CI/CD 配置
|
||||
|
||||
## 安全与性能平衡
|
||||
|
||||
- 限制并行编译作业数
|
||||
- 使用原生架构 runner
|
||||
- 避免使用 QEMU 虚拟化
|
||||
Reference in New Issue
Block a user