Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 0 additions & 108 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: CI

on:
pull_request:
push:
branches: [main]

permissions:
contents: read
Expand Down Expand Up @@ -56,109 +54,3 @@ jobs:
echo '生产 Renderer 包含测试 fixture' >&2
exit 1
fi

linux-integration:
name: Linux integration and packages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: quality
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download and verify OMP Runtime
run: pnpm runtime:download && pnpm runtime:check
- name: Real RPC smoke
run: OMP_RPC_TEST_CONFIG=1 node scripts/rpc-smoke.mjs
- name: Build x64 packages
run: pnpm package:linux && pnpm package:check
- name: Inspect package metadata
shell: bash
run: |
set -euo pipefail
deb="$(find dist -maxdepth 1 -name '*.deb' -print -quit)"
dpkg-deb --info "$deb"
test "$(dpkg-deb -f "$deb" Architecture)" = amd64
test "$(dpkg-deb -f "$deb" Package)" = omp-desktop
- name: Upload packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: main-linux-x64-${{ github.sha }}
path: |
dist/*.AppImage
dist/*.deb
dist/*.sha256
dist/build-metrics.json
if-no-files-found: error
retention-days: 7

linux-display-smoke:
name: Ubuntu ${{ matrix.ubuntu }} x64 ${{ matrix.display }} smoke
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: linux-integration
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
ubuntu: '22.04'
display: x11
- runner: ubuntu-24.04
ubuntu: '24.04'
display: wayland
steps:
- name: Checkout smoke scripts
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: |
scripts
.node-version
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
- name: Download main packages
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: main-linux-x64-${{ github.sha }}
path: candidate
- name: Verify candidate checksums
working-directory: candidate
run: sha256sum -c *.deb.sha256
- name: Install candidate deb
run: sudo apt-get update && sudo apt-get install --yes ./candidate/*.deb
- name: Install display dependencies
run: |
sudo apt-get update
if [[ '${{ matrix.display }}' == x11 ]]; then
sudo apt-get install --yes --no-install-recommends dbus-x11 xauth xvfb
else
sudo apt-get install --yes --no-install-recommends dbus-x11 weston
fi
- name: Run packaged display smoke
run: dbus-run-session -- bash scripts/ci-linux-display-smoke.sh '${{ matrix.display }}' '/opt/OMP Desktop/omp-desktop'
- name: Upload smoke diagnostics
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: main-${{ matrix.ubuntu }}-${{ matrix.display }}-smoke
path: |
${{ runner.temp }}/omp-ci/**
tests/artifacts/*.png
if-no-files-found: warn
retention-days: 7
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ jobs:
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Set candidate version and build once
- name: Set candidate version and prepare Runtime
run: |
pnpm pkg set version='${{ inputs.release_version }}'
pnpm runtime:download
pnpm runtime:check
- name: Run real RPC smoke
run: OMP_RPC_TEST_CONFIG=1 node scripts/rpc-smoke.mjs
- name: Build candidate once and check packages
run: |
pnpm package:linux
pnpm package:check
- name: Check candidate metadata
Expand Down
27 changes: 27 additions & 0 deletions TODO/done/33-separate-ci-and-cd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# MVP-33:分离 CI 和 CD

- 状态:已完成
- 优先级:P0

## 目标

PR 只运行快速质量检查。真实 Runtime、Linux 打包和安装包 smoke 只在手动 CD 中运行。

## 任务

- [x] 删除 `main` push 的 CI 触发器。
- [x] CI 只保留 PR Quality。
- [x] 将真实 RPC smoke 放入手动 Release/CD。
- [x] 保留 CD 的单次打包、包检查和安装版 X11/Wayland smoke。
- [x] 同步发布说明。

## 完成条件

- [x] Workflow 和文档格式检查通过。
- [x] PR Quality 通过。
- [x] CI 仅声明 `pull_request` 触发器,不声明 `main` push 触发器。

## 验证记录

- PR:#48
- PR Quality:30338980406
14 changes: 7 additions & 7 deletions TODO/in-progress/10-ubuntu-packaging-and-acceptance.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@
- [x] CI 执行单元测试。
- [x] GitHub Hosted Runner 覆盖 Ubuntu 22.04、24.04 的 x64、arm64。
- [x] 每个平台和架构分别运行 Xvfb X11 与 Weston headless Wayland smoke,并保存截图和诊断日志;headless Wayland 使用软件渲染并在成功标记后受控终止,不替代真实 GPU 和优雅退出验收。
- [x] CI 执行 RPC smoke test,无法提供真实凭据时使用明确的测试模式
- [x] CI 使用真实 OMP 执行不需要模型凭据的 `ready` 和 `get_state` smoke。
- [x] CI 构建 x64 AppImage 和 x64 `.deb`。
- [x] CI 检查打包产物中是否包含错误平台二进制或开发文件。
- [x] CI 记录构建产物大小。
- [x] CI 记录 Renderer 各 chunk 的原始大小和 gzip 大小。
- [x] PR CI 执行 fake RPC smoke test。
- [x] 手动 CD 使用真实 OMP 执行不需要模型凭据的 RPC smoke。
- [x] 手动 CD 构建 x64 AppImage 和 x64 `.deb`。
- [x] 手动 CD 检查打包产物中是否包含错误平台二进制或开发文件。
- [x] 手动 CD 记录构建产物大小。
- [x] PR CI 记录 Renderer 各 chunk 的原始大小和 gzip 大小。

### 人工验收主链路

Expand All @@ -148,7 +148,7 @@

- [ ] Ubuntu AppImage 可以安装或直接运行。
- [ ] 核心聊天、本地文件、Session、Runtime 环境和 Runtime 网络主链路通过。
- [ ] CI 检查全部通过。
- [ ] PR CI 和手动 CD 检查全部通过。
- [ ] 性能指标已记录,超预算项有明确处理结论。
- [ ] 安装包不包含 Browser Use、Computer Use 和无关平台资源。
- [ ] 已知问题写入发布说明。
Expand Down
10 changes: 5 additions & 5 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# 发布流程

CI 和 CD 分开:PR 只做快速质量检查`main` 做发布前健康检查,Release 测试并发布同一个候选产物
CI 和 CD 分开:PR 只做快速质量检查。合并到 `main` 不重复运行 CI,也不打包。手动触发 Release/CD 后,才运行真实 Runtime、打包和安装包测试,并发布同一个候选产物

## PR 和 main
## CI

- PR 只运行 `CI / Quality`:依赖安装、类型检查、Lint、格式检查、测试、fake RPC smoke 和生产构建。
- 合并到 `main` 后,额外运行真实 Runtime/RPC、x64 AppImage/deb 构建,以及 Ubuntu 22.04 X11 和 Ubuntu 24.04 Wayland 两组安装包 smoke
- PR 不下载真实 Runtime、不打包、不运行 GPU 或显示矩阵。
- `main` 没有 CI 触发器。合并后不重复运行 Quality,也不下载 Runtime 或构建安装包
- CI 不运行真实 Runtime、打包、GPU 或显示矩阵。

## Release

1. 确认目标 commit 已在 `main`,并在本机原生 Wayland + RTX 3090 完成 [人工发布验收](release-acceptance.md),生成 `~/.local/state/omp-desktop/release-acceptance/<commit>.json`。
2. 在 GitHub Actions 手动运行 `Release`,输入不带 `v` 的版本,例如 `0.1.1`。
3. `Build release candidate` 在 Hosted Runner 上只构建一次 AppImage、deb、SHA-256 和构建指标,并上传为 artifact。
3. `Build release candidate` 在 Hosted Runner 上下载并校验真实 Runtime,运行真实 RPC smoke,然后只构建一次 AppImage、deb、SHA-256 和构建指标,并上传为 artifact。
4. 四组 Hosted 测试(Ubuntu 22.04/24.04 × X11/Wayland)都下载并测试这个 artifact;测试安装后的 `.deb`,不重新构建。
5. `RTX 3090 Wayland candidate acceptance` 使用标签 `[self-hosted, Linux, X64, rtx3090, wayland]`,下载同一个 AppImage,检查真实 GPU、WebGL/WebGL2、窗口、截图和 RPC。不在真机重新打包。
6. 全部通过后,Workflow 创建 Draft Release `v<version>` 并上传同一批文件。人工检查产物、SHA-256、截图和 GPU 证据,在 GitHub 页面点击 **Publish**。
Expand Down