Skip to content

Studio CI: run the Resolve-CudaToolkit unit test in the Windows GGUF job - #5921

Merged
danielhanchen merged 1 commit into
mainfrom
studio-setup-ps1-ci
Jun 1, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-setup-ps1-ci

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Jun 1, 2026 •

Copy link
Copy Markdown
Member

Summary

#5912 moved the Windows CUDA Toolkit check off the prebuilt path into Resolve-CudaToolkit and added a pwsh unit test (tests/studio/test_resolve_cuda_toolkit.ps1), but nothing ran that test. This wires it into CI without adding a new workflow.

Instead of a standalone workflow, the test is folded into the existing Windows Studio GGUF CI job as a fast, GPU-free gate that runs right after checkout, before the heavy GGUF smoke, on the runner that is already spun up. A setup.ps1 regression now fails fast.

What it does

In studio-windows-inference-smoke.yml, the openai-anthropic job gains one early step that:

  1. Parses setup.ps1 for syntax errors (catches brace and scope mistakes the refactor is prone to).
  2. Runs test_resolve_cuda_toolkit.ps1, which AST-extracts the real Resolve-CudaToolkit and asserts:
    • prebuilt path with a too-new toolkit defers (no exit, no winget),
    • a forced source build still fails fast with the preserved error text,
    • a compatible toolkit resolves and publishes the env vars.

No new workflow file; the step reuses the existing windows-latest runner.

Validation

Ran the test locally with pwsh 7.6: all 5 scenarios pass, exit 0.

Refs #5912.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

The deferred Windows CUDA Toolkit check (Resolve-CudaToolkit in setup.ps1) has a
pwsh unit test but nothing ran it. Rather than add a separate workflow, fold a
fast GPU-free gate into the existing Windows GGUF CI: parse setup.ps1 and run
tests/studio/test_resolve_cuda_toolkit.ps1 right after checkout, before the heavy
GGUF smoke, so a setup.ps1 regression fails fast on the runner that is already
spun up.

Refs #5912.
@danielhanchen
danielhanchen force-pushed the studio-setup-ps1-ci branch from 14bb2fb to 8697f9a Compare June 1, 2026 12:59
@danielhanchen danielhanchen changed the title Studio CI: run the Resolve-CudaToolkit unit test on setup.ps1 changes Studio CI: run the Resolve-CudaToolkit unit test in the Windows GGUF job Jun 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8697f9ab5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

(Resolve-Path studio/setup.ps1).Path, [ref]$null, [ref]$errs)
if ($errs) { $errs | ForEach-Object { $_.ToString() }; exit 1 }
Write-Host "setup.ps1 parsed with no errors"
pwsh -NoProfile -File tests/studio/test_resolve_cuda_toolkit.ps1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the PowerShell test in PR path filters

This new step invokes tests/studio/test_resolve_cuda_toolkit.ps1, but the workflow's pull_request.paths list above only includes studio/**, unsloth/**, unsloth_cli/**, install.ps1, pyproject.toml, and this workflow file. A PR that changes only this PowerShell test will not trigger the workflow, so the newly referenced test can be broken or stale without CI exercising it; add the test path (or tests/studio/**) to the trigger list.

Useful? React with 👍 / 👎.

@danielhanchen
danielhanchen merged commit ef43b5f into main Jun 1, 2026
10 checks passed
@danielhanchen
danielhanchen deleted the studio-setup-ps1-ci branch June 1, 2026 13:36
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