diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 818ee38..47b0bb5 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -75,7 +75,7 @@ function sidebarDocument(): DefaultTheme.SidebarItem[] { return [ { text: 'Devstar是什么', - link: '/document/index', + link: '/devstar/index', items: [] } as any, { @@ -86,7 +86,7 @@ function sidebarDocument(): DefaultTheme.SidebarItem[] { { text: '对比Gitea与其它Git托管工具', link: 'https://docs.gitea.com/zh-cn/installation/comparison' }, { text: '数据库准备', link: 'https://docs.gitea.com/zh-cn/installation/database-prep' }, // { text: '数据库准备', link: '/document/installation/from-source' }, - { text: '使用shell脚本安装', link: '/document/installation/install-via-shell-script' }, + { text: '使用shell脚本安装', link: '/devstar/installation/install-via-shell-script' }, { text: '使用二进制文件安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-binary' }, { text: '包管理器安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-package' }, { text: '使用源代码安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-source' }, @@ -130,7 +130,7 @@ function sidebarDocument(): DefaultTheme.SidebarItem[] { collapsible: true, // 使整个组可折叠 collapsed: true, // 默认展开 items: [ - { text: '结合AI快速开始', link: 'document/usage/quick-start-with-ai' }, + { text: '结合AI快速开始', link: 'devstar/usage/quick-start-with-ai' }, { text: 'Actions', collapsible: true, // 使整个组可折叠 diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index c4b83d7..eb903c0 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -13,6 +13,16 @@ background-color: white !important; } +/* 去除掉每个h2标题上面的线 */ +.vp-doc h2 { + border-top: none; +} + +/* 去除掉页面底部导航的横线 */ +nav.prev-next { + border-top: none !important; +} + /* 首页图片 */ img.VPImage.image-src { max-width: 500px !important; diff --git a/docs/cloudbuild/index.md b/docs/cloudbuild/index.md index f414a35..10da1b0 100644 --- a/docs/cloudbuild/index.md +++ b/docs/cloudbuild/index.md @@ -1,5 +1,5 @@ # 分布式编译系统CloudBuild - +![alt text](/public/cloudbuild/promotional-graphic-cloudbuild.jpg) ## 为什么需要分布式编译技术 - 大型项目过长的编译耗时将会给开发、测试和调试都带来延迟,所以缩短大型项目的编译时间的分布式编译系统有重要意义 - 使用分布式编译系统编译项目可以利用计算机集群提高编译效率,缩短项目编译时间 @@ -25,3 +25,55 @@ CloudBuild主程序分为三个部分:Client、Server、Executor。 ### 系统分层结构 ![alt text](/public/cloudbuild/layered-system-architecture.png) + +## 运行原理与流程 + +### 分布式编译原理 +![alt text](/public/cloudbuild/compiler-principles.png) + +### CloudBuild客户端 +CloudBuild客户端基于Ninja改造,有下面这些优势 +- 兼容使用Ninja编译的项目 +- 使用远程执行的方式提高编译时并发度 +- 使用编译缓存减少需要编译的任务数量 + +### CloudBuild服务端 +- 使用远程执行的方法提高编译时并发度,实现了任务分发至远程节点同步执行 +- 使用分布式任务调度提高任务调度效率和计算节点资源利用率,避免集中式调度的任务阻塞问题 +- 使用编译缓存结合内容寻址存储技术减少网络传输量、避免重复上传与重复编译 + +### CloudBuild优势 +- 低成本:组成executor的机器不需要使用专门的高性能计算型机器,可使用多个平价的空闲机器 +- 高效:CloudBuild实现分布式编译的功能,相比单机大大提升并发度 +- 兼容Ninja:CloudBuild客户端基于Ninja改造,对于使用Ninja构建和可以转换为Ninja构建的项目不用额外修改构建清单 + +### CloudBuild执行流程 +- 客户端: 生成远程任务->生成任务依赖->发送任务与依赖 +- 服务端:检查任务缓存->检查依赖完整性->调度任务 +- 编译结点:还原文件目录->还原文件目录->返回编译结果 + +## AOSP和LLVM上的应用 +### LLVM上的应用效果 +![alt text](/public/cloudbuild/table1.png) +### AOSP上的应用效果 +![alt text](/public/cloudbuild/table2.png) +### CloudBuild硬件资源利用率 +4核CPU利用率: +![alt text](/public/cloudbuild/CPU-utilization-4.png) +8核CPU利用率: +![alt text](/public/cloudbuild/CPU-utilization-8.png) +16核CPU利用率: +![alt text](/public/cloudbuild/CPU-utilization-16.png) + +## CloudBuild使用方法 +### CloudBuild安装 +![alt text](/public/cloudbuild/cloudbuild-installation.png) +CloudBuild项目地址:https://gitee.com/cloudbuild888/cloudbuild.git +### CloudBuild分布式编译 +![alt text](/public/cloudbuild/cloudbuild-distributed-compilation.png) +LLVM项目地址:https://gitee.com/mirrors/LLVM.git + + + + + diff --git a/docs/components/index.vue b/docs/components/index.vue index 7ad6562..59a25ef 100644 --- a/docs/components/index.vue +++ b/docs/components/index.vue @@ -2,7 +2,6 @@
- 企业文化 @@ -38,7 +36,6 @@
- 办公地点 @@ -62,7 +59,7 @@