Skip to content

ci(windows-signing): run the signing action steps from Python (GEN-005) - #2820

Merged
zackees merged 2 commits into
masterfrom
infra/2816-windows-signing-python
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2816-windows-signing-python

Conversation

@zackees

@zackees zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member

What

.github/actions/windows-signing/action.yaml was ten multi-line PowerShell run: blocks (plus the three *.ps1 helpers only this action sourced). Every step is now one call into ci/windows_signing.py, which opens with a pinned Set Up uv step.

Fixes #2816.

RED

60eefe007 — ci/test_windows_signing.py only (340 lines). On origin/master it fails: the module does not exist, the action is still PowerShell, and ci.toml still 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 .ps1 files deleted, and the path's four GEN-005 [[exceptions]] blocks removed from ci.toml.

Behaviour kept step for step:

step Python subcommand argv / effect
Extract Artifact extract-artifact extract every build/*.zip into build/, delete the archives
Setup bouf setup-bouf gh release download v0.6.6 -R obsproject/bouf, both SHA-256 pins, extract into bouf/bin and bouf/nsis (the directory the old Ensure-Location bouf set)
Install NSIS install-nsis the same winget install … --id NSIS.NSIS
Setup Google CNG Provider setup-cng gh release download cng-v1.1 -R GoogleCloudPlatform/kms-integrations -p *amd64.zip into gcng/, extract, openssl dgst -sha384 -verify cng-release-signing-key.pem, then msiexec /i … /qn /norestart
Install rclone install-rclone the same choco install rclone --version=1.69.3
Download Previous Build download-previous rclone copy --transfers 100 :gcs:obs-latest/<arch>/<channel> . with old_builds/ as the working directory
Sign Game Capture sign-game-capture the same signtool 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/*.dll
Run bouf run-bouf bouf/bin/bouf.exe --config <action>/config_<arch>.toml --version … --branch … -i build -p old_builds -o output --packaging-only
Sync Latest Build sync-latest rclone sync --delete-excluded --transfers 100 <workspace>/old_builds :gcs:obs-latest/<arch>/<channel>
Upload Build to Archive upload-archive rclone copy --transfers 100 <workspace>/old_builds :gcs:obs-builds/<arch>

Authenticate to Google Cloud stays a uses: step; GH_TOKEN and the RCLONE_* variables stay in the action's env: (nothing re-implements an auth path). SIGNTOOL can override the Windows SDK signtool.exe path — 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 on PATH; the action shape, the Set Up uv ordering, the save-cache/cache-suffix expressions, and the absent ci.toml block are pinned too).
  • ./lint --fix: == lane lint: ok (120.7s), no files rewritten.
  • ci-lint precheck (pin a1917ce7…), master baseline vs this branch: 407 → 387 approved exceptions, violations and needs_review unchanged at 5 / 10, and no windows-signing finding remains.

Not verified: the Windows-only tools (winget, msiexec, choco, signtool, rclone, gh) are stubbed in the unit test; the first real proof is sign-windows.yaml in the nightly release. That is why this PR says Fixes #2816 for the port itself and not for a signed build.

@zackees
zackees marked this pull request as ready for review October 28, 2026 15:35
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 28, 2026
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
@zackees
zackees force-pushed the infra/2816-windows-signing-python branch from c05a716 to 8a29ef9 Compare October 28, 2026 15:42
@zackees
zackees enabled auto-merge October 28, 2026 15:42
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Coordinator: rebased onto 967414b1d and resolved the one conflict in ci.toml so the PR can re-enter CI.

The conflict was mechanical and expected: #2806 landed the windows-patches GEN-005 port on master while this branch was open, so master's ci.toml gained/deleted blocks in the same spot this PR deletes the four windows-signing ones. Resolution: master's windows-patches blocks kept verbatim, this PR's four windows-signing [[exceptions]] blocks removed — nothing else in ci.toml changed (git diff origin/master -- ci.toml is exactly those four entries).

Re-ran the affected offline set on the new tip before queueing: ci/test_ci_toml.py (45 OK), ci/test_windows_patches.py (18 OK), ci/test_windows_signing.py (21 OK), ci/test_uv_run.py (5 OK). Queued again; the merge group runs the full Linux suite.

@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator

PR #2820 is green (CI Gate ✅), marked ready, and queued to the merge queue.

What is in it: ci/windows_signing.py (10 subcommands), the action rewritten to one uv run --no-project --script line per step with the pinned Set Up uv first, the three now-unused .ps1 helpers deleted, and the path's four GEN-005 [[exceptions]] blocks removed (ci-lint precheck 407 → 387 approved exceptions on this branch, violations/needs_review unchanged).

Local checks: uv run --no-project python -m unittest ci/test_windows_signing.py → 21 tests OK; ./lint --fix → lane lint ok. ./unittest was still building its Tier 2 image in this checkout when the PR went green, so it is not part of the evidence above — the change touches no C/C++ or Rust, and Fast Gate ⚡ (which runs the ci/ Python tests) passed.

Merged via the queue into master with commit deac39e Oct 28, 2026
33 checks passed
@zackees
zackees deleted the infra/2816-windows-signing-python branch October 28, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

infra: port .github/actions/windows-signing to Python (GEN-005 sweep)

1 participant