Skip to content

CI: run scripts/test-native-stderr.tests.ps1 under PowerShell 5.1 and 7 - #279

Open
sombraSoft wants to merge 1 commit into
ivall:mainfrom
sombraSoft:ci/script-tests
Open

sombraSoft wants to merge 1 commit into
ivall:mainfrom
sombraSoft:ci/script-tests

Conversation

@sombraSoft

@sombraSoft sombraSoft commented Nov 23, 2026 •

Copy link
Copy Markdown

CI never runs scripts/test-native-stderr.tests.ps1, the test that checks scripts/test.ps1 survives a native Cargo writing to stderr (which Windows PowerShell 5.1 treats as an error once it is redirected). A new scripts job runs it on every push and pull request, under both powershell (5.1) and pwsh, without a Rust build (~16 s).

Part of #265

What is in it

  • .github/workflows/ci.yml: a new scripts job (windows-2025, 10-minute timeout) with two steps, shell: powershell and shell: pwsh, each running ./scripts/test-native-stderr.tests.ps1. The header comment lists the new check.

CI time

  • 0 wall time: the scripts job runs in parallel and takes 16 s, with no Rust build.

Tested

  • Local, Windows 11: pwsh -NoProfile -File scripts/test-native-stderr.tests.ps1 and powershell -NoProfile -ExecutionPolicy Bypass -File ... (5.1.26100) both exit 0. With one assertion changed to fail (not committed), both exit 1.
  • Fork run of the same commit: https://github.com/sombraSoft/xcl/actions/runs/45276467450. The scripts job passed (both steps) and Build and test (Windows, no GPU) passed.
  • Full suite on main (9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug: scripts/test.ps1 → 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same.

Regression run

  • Not needed: no crates/xcl/src change.

Not tested

  • The new job only gates merges if it is added to the required checks in branch protection.

AI use

  • Claude Code (Claude Sonnet 5.5) wrote the change; Claude Code (Claude Opus 5.5) reviewed it and wrote this description; I read the diff.

The test checks that scripts/test.ps1 survives a native Cargo writing to stderr, which Windows
PowerShell 5.1 treats as an error once it is redirected. Nothing ran it, so a change to
scripts/test.ps1 could break that on one shell and still pass CI.

A new `scripts` job runs it on windows-2025 under `powershell` (5.1) and `pwsh`, next to the
build job and without a Rust build. The test throws on a failed assertion, so a failure ends
the step with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant