Repository navigation
ci(windows-signing): run the signing action steps from Python (GEN-005) - #2820
Conversation
RED. The action is still ten PowerShell blocks, ci/windows_signing.py does not exist, and ci.toml still carries the path's GEN-005 exceptions, so all 21 assertions fail (20 failures, 1 error) on this commit.
GREEN. `action.yaml` is ten `uv run --no-project --script ci/windows_signing.py <step>` lines instead of ten PowerShell blocks, with the pinned Set Up uv step first. `ci/windows_signing.py` keeps each step's argv, exit status and working directory (the old `Ensure-Location` helper only ever changed directory); `SIGNTOOL` can override the SDK path so the tests can stub it. The three `.ps1` helpers only this action sourced are deleted, and so are the path's four GEN-005 `[[exceptions]]` blocks in `ci.toml`. Refs #2816
c05a716 to
8a29ef9
Compare
|
Coordinator: rebased onto The conflict was mechanical and expected: #2806 landed the Re-ran the affected offline set on the new tip before queueing: |
|
Handed off to the coordinator PR #2820 is green ( What is in it: Local checks: |
What
.github/actions/windows-signing/action.yamlwas ten multi-line PowerShellrun:blocks (plus the three*.ps1helpers only this action sourced). Every step is now one call intoci/windows_signing.py, which opens with a pinnedSet Up uvstep.Fixes #2816.
RED
60eefe007—ci/test_windows_signing.pyonly (340 lines). Onorigin/masterit fails: the module does not exist, the action is still PowerShell, andci.tomlstill carries the path's GEN-005 blocks. Result on that commit:Ran 21 tests ... FAILED (failures=20, errors=1).GREEN
c05a7167e—ci/windows_signing.py(10 subcommands), the action rewritten, the three unused.ps1files deleted, and the path's four GEN-005[[exceptions]]blocks removed fromci.toml.Behaviour kept step for step:
extract-artifactbuild/*.zipintobuild/, delete the archivessetup-boufgh release download v0.6.6 -R obsproject/bouf, both SHA-256 pins, extract intobouf/binandbouf/nsis(the directory the oldEnsure-Location boufset)install-nsiswinget install … --id NSIS.NSISsetup-cnggh release download cng-v1.1 -R GoogleCloudPlatform/kms-integrations -p *amd64.zipintogcng/, extract,openssl dgst -sha384 -verify cng-release-signing-key.pem, thenmsiexec /i … /qn /norestartinstall-rclonechoco install rclone --version=1.69.3download-previousrclone copy --transfers 100 :gcs:obs-latest/<arch>/<channel> .withold_builds/as the working directorysign-game-capturesigntool sign /fd sha256 /t http://timestamp.digicert.com /f repo/.github/actions/windows-signing/prod-gc.crt /csp "Google Cloud KMS Provider" /kc …/game-capture-release-sign-hsm/cryptoKeyVersions/1 <workspace>/build/core/win-capture/data/*.dllrun-boufbouf/bin/bouf.exe --config <action>/config_<arch>.toml --version … --branch … -i build -p old_builds -o output --packaging-onlysync-latestrclone sync --delete-excluded --transfers 100 <workspace>/old_builds :gcs:obs-latest/<arch>/<channel>upload-archiverclone copy --transfers 100 <workspace>/old_builds :gcs:obs-builds/<arch>Authenticate to Google Cloudstays auses:step;GH_TOKENand theRCLONE_*variables stay in the action'senv:(nothing re-implements an auth path).SIGNTOOLcan override the Windows SDKsigntool.exepath — that is how the test stubs it; the default is the same path the PowerShell used.Local evidence
uv run --no-project python -m unittest ci/test_windows_signing.py:Ran 21 tests ... OK(each subcommand's argv and exit status pinned against stubs onPATH; the action shape, theSet Up uvordering, thesave-cache/cache-suffixexpressions, and the absentci.tomlblock are pinned too)../lint --fix:== lane lint: ok (120.7s), no files rewritten.ci-lint precheck(pina1917ce7…), master baseline vs this branch: 407 → 387 approved exceptions, violations and needs_review unchanged at 5 / 10, and nowindows-signingfinding remains.Not verified: the Windows-only tools (
winget,msiexec,choco,signtool,rclone,gh) are stubbed in the unit test; the first real proof issign-windows.yamlin the nightly release. That is why this PR saysFixes #2816for the port itself and not for a signed build.