构建与发布

IDE 的构建、测试和发布流程。

本地开发与构建

git clone --recursive https://github.com/pyrite-project/pyrite-ide.git
cd pyrite-ide
flutter pub get

windows 替换为 linuxmacos 或可用的 Android 设备 ID。若仓库不是通过 --recursive 克隆,请先执行:

git submodule update --init --recursive

首先请设置 SERIOUS_PYTHON_SITE_PACKAGES 环境变量,请将 ... 处替换为项目根目录:

export SERIOUS_PYTHON_SITE_PACKAGES=".../assets/python_runtime_boot"

针对你的目标平台,打包 python_runtime_boot.zip,这里以 Linux 为例:

dart run serious_python:main package "assets/python_runtime_boot" --platform Linux --asset "assets/python_runtime_boot.zip" --verbose

运行命令开始编译:

flutter build linux --release --verbose

其中的 --release--verbose 均为可选参数,须特别注意,若目标平台为 AndroidMacOS,须传入 --no-tree-shake-icons 参数

CI/CD

自动化流程

  1. 代码推送触发 CI
  2. 运行分析和测试
  3. 构建各平台产物
  4. 打包 Python 运行时
  5. 发布 Release

构建产物

平台格式
Windows.zip
macOS.zip
Linux`tar.gz``
Android.apk

发布流程

版本号

遵循语义化版本:major.minor.patch

更新日志

暂时没有相关要求,请持续关注变更

GitHub Release

  1. 创建 Git Tag
  2. 推送 Tag
  3. CI 自动构建并发布

安全

  • 不要提交签名密钥
  • 不要提交本地设备路径
  • CI 中使用环境变量存储密钥

On this page