Build, test and release the Windows build in CI
- ci/windows-ci.sh is the one definition of every Windows step (toolchain, clippy, build, tests and UI self-test under Wine, packaging, test bundle); verify, release and next only call it. - release.yml: a windows job builds, tests and packages alkane-toolkit-vX.Y.Z-windows-x86_64.zip; the release job waits for it and attaches the zip next to the Linux tarball. next.yml does the same for -rc candidates, verify.yml runs the Windows gates on PRs. - windows-native.yml (advisory, never gates a release) runs main's cross-built unit tests and UI self-test on real Windows 11 through the self-hosted VM runner (label alkane-windows). - CI image: ci/images/alkane-ci.Dockerfile layers mingw-w64, Wine with a ready prefix, the rustup target and a prebuilt wxMSW prefix on the previously verified image; ci/images/build-image.sh pushes it and pins the digest. wx prefix/cache scripts take a linux|windows argument. - CI checks the wx-rs patch queue; versioning treats the GUI build script, Windows resources and assets as release-relevant; the workflow contract test covers the Windows gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+24
-7
@@ -29,8 +29,8 @@ def git(directory: Path, *args: str) -> str:
|
||||
|
||||
def check_workflow_contract() -> None:
|
||||
"""Keep the short workflow check from silently dropping release gates."""
|
||||
required = {
|
||||
"release.yml": ("main", "release", (
|
||||
required = [
|
||||
("release.yml", "main", "release", (
|
||||
"Check runner image pins", "Check first-party Rust formatting",
|
||||
"Clippy (our crate, warnings are errors)",
|
||||
"Build release", "Unit tests", "Microbenchmarks",
|
||||
@@ -39,19 +39,35 @@ def check_workflow_contract() -> None:
|
||||
"Record private benchmark history", "Create Gitea release + upload artifact",
|
||||
"Clean generated Toolkit build",
|
||||
)),
|
||||
"next.yml": ("next", "candidate", (
|
||||
("release.yml", "main", "windows", (
|
||||
"Clippy (Windows target, warnings are errors)", "Build release (Windows)",
|
||||
"Unit tests (Windows build, under Wine)",
|
||||
"Headless UI self-test (Windows build, under Wine)",
|
||||
"Package Windows artifact", "Clean generated Toolkit build",
|
||||
)),
|
||||
("next.yml", "next", "candidate", (
|
||||
"Check runner image pins", "Build release candidate",
|
||||
"Create private prerelease", "Clean generated Toolkit build",
|
||||
)),
|
||||
"verify.yml": ("main", "verify", (
|
||||
("next.yml", "next", "windows", (
|
||||
"Build Windows candidate", "Package Windows candidate",
|
||||
"Clean generated Toolkit build",
|
||||
)),
|
||||
("verify.yml", "main", "verify", (
|
||||
"Check runner image pins", "Detect changed surface",
|
||||
"Check CI change surface", "Check first-party Rust formatting",
|
||||
"Check workflow-only change",
|
||||
"Clippy (our crate, warnings are errors)", "Build", "Unit tests",
|
||||
"Microbenchmarks", "Headless UI self-test", "Clean generated Toolkit build",
|
||||
)),
|
||||
}
|
||||
for filename, (branch, job_name, gates) in required.items():
|
||||
("verify.yml", "main", "verify-windows", (
|
||||
"Clippy (Windows target, warnings are errors)", "Build (Windows)",
|
||||
"Unit tests (Windows build, under Wine)",
|
||||
"Headless UI self-test (Windows build, under Wine)",
|
||||
"Clean generated Toolkit build",
|
||||
)),
|
||||
]
|
||||
for filename, branch, job_name, gates in required:
|
||||
path = ROOT / ".gitea/workflows" / filename
|
||||
workflow = yaml.load(path.read_text(), Loader=yaml.BaseLoader)
|
||||
event = "pull_request" if filename == "verify.yml" else "push"
|
||||
@@ -66,7 +82,8 @@ def check_workflow_contract() -> None:
|
||||
for gate, position in zip(gates[:-1], positions[:-1]):
|
||||
condition = steps[position].get("if")
|
||||
if gate in {"Create Gitea release + upload artifact",
|
||||
"Create private prerelease"}:
|
||||
"Create private prerelease", "Package Windows artifact",
|
||||
"Build Windows candidate", "Package Windows candidate"}:
|
||||
assert condition is not None and "release == 'true'" in condition, path
|
||||
elif filename == "verify.yml" and gate in {
|
||||
"Build", "Unit tests", "Microbenchmarks",
|
||||
|
||||
Reference in New Issue
Block a user