CI: working Windows build workflow for self-hosted runner #7
Reference in New Issue
Block a user
Delete Branch "ci/windows-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a working Windows-only build pipeline for the self-hosted org runner (
windows-latest), and fixes the PyInstaller spec so the relay feature is bundled. Verified green end-to-end on the runner (macropad.exe, ~8.5 MB, uploaded as an artifact).The previous
.gitea/workflows/release.ymlis left as-is (fully commented/disabled); it targeted GitHub-hostedubuntu-latest/windows-latestand could not complete with only a self-hosted Windows runner.What's here
.gitea/workflows/build-windows.yml— runs entirely onwindows-latest:preflightjob: fast runner smoke-test (OS/PowerShell/Python) so a broken runner fails in seconds.build-windowsjob: provisions Python 3.11,pip install -e .+ PyInstaller, buildsdist/macropad.exe, uploads it as an artifact, and on av*tag creates/updates a Gitea release and attaches the exe via the Gitea API.macropad.spec— declarerelay_client+aiohttpas hidden imports (the relay client is imported lazily and was at risk of being dropped from the build); switch the EXE icon to a real.ico.Macro Pad.ico— multi-size (16–256px) icon generated fromMacro Pad.png.Runner-specific hardening (each fixed after observing a real run)
actions/setup-pythonhangs inside its Windows tool-cache install on self-hosted runners → replaced with a standalone CPython from nuget (no registry/PATH side effects, idempotent, cached inLOCALAPPDATA; honours a pre-installed 3.11 if present).pwsh→ all steps useshell: powershell, with TLS 1.2 forced for HTTPS and BOM-freeGITHUB_ENVwrites..icoon Windows → ship one.upload-artifact@v4needs a backend Gitea doesn't provide → pinned to@v3.How to release
Push a tag
vX.Y.Z→ the workflow builds and attachesmacropad.exeto a Gitea release for that tag. Manual builds: run the workflow via Actions → Build Windows → Run workflow (or the API dispatch).🤖 Generated with Claude Code