build: prepare complete V1.2.1 runtime and Gitea regression workflow
Core regression / Python core and release configuration (push) Failing after 1m52s

This commit is contained in:
阿白叔 committed 2026-11-02 14:55:52 +08:00
1 parent 344a2797b0
commit cd9431985e
8 files changed
+99 -16

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
name: Core regression
on:
push:
branches: [main, 'codex/**']
tags: ['v*']
pull_request:
workflow_dispatch:
jobs:
portable-regression:
name: Python core and release configuration
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout tested commit
uses: https://github.com/actions/checkout@v4
- name: Python 3.12
uses: https://github.com/actions/setup-python@v5
with:
python-version: '3.12'
- name: Install portable test dependencies
run: python -m pip install 'pytest>=8,<9'
- name: Compile application and build helpers
run: python -m compileall -q src packaging tools
- name: Core regression (no CAD or production credentials)
run: >-
python -m pytest -q
tests/dsh/test_core.py
tests/dsh/test_failure_policy.py
tests/dsh/test_decision_log.py
tests/dsh/test_experience.py
tests/dsh/test_issue_broker.py
tests/packaging/test_dsh_runtime_staging.py
tests/packaging/test_release_configuration.py
--junitxml=build/ci-results.xml --tb=short
- name: JavaScript syntax
run: |
node --check integration/dsh/start.mjs
node --check integration/dsh/task-plugin/host.mjs
node --check integration/dsh/task-plugin/client.js
- name: Windows release scope
run: |
echo 'Windows PyInstaller, Qt WebEngine startup, full runtime file hashes and extracted EXE smoke are validated on the Windows build host.'
echo 'This Linux job does not claim Windows/CAD or live model acceptance.'
+4 -4
View File
@@ -4,11 +4,11 @@
面向 **Windows + DxDesigner / Expedition Enterprise 7.9.5** 的器件批量替换工具。一个工程对应一个任务,可以只替换同料号下的部分位号;支持直接编辑和 Excel BOM 导入,同批工程按顺序执行。
**最新版本:V1.1.4 Beta 4(预发布)** · [下载便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.4/DxPartReplace-1.1.4-beta.4.zip) · [版本说明与附件](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/tag/v1.1.4-beta.4) · [完整使用说明](docs/user/v1.1.0-project-tasks.md)
**最新版本:V1.2.1(预发布)** · [下载便携包](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/releases/download/v1.2.1/DxPartReplace-1.2.1.zip) · [版本说明与附件](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/releases/tag/v1.2.1) · [完整使用说明](docs/user/v1.1.0-project-tasks.md)
所有发布均标记为 **Beta 预发布**。V1.1.4 Beta 1 因 BOM 导入缺少 `win32timezone` 已撤回,请使用 Beta 4;旧 Git 标签保留供回溯。升级前备份 `data`,完整更新 EXE 与 `_internal`,不要只替换 EXE。
V1.2.1 提供完整 Node/Qt 运行时、DSH 任务功能和全部 UI 资源。升级前备份 data,完整更新 EXE 与 _internal,不要只替换 EXE。
Beta 4 面向停止与资源收尾复测:普通暂停等待当前项保存核验,写入中无进度不再自动杀进程;新增明确确认的强制结束,保留中断证据与恢复入口。[本版变更和复测说明](docs/releases/v1.1.4-beta.4.md)。
本版修复冻结应用缺少 SVG 资源的问题,保留维护者配置的工单上报能力,并增加云端 CI。[本版变更](docs/releases/v1.2.1.md)。
本版提供[目标封装选择](docs/user/target-cell-selection.md):目标封装可留空,此时工具不主动覆写封装,可后续与中心库同步;需要指定时,在料号规则中读取并选择合法封装。BOM 保持原 11 列。
@@ -44,7 +44,7 @@ node tools/verify_dsh_runtime.mjs
### 第 1 步:解压并打开应用
[下载 V1.1.4 Beta 4 便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.4/DxPartReplace-1.1.4-beta.4.zip),**完整解压**,双击 `DxPartReplace.exe`。保留它与 `_internal` 的相对位置,无需安装 Python;本机需要可用的 DxDesigner、许可证和中央库。
[下载 V1.2.1 便携包](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/releases/download/v1.2.1/DxPartReplace-1.2.1.zip),**完整解压**,双击 `DxPartReplace.exe`。保留它与 `_internal` 的相对位置,无需安装 Python;本机需要可用的 DxDesigner、许可证和中央库。
打开后看到下图主窗口。首次使用请准备完整的工程副本,执行前保存并关闭待处理工程。
+12
View File
@@ -0,0 +1,12 @@
# V1.2.1
本版合并 PR #14 的 DSH 启动错误提示,并提供完整 Windows 便携运行包。
- 包含整个已安装的 DSH Node 依赖目录、Node 可执行文件、官方前端、任务插件、Qt WebEngine 运行库和全部 UI 图标。
- 按维护者的部署要求保留 issue reporter 配置;模型 API 密钥及个人任务数据不随包分发。
- 应用标题、Python 项目元数据和 Windows 产品版本统一为 1.2.1。
- 新增 Gitea Actions 回归,覆盖平台无关核心逻辑与发行配置。Windows 冻结程序另在构建机验收。
完整解压 `DxPartReplace-1.2.1.zip`,运行目录内的 `DxPartReplace.exe`。请保留 `_internal` 的完整目录结构,升级前备份旧版 `data`。
旧版在本版通过验证并公开后转为草稿下架,历史标签保留。运行和云端验证的实际结果见发行附件中的 build-validation.json。
+4 -6
View File
@@ -3,14 +3,11 @@
from pathlib import Path
import shutil
import sys
import win32com.client.gencache
project_root = Path(SPECPATH).parent
sys.path.insert(0, str(project_root / 'packaging'))
from dsh_runtime_staging import stage_node_modules
generated_root = project_root / "build" / "DxPartReplace-generated"
generated_root.mkdir(parents=True, exist_ok=True)
viewdraw_api = win32com.client.gencache.EnsureModule(
@@ -21,7 +18,7 @@ if viewdraw_api is None:
shutil.copyfile(viewdraw_api.__file__, generated_root / "viewdraw_api.py")
legacy_runtime_datas = [
(
str(project_root / 'src/dx_productivity/trial_task_center/assets/app.ico'),
str(project_root / 'src/dx_productivity/trial_task_center/assets'),
'dx_productivity/trial_task_center/assets',
),
(
@@ -41,8 +38,9 @@ if (dsh_root / 'issue-bootstrap.json').is_file():
if (dsh_root / 'node_modules' / '@deepseek-ai' / 'dsh' / 'package.json').is_file():
if not (dsh_root / 'issue-bootstrap.json').is_file():
raise RuntimeError('Provision the DSH issue-only reporter before packaging the native assistant.')
staged_node_modules = stage_node_modules(
dsh_root / 'node_modules', generated_root / 'dsh-node_modules')
# Release distribution keeps the complete installed runtime, including
# lazily loaded packages, native binaries, frontend assets and metadata.
staged_node_modules = dsh_root / 'node_modules'
legacy_runtime_datas.extend([
(str(dsh_root / 'start.mjs'), 'dsh-runtime'),
(str(dsh_root / 'package.json'), 'dsh-runtime'),
+4 -4
View File
@@ -1,8 +1,8 @@
# UTF-8
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(1, 1, 4, 4),
prodvers=(1, 1, 4, 4),
filevers=(1, 2, 1, 0),
prodvers=(1, 2, 1, 0),
mask=0x3f,
flags=0x2,
OS=0x40004,
@@ -15,11 +15,11 @@ VSVersionInfo(
StringTable('040904B0', [
StringStruct('CompanyName', 'DxProductivity'),
StringStruct('FileDescription', 'DxDesigner Part Replacement'),
StringStruct('FileVersion', '1.1.4.4'),
StringStruct('FileVersion', '1.2.1.0'),
StringStruct('InternalName', 'DxPartReplace'),
StringStruct('OriginalFilename', 'DxPartReplace.exe'),
StringStruct('ProductName', 'DxDesigner Part Replacement'),
StringStruct('ProductVersion', '1.1.4-beta.4')
StringStruct('ProductVersion', '1.2.1')
])
]),
VarFileInfo([VarStruct('Translation', [1033, 1200])])
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "dx-productivity"
version = "1.1.4b4"
version = "1.2.1"
requires-python = ">=3.12,<3.13"
dependencies = ["PySide6>=6.7,<7", "pywin32>=306", "pywinauto>=0.6.9,<1", "openpyxl>=3.1,<4"]
@@ -1 +1 @@
VERSION = "1.1.4-beta.4"
VERSION = "1.2.1"
@@ -0,0 +1,28 @@
"""Catch missing runtime assets and mismatched version identity before release."""
import ast
from pathlib import Path
import tomllib
ROOT = Path(__file__).resolve().parents[2]
def test_release_version_matches_python_and_windows_resources():
namespace = {}
exec((ROOT / 'src/dx_productivity/trial_task_center/version.py').read_text(), namespace)
version = namespace['VERSION']
assert tomllib.loads((ROOT / 'pyproject.toml').read_text())['project']['version'] == version
info = (ROOT / 'packaging/windows-version-info.txt').read_text()
assert f"StringStruct('ProductVersion', '{version}')" in info
parts = tuple(int(n) for n in version.split('.')) + (0,)
assert f'filevers={parts}' in info and f'prodvers={parts}' in info
def test_release_spec_includes_all_assets_and_complete_runtime():
tree = ast.parse((ROOT / 'packaging/DxPartReplace.spec').read_text())
constants = {node.value for node in ast.walk(tree) if isinstance(node, ast.Constant) and isinstance(node.value, str)}
assert 'src/dx_productivity/trial_task_center/assets' in constants
assert not any(isinstance(node, ast.Call) and isinstance(node.func, ast.Name)
and node.func.id == 'stage_node_modules' for node in ast.walk(tree))
assert {'dsh-runtime/node_modules', 'dsh-runtime/task-plugin',
'issue-bootstrap.json', 'PySide6.QtWebEngineCore',
'PySide6.QtWebEngineWidgets'} <= constants