fix(ci): 冒烟驱动加反遮挡——WindowFromPoint 探测视线归属,遮挡进程直接杀(OOBE 窗自身也是置顶层,TOPMO… #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 一键安装器 UI 冒烟(dev-board#339):在 Windows runner 上渲染位图、编译 | |
| # awd-oneclick-ui.nsh 的测试壳与插件安装器,真跑一遍「大卡片 → 角落进度卡 → | |
| # 完成卡」并逐阶段截图上传。开发期在专用分支上按推自动跑;平时手动触发。 | |
| # 不依赖桌面完整打包(那是 desktop-build.yml 的事),几分钟出结果, | |
| # 是没有 Windows 真机时唯一的视觉回归手段。 | |
| name: installer-ui-smoke | |
| on: | |
| push: | |
| branches: [claude/installer-oneclick-ui, claude/win-dual-arch] | |
| workflow_dispatch: | |
| jobs: | |
| smoke: | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Render one-click art (Chrome + ImageMagick, runner 自带) | |
| shell: pwsh | |
| run: | | |
| node desktop/scripts/render-oneclick-art.mjs --product desktop --out desktop/build/win/generated --version 9.9.9 | |
| node desktop/scripts/render-oneclick-art.mjs --product addin --out office-addin/installer/win/generated --version 9.9.9 | |
| - name: Ensure NSIS | |
| shell: pwsh | |
| run: | | |
| if (-not (Get-Command makensis -ErrorAction SilentlyContinue)) { | |
| choco install nsis -y --no-progress | |
| Add-Content $env:GITHUB_PATH 'C:\Program Files (x86)\NSIS' | |
| } | |
| - name: Compile harness (zh/en) and addin installer | |
| shell: pwsh | |
| # NSIS 的相对 File 路径是相对脚本所在目录解析的,所有 -D 路径一律给绝对路径 | |
| run: | | |
| $ws = $env:GITHUB_WORKSPACE | |
| New-Item -ItemType Directory -Force payload | Out-Null | |
| 1..4 | ForEach-Object { fsutil file createnew ("payload\blob$_.bin") 41943040 } | |
| makensis /INPUTCHARSET UTF8 /DHARNESS_LANG=SimpChinese "/DGENART=$ws\desktop\build\win\generated" "/DPAYLOAD=$ws\payload" "/DOUTFILE=$ws\harness-zh.exe" desktop\build\win\ui-harness.nsi | |
| makensis /INPUTCHARSET UTF8 /DHARNESS_LANG=English "/DGENART=$ws\desktop\build\win\generated" "/DPAYLOAD=$ws\payload" "/DOUTFILE=$ws\harness-en.exe" desktop\build\win\ui-harness.nsi | |
| Set-Content -Path dummy-manifest.xml -Value '<?xml version="1.0"?><OfficeApp/>' | |
| makensis /INPUTCHARSET UTF8 /DVERSION=0.0.1 "/DMANIFEST=$ws\dummy-manifest.xml" "/DOUTFILE=$ws\addin-smoke.exe" "/DARTDIR=$ws\office-addin\installer\win" "/DAWD_UI_ENGINE=$ws\desktop\build\win\awd-oneclick-ui.nsh" "/DGENART=$ws\office-addin\installer\win\generated" /DLEGALBASE=https://www.aiworkdeck.com office-addin\installer\win\installer.nsi | |
| - name: Drive zh harness with screenshots | |
| shell: pwsh | |
| run: pwsh -File desktop/scripts/installer-smoke.ps1 -Exe harness-zh.exe -OutDir shots/zh | |
| - name: Drive en harness with screenshots | |
| shell: pwsh | |
| run: pwsh -File desktop/scripts/installer-smoke.ps1 -Exe harness-en.exe -OutDir shots/en | |
| - name: Drive addin installer (无目录展开分支的实跑覆盖) | |
| shell: pwsh | |
| # 插件端不开 AWD_UI_DIR_CHOICE,欢迎页少一组控件、安装秒完——点自定义安装 | |
| # 的那一下落在空白处无害,其余流程同款;在 runner 上写 HKCU sideload 键无碍 | |
| run: pwsh -File desktop/scripts/installer-smoke.ps1 -Exe addin-smoke.exe -OutDir shots/addin | |
| - name: Upload screenshots | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: installer-ui-shots | |
| path: shots/ | |
| if-no-files-found: warn | |
| - name: Upload rendered art for the ARM job | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: oneclick-art-desktop | |
| path: desktop/build/win/generated/ | |
| retention-days: 1 | |
| # 真 ARM64 Windows(public 仓才有的 windows-11-arm runner):验证一键 UI 在 | |
| # ARM 上的实际表现(NSIS 产物是 x86,走系统转译层),并断言双架构检测判据 | |
| #(dev-board#341 的 customInstall 用同一注册表位)。探索性 job,失败不拦主 job。 | |
| smoke-arm: | |
| needs: smoke | |
| runs-on: windows-11-arm | |
| timeout-minutes: 25 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Assert native arch detection reads ARM64 | |
| shell: pwsh | |
| run: | | |
| # reg query 输出是行数组:-notmatch 对数组做过滤不是布尔,必须先拼成串 | |
| #(首轮真机 run 实锤:值明明是 ARM64 断言却红) | |
| $out = (reg query 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' /v PROCESSOR_ARCHITECTURE) | Out-String | |
| if ($out -notmatch 'ARM64') { throw "native arch not ARM64: $out" } | |
| Write-Host 'detection ok: ARM64' | |
| - name: Ensure NSIS | |
| shell: pwsh | |
| run: | | |
| if (-not (Get-Command makensis -ErrorAction SilentlyContinue)) { | |
| choco install nsis -y --no-progress | |
| Add-Content $env:GITHUB_PATH 'C:\Program Files (x86)\NSIS' | |
| } | |
| # 位图复用 x64 job 的渲染产物:ARM runner 镜像的 ImageMagick 缺模块注册表 | |
| #(RegistryKeyLookupFailed,连 PNG 都解不了,首轮真机 run 实锤),而位图 | |
| # 本来就与架构无关,没必要在 ARM 上再渲染一遍 | |
| - name: Download rendered art from x64 job | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: oneclick-art-desktop | |
| path: desktop/build/win/generated/ | |
| - name: Compile harness (zh) | |
| shell: pwsh | |
| run: | | |
| $ws = $env:GITHUB_WORKSPACE | |
| New-Item -ItemType Directory -Force payload | Out-Null | |
| 1..4 | ForEach-Object { fsutil file createnew ("payload\blob$_.bin") 41943040 } | |
| makensis /INPUTCHARSET UTF8 /DHARNESS_LANG=SimpChinese "/DGENART=$ws\desktop\build\win\generated" "/DPAYLOAD=$ws\payload" "/DOUTFILE=$ws\harness-zh.exe" desktop\build\win\ui-harness.nsi | |
| if ($LASTEXITCODE -ne 0) { throw "makensis failed" } | |
| if (-not (Test-Path "$ws\harness-zh.exe")) { throw 'harness exe missing' } | |
| - name: Drive harness with screenshots (ARM real machine) | |
| shell: pwsh | |
| run: pwsh -File desktop/scripts/installer-smoke.ps1 -Exe harness-zh.exe -OutDir shots-arm/zh | |
| - name: Upload ARM screenshots | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: installer-ui-shots-arm | |
| path: shots-arm/ | |
| if-no-files-found: warn |