Files
Dario LipicarandClaude Opus 5 01b1f33789 ci(windows): Windows CI, running the lgx-cli doctest's exercise half on real Windows (#34)
* ci(windows): add the reusable Windows job

29 lines, 12 of them comment. Everything else -- the Nix install pinning, the
binary cache, the target-existence guard, the cold-cache refusal, the PE-format
and import-closure gates, the artifact hand-off and its round-trip check, and
the real-Windows execution -- lives once in logos-co/logos-nix.

The smoke paths carry the target prefix because the staged tree root holds one
directory per target: `stage/lgx/bin/lgx.exe`. There is no `stage/bin`.
Verified against this repo's real cross-built output, and the three commands
were run on a Windows 11 box with no toolchain installed before this was
written -- `--help` prints 988 bytes, `create` prints "Created package:
smoke.lgx", `verify` prints "Package structure is valid", so none of them needs
the `run -q` escape hatch for silent commands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci(windows): run the lgx-cli doctest's exercise half on real Windows

doctests/lgx-cli.test.yaml has 15 `run:` steps and exactly ONE of them invokes
nix. The other 14 only ever drive the built binary, so they are portable as-is
-- and the nix one needs no translation either, because `targets: lgx` in this
workflow already IS it. So the doc-tested packaging lifecycle now runs on a
real windows-latest runner without doctest.py, which cannot run there, having
to change at all.

.github/smoke/lgx-cli.sh is those 14 steps in order with their assertions
intact: create -> manifest -> add a variant -> verify -> extract -> merge two
single-variant packages -> verify the merge. 27 assertions.

Only one step needed a decision rather than a translation. The spec detects the
platform with `uname` and has no Windows arm, exiting 1 there. On this leg the
variant is not unknown -- we built FOR that target -- so it is stated rather
than probed: windows-x86_64 / dll, the names lgpm computes and nix-bundle-lgx
emits. A doctest detects; a smoke test asserts.

A committed file rather than an inline `smoke:` block, which needed
smoke-file support in the reusable workflow. The reasons are the two things
that just happened while writing it:

  * It is SHELLCHECK-CLEAN. An inline block cannot be -- actionlint replaces
    expression interpolations with a placeholder before linting.
  * It RUNS BY HAND against a native build, via the LGX override:
        LGX=lgx/bin/lgx bash .github/smoke/lgx-cli.sh
    from a directory holding lgx/bin/lgx. That is what caught the one real bug
    in it: written against master's lgx it asserted manifest schema 0.3.0, and
    this branch bumps it to 0.4.0. Re-running against THIS branch's own binary
    turned it red. Confirmed load-bearing by re-running the 0.3.0 version
    against the 0.4.0 binary: rc=1.

Four more controls, so the assertions are known to bite rather than assumed to:
a wrong expected string, a missing binary, a deleted payload file each exit
non-zero; the clean run exits 0.

Two things deliberately NOT asserted tightly, both flagged in the file:
`tar` is checked for up front (it is a runner-image fact, not a property of
this repo, and without the check `tar -tzf` fails midway with a message about
the archive); and the extract step matches `extracted` rather than
`./extracted`, because whether lgx.exe prints a `./` or a `.\` prefix on
Windows is not something anyone has measured.

* ci(windows): the reusable workflow moved to logos-co/logos-windows-ci

logos-nix is the fleet's nixpkgs/Qt pin and a flake input of ~36 repos, so the
CI harness now lives in its own repo and can move at its own rate. No behaviour
change here -- the @v1 this file used to name had never existed (logos-nix has
zero tags), so nothing was ever resolving it.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 10:51:50 -03:00
..
2026-06-16 15:57:24 -04:00