Skip to content

Commit f6bf942

Browse files
abrignoniclaude
andcommitted
ci: manual Windows test build with on-runner smoke tests
PyInstaller cannot cross-build, and the Windows frozen binaries have never been executed anywhere in this project's pipeline - which is exactly how the startup-crash class (missing google.protobuf/PIL/leapp_functions) shipped unnoticed. This workflow_dispatch job builds the CLI and GUI on windows-latest, runs the digest-verified parser fetch on real Windows, executes the Mandiant unifiedlog_iterator.exe, runs the frozen CLI end to end on an empty input, checks the parser is inside the bundle, and uploads both exes as an artifact. Manual only; not the release pipeline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent c8a2a2d commit f6bf942

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Windows test build
2+
3+
# Build the Windows CLI and GUI binaries with PyInstaller and smoke-test them on a
4+
# real Windows machine, then upload them as a workflow artifact.
5+
#
6+
# Manual only. This is not the release pipeline; it exists so a Windows binary can be
7+
# produced and actually executed on Windows without anyone owning a Windows box.
8+
# PyInstaller cannot cross-build, so this cannot run on the macOS/Linux runners.
9+
#
10+
# The smoke tests are the point, not decoration: the frozen builds shipped a startup
11+
# crash for a long time (missing google.protobuf/PIL/leapp_functions) precisely
12+
# because nothing ever ran a built binary. Every step here that runs an .exe is a
13+
# regression test for that class of failure.
14+
15+
on:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build-windows:
23+
runs-on: windows-latest
24+
timeout-minutes: 45
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: actions/setup-python@v5
29+
with:
30+
# 3.12 matches the local astc_decomp_faster wheel committed at the repo
31+
# root; other versions would try to build it from source on the runner.
32+
python-version: '3.12'
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install astc_decomp_faster-1.1.0-cp312-cp312-win_amd64.whl
38+
pip install -r requirements.txt
39+
40+
- name: Fetch the Unified Log parser (digest-verified)
41+
run: python admin/scripts/fetch_unifiedlog_iterator.py
42+
43+
- name: Smoke test the parser binary on Windows
44+
# First time the Mandiant Windows build is executed anywhere in this
45+
# project's pipeline. --help is used because unifiedlog_iterator exits
46+
# non-zero on --version alone in some releases; either proves it runs.
47+
run: |
48+
bin\unifiedlog_iterator.exe --help
49+
if ($LASTEXITCODE -ne 0) { exit 1 }
50+
51+
- name: Build CLI and GUI with PyInstaller
52+
working-directory: scripts/pyinstaller
53+
run: |
54+
pyinstaller ileapp.spec --distpath ..\..\dist_build --workpath ..\..\build_tmp --noconfirm
55+
pyinstaller ileappGUI.spec --distpath ..\..\dist_build --workpath ..\..\build_tmp --noconfirm
56+
57+
- name: Smoke test the frozen CLI
58+
# --help proves the exe survives its imports (the historical crash class).
59+
# The empty-input run proves module loading, report generation, and clean
60+
# exit end to end; it must succeed with "no data found" everywhere.
61+
run: |
62+
dist_build\ileapp.exe --help
63+
if ($LASTEXITCODE -ne 0) { exit 1 }
64+
New-Item -ItemType Directory -Path smoke_in, smoke_out | Out-Null
65+
"placeholder" | Out-File smoke_in\placeholder.txt
66+
dist_build\ileapp.exe -t fs -i smoke_in -o smoke_out
67+
if ($LASTEXITCODE -ne 0) { exit 1 }
68+
69+
- name: Verify the parser is bundled inside the frozen CLI
70+
# The artifact must read tracev3 natively on the examiner's machine with
71+
# nothing else installed. A onefile exe unpacks at runtime, so check the
72+
# build manifest: Analysis-00.toc records everything PyInstaller packed.
73+
run: |
74+
if (-not (Select-String -Path build_tmp\ileapp\Analysis-00.toc -Pattern "unifiedlog_iterator.exe" -Quiet)) {
75+
Write-Error "unifiedlog_iterator.exe was not bundled into the CLI build"
76+
exit 1
77+
}
78+
79+
- name: Package artifact
80+
run: |
81+
New-Item -ItemType Directory -Path artifact | Out-Null
82+
Copy-Item dist_build\ileapp.exe artifact\
83+
Copy-Item dist_build\ileappGUI.exe artifact\
84+
Copy-Item bin\LICENSE-unifiedlog_iterator artifact\
85+
86+
- uses: actions/upload-artifact@v4
87+
with:
88+
name: ileapp-windows-x64-test
89+
path: artifact/
90+
retention-days: 14

0 commit comments

Comments
 (0)