Skip to content

feat(ci): add experimental Linux x86_64 build (.deb + .AppImage)#40

Open
Cmochance wants to merge 1 commit into
mainfrom
feat/linux-packaging
Open

feat(ci): add experimental Linux x86_64 build (.deb + .AppImage)#40
Cmochance wants to merge 1 commit into
mainfrom
feat/linux-packaging

Conversation

@Cmochance
Copy link
Copy Markdown
Owner

Summary

  • 在 release pipeline 加 Linux x86_64 构建,输出 .deb.AppImage,与现有 macOS arm64 / Windows x64 同步随 tag 进 draft release
  • ubuntu-22.04(glibc 2.35)构建,覆盖 Ubuntu 22.04+ / Debian 12+ 及同基线发行版
  • 标注为实验性:UI / 切换 / plan & quota 与其它平台一致;但 Codex CLI 路径自检和 codex login spawn 当前复用 Windows runtime 分支(源码里 #[cfg(not(target_os = "macos"))] fallback),Linux-native 适配未单独做,欢迎收到 issue 后再迭代

变更内容

文件 改动
src-tauri/tauri.linux.conf.json (新) 打开 bundle,targets = deb + appimage
package.json tauri:build:linux 脚本(与 :windows 同 shape)
.github/workflows/build.yml matrix 加 linux-x86_64;apt 装 Tauri Linux deps(runner.os == 'Linux' 守护,不影响 mac / win 作业);release job 文件列表追加 Linux artifact
README.md / README.zh-CN.md 「下载」段加 Linux 资产名,「平台支持」段升级 Linux 描述为实验性
CHANGELOG.md 1.5.11 entry 描述本次变更 + 实验性说明

Test plan

PR 作者无法在 macOS 上本机验证 Linux 产物,需要以下手动验证(push 后我会以评论形式汇总):

  • CI 全绿(含 linux-x86_64 构建产生 .deb 和 .AppImage 两个 artifact)
  • CI artifact 下载下来文件名符合预期(Tauri 2 默认 <productName>_<version>_<arch>.{deb,AppImage}
  • 在 Ubuntu 22.04+ / Debian 12+ 上 sudo dpkg -i codex_switch_*.deb 安装无报错
  • AppImage chmod +x 后可直接运行
  • 启动后 UI 渲染、账号列表加载、切换、plan/quota 显示正常(与 macOS / Windows 一致)
  • Codex CLI 路径自检 / codex login 实际行为(已知是 Windows 分支 fallback,本 PR 不修,仅记录现状)

Extend the release pipeline to publish Linux artifacts alongside the
existing macOS arm64 and Windows x64 ones. Built on ubuntu-22.04
(glibc 2.35) to keep the baseline broad. UI / switching / quota
features work as on the other platforms; Linux-native paths for
Codex CLI integration are not separately adapted yet (the non-macOS
code branch is reused), so this is shipped as experimental.

- src-tauri/tauri.linux.conf.json: enable bundle, deb + appimage targets
- package.json: add tauri:build:linux script (mirrors :windows)
- .github/workflows/build.yml: add linux-x86_64 matrix entry with
  apt step gated on runner.os, append artifact glob to release job
- README + CHANGELOG: document experimental status and runtime caveat
@Cmochance
Copy link
Copy Markdown
Owner Author

用户操作清单

Pre-merge 验证(自动跑中)

  • PR 普通 CI:run 25960385073(仅 cargo check/test on ubuntu-latest,验证 Rust 仍能跨平台编译)
  • 手动 workflow_dispatch:run 25960405872 — 实际跑完整 build matrix(含本 PR 新加的 linux-x86_64),产出 .deb + .AppImage artifacts。这是 pre-merge 验证新 matrix 的关键,普通 PR CI 只跑 ci job 不会触发 build matrix。
    • 全绿后 artifacts 在该 run 的 "Artifacts" 区域下载(codex-switch-linux-x86_64 zip 里包含 .deb.AppImage

需要在 Linux 机器上手测的事项

我(mac 端)无法本机验证 Linux 产物,请你或 Linux 测试机的用户:

  • sudo dpkg -i codex_switch_*.deb 在 Ubuntu 22.04+ / Debian 12+ 上安装无报错;启动后 UI 渲染、账号列表加载、切换、plan/quota 显示正常
  • chmod +x codex_switch_*.AppImage && ./codex_switch_*.AppImage 直接运行,行为同上
  • 已知限制(不需要本 PR 修,仅记录现状):Codex CLI 路径自检 / codex login 当前走 Windows runtime fallback(#[cfg(not(target_os = "macos"))]),Linux 上具体行为是否可用待你实测后看是否值得后续 PR 单独适配

Merge 后

  • squash-merge 本 PR(main 已配 conversation resolution 保护,注意 chatgpt-codex-connector 如有 thread 需 resolve;我会持续跟)
  • 下个 release tag 时 Linux artifacts 会自动随 draft release 上传,按全局默认保留 draft 等你确认转 Latest

@Cmochance
Copy link
Copy Markdown
Owner Author

Pre-merge 验证已通过

Run 状态 验证内容
25960385073 ✅ success PR CI(cargo check/test on Linux)— Rust 仍能跨平台编译
25960405872 ✅ success workflow_dispatch 完整 build matrix — mac arm64 / windows x86_64 / linux x86_64 全绿

Linux artifact 已验证(从 dispatch run 下载)

deb/codex_switch_1.5.10_amd64.deb              15 MB
appimage/codex_switch_1.5.10_amd64.AppImage    88 MB

文件名与 README 预告的 codex_switch_<版本>_amd64.{deb,AppImage} 模板完全一致;release job 的 *.deb / *.AppImage glob 不会漏。release tag 流程会按 tag 版本号重新构建,不是用 1.5.10。

还需要的人工动作

仅剩"在 Linux 机器上手测产物"。CI 已经证明能 build + 打包 + 上传,但没法证明产物在用户机器上跑得起来。pre-merge 想做的话:从上面 dispatch run 的 Artifacts 区下 codex-switch-linux-x86_64.zip,在 Ubuntu 22.04+ / Debian 12+ 机器上测 .deb / .AppImage。也可以直接 merge,下次 release tag 时再让用户实测。

无 chatgpt-codex-connector review thread。等其晚到时我会按全局规则处理。

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant