Skip to content

[SDKv2] Add 'build and test all SDKs' for v2.#747

Open
skottmckay wants to merge 1 commit into
mainfrom
skottmckay/AddOneShotV2BuildAndTest
Open

[SDKv2] Add 'build and test all SDKs' for v2.#747
skottmckay wants to merge 1 commit into
mainfrom
skottmckay/AddOneShotV2BuildAndTest

Conversation

@skottmckay
Copy link
Copy Markdown
Collaborator

Update build.py so that 'use-winml' is not sticky.
Add 'build and test all' one-shot script and dev doc for dependencies required before running.

Add 'build and test all' one-shot script and dev doc for dependencies required before running.
Copilot AI review requested due to automatic review settings May 30, 2026 06:09
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment May 30, 2026 6:09am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a developer-facing one-shot script and setup doc that build and test all sdk_v2 SDKs from a single invocation, plus a small fix to make the C++ --use_winml flag non-sticky across re-configures.

Changes:

  • sdk_v2/cpp/build.py now explicitly passes -DFOUNDRY_LOCAL_USE_WINML=OFF when --use_winml is absent, so the CMake cache no longer carries a stale ON from a previous configure.
  • New sdk_v2/build_and_test_all.ps1 orchestrator runs C++ → C# → Python → JS with -UseWinml, -Config, -Skip/-Only, -ContinueOnError, and -SkipCppTests switches, including an x64 Python probe and a temporary VSCMD-arch override around the Python step.
  • New sdk_v2/DEVELOPMENT.md documents prerequisites, per-SDK install/test commands, common knobs, and troubleshooting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
sdk_v2/cpp/build.py Explicitly emit -DFOUNDRY_LOCAL_USE_WINML=OFF when --use_winml not supplied.
sdk_v2/build_and_test_all.ps1 New PowerShell orchestrator for C++/C#/Python/JS build+test with WinML and skip/only knobs.
sdk_v2/DEVELOPMENT.md New developer setup doc covering prerequisites, per-SDK steps, knobs, and troubleshooting.

Comment on lines +75 to +88
$jsDir = Join-Path $sdkRoot 'js'

if ($UseWinml -and -not $IsWindows -and -not [System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform(
[System.Runtime.InteropServices.OSPlatform]::Windows)) {
throw "-UseWinml is Windows-only."
}

# Resolve which SDKs to run.
$all = @('cpp', 'cs', 'python', 'js')
if ($Only) {
$targets = $all | Where-Object { $_ -in $Only }
} else {
$targets = $all | Where-Object { $_ -notin $Skip }
}
Comment thread sdk_v2/DEVELOPMENT.md
| Python | 3.11–3.14, **64-bit** | Required by `build.py` and for the Python SDK. 32-bit Python will not work. |
| .NET SDK | 8.0 | C# tests target `net8.0` (and `net462` on Windows, which comes from .NET Framework Targeting Pack via VS). |
| Node.js | 20 LTS or newer | Brings `npm`. The JS SDK declares `"engines": { "node": ">=20" }`. |
| PowerShell | 7+ (`pwsh`) | The one-shot script and `samples/js/test-v2.ps1` are written for PowerShell 7. |
Comment thread sdk_v2/DEVELOPMENT.md
| CMake | 3.20 | Driven by `sdk_v2/cpp/build.py`; do not invoke `cmake --build` directly. |
| vcpkg | recent | Set `VCPKG_ROOT`, or use the copy bundled with Visual Studio (auto-detected). |
| Python | 3.11–3.14, **64-bit** | Required by `build.py` and for the Python SDK. 32-bit Python will not work. |
| .NET SDK | 8.0 | C# tests target `net8.0` (and `net462` on Windows, which comes from .NET Framework Targeting Pack via VS). |
Comment on lines +94 to +95
# .NET Configuration maps RelWithDebInfo/MinSizeRel -> Release.
$dotnetConfig = if ($Config -in @('Debug')) { 'Debug' } else { 'Release' }
Comment on lines +77 to +80
if ($UseWinml -and -not $IsWindows -and -not [System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform(
[System.Runtime.InteropServices.OSPlatform]::Windows)) {
throw "-UseWinml is Windows-only."
}
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.

3 participants