From 4d569e3c55c3b419a65857686c1c744783fc2bef Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 10:01:26 -0400 Subject: [PATCH 1/8] Preinstall visual studio on arm64 --- .../v2/templates/stages-build-native.yml | 2 + .../v2/templates/steps-build-windows.yml | 57 ------------------- 2 files changed, 2 insertions(+), 57 deletions(-) diff --git a/.pipelines/v2/templates/stages-build-native.yml b/.pipelines/v2/templates/stages-build-native.yml index a38852868..7da2c5113 100644 --- a/.pipelines/v2/templates/stages-build-native.yml +++ b/.pipelines/v2/templates/stages-build-native.yml @@ -67,6 +67,8 @@ stages: - job: build pool: name: onnxruntime-native-arm64-16core + demands: + - ImageOverride -equals onnxruntime-Win2025-NVMe-arm64 os: windows hostArchitecture: arm64 templateContext: diff --git a/.pipelines/v2/templates/steps-build-windows.yml b/.pipelines/v2/templates/steps-build-windows.yml index 296801e55..5c4c994b6 100644 --- a/.pipelines/v2/templates/steps-build-windows.yml +++ b/.pipelines/v2/templates/steps-build-windows.yml @@ -68,63 +68,6 @@ steps: shell: pwsh usePwsh: ${{ parameters.usePwsh }} -- ${{ if eq(parameters.arch, 'arm64') }}: - - task: PowerShell@2 - displayName: 'Ensure Visual Studio Build Tools and CMake for ARM64' - inputs: - targetType: inline - pwsh: ${{ parameters.usePwsh }} - script: | - $installRoot = 'C:\BuildTools' - $vcvars = Join-Path $installRoot 'VC\Auxiliary\Build\vcvarsall.bat' - $cmakeDir = Join-Path $installRoot 'Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' - $cmakePath = Join-Path $cmakeDir 'cmake.exe' - $ctestPath = Join-Path $cmakeDir 'ctest.exe' - - if (-not (Test-Path $vcvars) -or -not (Test-Path $cmakePath) -or -not (Test-Path $ctestPath)) { - Write-Host 'Visual Studio Build Tools not fully present. Installing...' - $bootstrapper = Join-Path $env:TEMP 'vs_BuildTools.exe' - Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_BuildTools.exe' -OutFile $bootstrapper -UseBasicParsing - - $arguments = @( - '--quiet', - '--wait', - '--norestart', - '--nocache', - '--installPath', $installRoot, - '--add', 'Microsoft.VisualStudio.Workload.VCTools', - '--add', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64', - '--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', - '--add', 'Microsoft.VisualStudio.Component.VC.CMake.Project', - '--add', 'Microsoft.VisualStudio.Component.Windows11SDK.22621', - '--includeRecommended' - ) - - $process = Start-Process -FilePath $bootstrapper -ArgumentList $arguments -Wait -PassThru - if ($process.ExitCode -ne 0) { - throw "Visual Studio Build Tools install failed with exit code $($process.ExitCode)." - } - } - - if (-not (Test-Path $vcvars)) { - throw "vcvarsall.bat was not found at $vcvars after Build Tools install." - } - if (-not (Test-Path $cmakePath)) { - throw "cmake.exe was not found at $cmakePath after Build Tools install." - } - if (-not (Test-Path $ctestPath)) { - throw "ctest.exe was not found at $ctestPath after Build Tools install." - } - - Write-Host "##vso[task.prependpath]$cmakeDir" - Write-Host "vcvarsall.bat: $vcvars" - Write-Host "cmake.exe: $cmakePath" - Write-Host "ctest.exe: $ctestPath" - Write-Host "##vso[task.setvariable variable=vcvarsAllPath]$vcvars" - Write-Host "##vso[task.setvariable variable=cmakePath]$cmakePath" - Write-Host "##vso[task.setvariable variable=ctestPath]$ctestPath" - - # Bake the pipeline-computed version into the binary so FoundryLocalGetVersionString() # matches the .nupkg version (e.g. 0.1.0-dev.202605111234) instead of the cmake default. - task: PowerShell@2 From 1b628c9f32b9e2c533128eac6d18585120c94c9b Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 10:36:16 -0400 Subject: [PATCH 2/8] Update --- .pipelines/v2/templates/steps-build-windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pipelines/v2/templates/steps-build-windows.yml b/.pipelines/v2/templates/steps-build-windows.yml index 5c4c994b6..216eb011c 100644 --- a/.pipelines/v2/templates/steps-build-windows.yml +++ b/.pipelines/v2/templates/steps-build-windows.yml @@ -105,7 +105,6 @@ steps: - ${{ if eq(parameters.arch, 'arm64') }}: - script: >- - call "$(vcvarsAllPath)" arm64 && python build.py --configure --build --arm64 --config ${{ parameters.buildConfig }} From 1ce3492e0e26bb7870991ef2074fd2a7264b3a86 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 14:20:55 -0400 Subject: [PATCH 3/8] Update --- .pipelines/v2/templates/stages-build-native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/v2/templates/stages-build-native.yml b/.pipelines/v2/templates/stages-build-native.yml index 7da2c5113..da07076c3 100644 --- a/.pipelines/v2/templates/stages-build-native.yml +++ b/.pipelines/v2/templates/stages-build-native.yml @@ -68,7 +68,7 @@ stages: pool: name: onnxruntime-native-arm64-16core demands: - - ImageOverride -equals onnxruntime-Win2025-NVMe-arm64 + - ImageOverride -equals onnxruntime-Win2025-arm64 os: windows hostArchitecture: arm64 templateContext: From c1014e8088781179ea9b4346b42f1944e478547e Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 14:48:52 -0400 Subject: [PATCH 4/8] CMake --- .pipelines/v2/templates/steps-build-windows.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.pipelines/v2/templates/steps-build-windows.yml b/.pipelines/v2/templates/steps-build-windows.yml index 216eb011c..8b4b45dfd 100644 --- a/.pipelines/v2/templates/steps-build-windows.yml +++ b/.pipelines/v2/templates/steps-build-windows.yml @@ -110,8 +110,6 @@ steps: --config ${{ parameters.buildConfig }} --cmake_generator "Visual Studio 17 2022" --winml_sdk_version ${{ parameters.winmlVersion }} - --cmake_path "$(cmakePath)" - --ctest_path "$(ctestPath)" --cmake_extra_defines $(cmakeFetchDefines) displayName: 'Configure and build (arm64)' workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp From c55b0a469f8f71a3ba68ccb28e0189011dcaeb50 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 15:41:50 -0400 Subject: [PATCH 5/8] CMake tests --- .../v2/templates/steps-build-windows.yml | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/.pipelines/v2/templates/steps-build-windows.yml b/.pipelines/v2/templates/steps-build-windows.yml index 8b4b45dfd..7290fec19 100644 --- a/.pipelines/v2/templates/steps-build-windows.yml +++ b/.pipelines/v2/templates/steps-build-windows.yml @@ -118,26 +118,12 @@ steps: PKG_CONFIG: $(Build.BinariesDirectory)\tools\pkg-config.bat - ${{ if eq(parameters.runTests, true) }}: - - ${{ if eq(parameters.arch, 'x64') }}: - - script: python build.py --test --config ${{ parameters.buildConfig }} - displayName: 'Run tests' - workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp - env: - VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg - FOUNDRY_TEST_DATA_DIR: $(Agent.BuildDirectory)\test-data-shared - - - ${{ if eq(parameters.arch, 'arm64') }}: - - script: >- - python build.py - --test - --config ${{ parameters.buildConfig }} - --cmake_path "$(cmakePath)" - --ctest_path "$(ctestPath)" - displayName: 'Run tests' - workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp - env: - VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg - FOUNDRY_TEST_DATA_DIR: $(Agent.BuildDirectory)\test-data-shared + - script: python build.py --test --config ${{ parameters.buildConfig }} + displayName: 'Run tests' + workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp + env: + VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg + FOUNDRY_TEST_DATA_DIR: $(Agent.BuildDirectory)\test-data-shared # Stage the native build artifacts. The C++ SDK bundle consumes the co-located # ORT/GenAI DLLs directly. Python wheel staging filters them out because its From dcc21245a81cec03cd932383a60ab4f17370f761 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 20 Aug 2026 09:50:41 -0400 Subject: [PATCH 6/8] pwsh --- .pipelines/v2/templates/stages-build-native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/v2/templates/stages-build-native.yml b/.pipelines/v2/templates/stages-build-native.yml index da07076c3..f7c3d7cd7 100644 --- a/.pipelines/v2/templates/stages-build-native.yml +++ b/.pipelines/v2/templates/stages-build-native.yml @@ -91,7 +91,7 @@ stages: runTests: true stageHeaders: false pythonArchitecture: arm64 - usePwsh: false + usePwsh: true # ==================================================================== # Linux x64 — build + test From c8c3c12eb7fc2ec667982b68aa6200205df55bc3 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 20 Aug 2026 22:36:04 -0400 Subject: [PATCH 7/8] Some cleanup --- .../templates/fetch-test-data-from-blob.yml | 46 ------------------- .../v2/templates/stages-build-native.yml | 1 - .pipelines/v2/templates/stages-cs.yml | 4 -- .pipelines/v2/templates/stages-js.yml | 2 - .pipelines/v2/templates/stages-python.yml | 2 - .../v2/templates/steps-build-windows.yml | 10 +--- .../v2/templates/steps-prefetch-nuget.yml | 8 +--- .pipelines/v2/templates/steps-test-cs.yml | 18 +++----- .pipelines/v2/templates/steps-test-js.yml | 12 ++--- .pipelines/v2/templates/steps-test-python.yml | 12 ++--- 10 files changed, 19 insertions(+), 96 deletions(-) diff --git a/.pipelines/templates/fetch-test-data-from-blob.yml b/.pipelines/templates/fetch-test-data-from-blob.yml index aa2b33684..11550fbb7 100644 --- a/.pipelines/templates/fetch-test-data-from-blob.yml +++ b/.pipelines/templates/fetch-test-data-from-blob.yml @@ -9,54 +9,8 @@ parameters: type: string default: pscore values: ['pscore', 'ps'] -- name: installAzCli - type: boolean - default: false steps: -- ${{ if eq(parameters.installAzCli, true) }}: - - task: PowerShell@2 - displayName: 'Ensure Azure CLI is installed (Windows)' - condition: eq(variables['Agent.OS'], 'Windows_NT') - inputs: - targetType: inline - pwsh: false - script: | - $ErrorActionPreference = 'Stop' - - if (Get-Command az -ErrorAction SilentlyContinue) { - $azDir = Split-Path -Path (Get-Command az).Source -Parent - Write-Host "##vso[task.prependpath]$azDir" - az --version | Select-Object -First 1 | Write-Host - Write-Host 'Azure CLI already installed.' - exit 0 - } - - try { - $installerPath = Join-Path $env:TEMP 'azure-cli-installer.msi' - $installerUrl = 'https://aka.ms/installazurecliwindows' - - Write-Host "Downloading Azure CLI installer from $installerUrl" - Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath -UseBasicParsing - - Write-Host 'Installing Azure CLI via MSI...' - $process = Start-Process -FilePath 'msiexec.exe' -ArgumentList "/i `"$installerPath`" /qn /norestart" -Wait -PassThru - if ($process.ExitCode -ne 0) { - throw "Azure CLI MSI install failed with exit code $($process.ExitCode)." - } - } - catch { - throw "Azure CLI install failed: $($_.Exception.Message)" - } - - $env:PATH = [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'User') - $azCommand = Get-Command az -ErrorAction SilentlyContinue - if (-not $azCommand) { - throw 'Azure CLI install was attempted but az is still not on PATH.' - } - Write-Host "##vso[task.prependpath]$(Split-Path -Path $azCommand.Source -Parent)" - az version | Write-Host - - task: AzureCLI@2 displayName: 'Fetch test data from blob' inputs: diff --git a/.pipelines/v2/templates/stages-build-native.yml b/.pipelines/v2/templates/stages-build-native.yml index f7c3d7cd7..788209935 100644 --- a/.pipelines/v2/templates/stages-build-native.yml +++ b/.pipelines/v2/templates/stages-build-native.yml @@ -91,7 +91,6 @@ stages: runTests: true stageHeaders: false pythonArchitecture: arm64 - usePwsh: true # ==================================================================== # Linux x64 — build + test diff --git a/.pipelines/v2/templates/stages-cs.yml b/.pipelines/v2/templates/stages-cs.yml index 82f9c4fbd..4afde2322 100644 --- a/.pipelines/v2/templates/stages-cs.yml +++ b/.pipelines/v2/templates/stages-cs.yml @@ -70,12 +70,10 @@ stages: - template: ../../templates/fetch-test-data-from-blob.yml@self parameters: scriptType: ps - installAzCli: true - template: steps-test-cs.yml parameters: flNugetDir: '$(Pipeline.Workspace)/cpp-nuget' testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared' - usePwsh: false - stage: cs_test_win_arm64 displayName: 'C# SDK: Test Windows ARM64' @@ -101,12 +99,10 @@ stages: - template: ../../templates/fetch-test-data-from-blob.yml@self parameters: scriptType: ps - installAzCli: true - template: steps-test-cs.yml parameters: flNugetDir: '$(Pipeline.Workspace)/cpp-nuget' testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared' - usePwsh: false # ==================================================================== # Test — Linux x64 diff --git a/.pipelines/v2/templates/stages-js.yml b/.pipelines/v2/templates/stages-js.yml index 159e49d8b..41030205c 100644 --- a/.pipelines/v2/templates/stages-js.yml +++ b/.pipelines/v2/templates/stages-js.yml @@ -236,13 +236,11 @@ stages: - template: ../../templates/fetch-test-data-from-blob.yml@self parameters: scriptType: ps - installAzCli: true - template: steps-test-js.yml parameters: rid: 'win-arm64' prebuildArtifactDir: '$(Pipeline.Workspace)/js-prebuild-win-arm64' testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared' - usePwsh: false - stage: js_test_linux_x64 displayName: 'JS SDK: Test Linux x64' diff --git a/.pipelines/v2/templates/stages-python.yml b/.pipelines/v2/templates/stages-python.yml index 075f6ecce..70587d060 100644 --- a/.pipelines/v2/templates/stages-python.yml +++ b/.pipelines/v2/templates/stages-python.yml @@ -227,13 +227,11 @@ stages: - template: ../../templates/fetch-test-data-from-blob.yml@self parameters: scriptType: ps - installAzCli: true - template: steps-test-python.yml parameters: wheelDir: '$(Pipeline.Workspace)/python-sdk-win-arm64' testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared' pythonArchitecture: 'arm64' - usePwsh: false - stage: python_test_linux_x64 displayName: 'Python SDK: Test Linux x64' diff --git a/.pipelines/v2/templates/steps-build-windows.yml b/.pipelines/v2/templates/steps-build-windows.yml index 7290fec19..ab5967d7e 100644 --- a/.pipelines/v2/templates/steps-build-windows.yml +++ b/.pipelines/v2/templates/steps-build-windows.yml @@ -13,7 +13,6 @@ # runTests – Whether to run tests # stageHeaders – Whether to stage public headers as a separate artifact # pythonArchitecture – Python architecture installed by UsePythonVersion -# usePwsh – Whether PowerShell tasks should use PowerShell Core parameters: - name: arch @@ -37,9 +36,6 @@ parameters: type: string default: 'x64' values: ['x64', 'arm64'] -- name: usePwsh - type: boolean - default: true steps: @@ -66,7 +62,6 @@ steps: winmlVersion: ${{ parameters.winmlVersion }} includeWinml: true shell: pwsh - usePwsh: ${{ parameters.usePwsh }} # Bake the pipeline-computed version into the binary so FoundryLocalGetVersionString() # matches the .nupkg version (e.g. 0.1.0-dev.202605111234) instead of the cmake default. @@ -74,7 +69,7 @@ steps: displayName: 'Append version define' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $version = (Get-Content "$(Pipeline.Workspace)/version-info/sdkVersion.txt" -Raw).Trim() $defines = '$(cmakeFetchDefines)' + " `"FOUNDRY_LOCAL_VERSION_STRING=$version`"" @@ -87,7 +82,6 @@ steps: parameters: destinationPath: '$(Agent.BuildDirectory)/test-data-shared' scriptType: ps - installAzCli: true - ${{ if eq(parameters.arch, 'x64') }}: - script: >- @@ -132,7 +126,7 @@ steps: displayName: 'Stage native artifacts' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $binDir = '$(Build.SourcesDirectory)/sdk_v2/cpp/build/Windows/${{ parameters.buildConfig }}/bin/${{ parameters.buildConfig }}' $linkDir = '$(Build.SourcesDirectory)/sdk_v2/cpp/build/Windows/${{ parameters.buildConfig }}/${{ parameters.buildConfig }}' diff --git a/.pipelines/v2/templates/steps-prefetch-nuget.yml b/.pipelines/v2/templates/steps-prefetch-nuget.yml index ff619d330..2d827ff86 100644 --- a/.pipelines/v2/templates/steps-prefetch-nuget.yml +++ b/.pipelines/v2/templates/steps-prefetch-nuget.yml @@ -10,7 +10,6 @@ # winmlVersion – Microsoft.Windows.AI.MachineLearning version (Windows only) # includeWinml – Download WinML and emit WINML_EP_CATALOG_FETCH_URL # shell – 'pwsh' (Windows/macOS) or 'bash' (Linux) -# usePwsh – Whether PowerShell tasks should use PowerShell Core parameters: - name: ortVersion @@ -26,9 +25,6 @@ parameters: - name: shell type: string values: ['pwsh', 'bash'] -- name: usePwsh - type: boolean - default: true steps: @@ -38,7 +34,7 @@ steps: displayName: 'Validate pinned versions match deps_versions.json' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $ErrorActionPreference = 'Stop' $depsFile = Join-Path "$(Build.SourcesDirectory)" "sdk_v2/deps_versions.json" @@ -70,7 +66,7 @@ steps: displayName: 'Pre-download NuGet packages' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $ErrorActionPreference = 'Stop' $cacheDir = "$(Build.BinariesDirectory)/nuget_packages" diff --git a/.pipelines/v2/templates/steps-test-cs.yml b/.pipelines/v2/templates/steps-test-cs.yml index e347cb637..0b088014a 100644 --- a/.pipelines/v2/templates/steps-test-cs.yml +++ b/.pipelines/v2/templates/steps-test-cs.yml @@ -15,10 +15,6 @@ parameters: type: string default: '' displayName: 'Optional extra dotnet test arguments' -- name: usePwsh - type: boolean - default: true - displayName: 'Use PowerShell Core (pwsh) for PowerShell tasks' steps: @@ -45,7 +41,7 @@ steps: condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['Agent.OSArchitecture'], 'ARM64')) inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $ErrorActionPreference = 'Stop' $url = 'https://aka.ms/vs/17/release/vc_redist.arm64.exe' @@ -83,7 +79,7 @@ steps: displayName: 'Set package version' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $v = (Get-Content "$(Pipeline.Workspace)/version-info/sdkVersion.txt" -Raw).Trim() Write-Host "Package version: $v" @@ -93,7 +89,7 @@ steps: displayName: 'Create NuGet.config with local Foundry Local Runtime feed' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $pkgPattern = 'Microsoft.AI.Foundry.Local.Runtime*.nupkg' $nupkg = Get-ChildItem "${{ parameters.flNugetDir }}" -Recurse -Filter $pkgPattern | @@ -127,7 +123,7 @@ steps: displayName: 'Set isolated NuGet packages path' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $buildDir = "$(Build.BinariesDirectory)/nuget-isolated-$(System.JobId)" if (Test-Path $buildDir) { @@ -148,7 +144,7 @@ steps: displayName: 'Restore & build tests' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $proj = "$(Build.SourcesDirectory)/sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj" $rid = dotnet msbuild $proj -getProperty:NETCoreSdkRuntimeIdentifier @@ -173,7 +169,7 @@ steps: displayName: 'Purge stale native redirect files' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | # Defense in depth: in CI we resolve foundry_local exclusively via the # Microsoft.AI.Foundry.Local.Runtime NuGet package (runtimes//native/). @@ -193,7 +189,7 @@ steps: displayName: 'Run SDK tests' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $proj = "$(Build.SourcesDirectory)/sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj" diff --git a/.pipelines/v2/templates/steps-test-js.yml b/.pipelines/v2/templates/steps-test-js.yml index 82f8e71a2..d75c22fa0 100644 --- a/.pipelines/v2/templates/steps-test-js.yml +++ b/.pipelines/v2/templates/steps-test-js.yml @@ -15,10 +15,6 @@ parameters: - name: testDataSharedDir type: string displayName: 'Path to the model cache directory used by tests' -- name: usePwsh - type: boolean - default: true - displayName: 'Use PowerShell Core (pwsh) for Windows PowerShell tasks' steps: @@ -32,7 +28,7 @@ steps: displayName: 'Drop prebuild into sdk_v2/js/prebuilds' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $src = "${{ parameters.prebuildArtifactDir }}/prebuilds" $dst = "$(Build.SourcesDirectory)/sdk_v2/js/prebuilds" @@ -60,7 +56,7 @@ steps: condition: and(succeeded(), eq('${{ parameters.rid }}', 'win-arm64')) inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $ErrorActionPreference = 'Stop' $url = 'https://aka.ms/vs/17/release/vc_redist.arm64.exe' @@ -105,7 +101,7 @@ steps: displayName: 'Build TypeScript' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | Set-Location "$(Build.SourcesDirectory)/sdk_v2/js" npm run build:ts @@ -115,7 +111,7 @@ steps: displayName: 'Run vitest' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | Set-Location "$(Build.SourcesDirectory)/sdk_v2/js" Write-Host "FOUNDRY_TEST_DATA_DIR=$env:FOUNDRY_TEST_DATA_DIR" diff --git a/.pipelines/v2/templates/steps-test-python.yml b/.pipelines/v2/templates/steps-test-python.yml index 1127a011a..96f4bbf73 100644 --- a/.pipelines/v2/templates/steps-test-python.yml +++ b/.pipelines/v2/templates/steps-test-python.yml @@ -17,10 +17,6 @@ parameters: default: 'x64' values: ['x64', 'arm64'] displayName: 'Architecture of the host Python interpreter (matches the agent OS arch).' -- name: usePwsh - type: boolean - default: true - displayName: 'Use PowerShell Core (pwsh). Set false to use Windows PowerShell.' - name: useSystemPython type: boolean default: false @@ -60,7 +56,7 @@ steps: condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['Agent.OSArchitecture'], 'ARM64')) inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $ErrorActionPreference = 'Stop' $url = 'https://aka.ms/vs/17/release/vc_redist.arm64.exe' @@ -99,7 +95,7 @@ steps: displayName: 'Create test venv' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | $venvDir = "$(Agent.TempDirectory)/fl-py-venv-$(System.JobId)" if (Test-Path $venvDir) { Remove-Item -Recurse -Force $venvDir } @@ -118,7 +114,7 @@ steps: displayName: 'Install built wheel + test deps' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | # Locate the wheel. Each job's wheel lands in its own artifact, so a # single match is expected. @@ -146,7 +142,7 @@ steps: displayName: 'Run SDK tests' inputs: targetType: inline - pwsh: ${{ parameters.usePwsh }} + pwsh: true script: | Push-Location "$(Build.SourcesDirectory)/sdk_v2/python" try { From 6d734993341d7bc37846c01e4942c74f56e72ec9 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 21 Aug 2026 10:50:11 -0400 Subject: [PATCH 8/8] Image updates --- .pipelines/v2/templates/stages-cs.yml | 2 ++ .pipelines/v2/templates/stages-js.yml | 4 ++++ .pipelines/v2/templates/stages-python.yml | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/.pipelines/v2/templates/stages-cs.yml b/.pipelines/v2/templates/stages-cs.yml index 4afde2322..888087e41 100644 --- a/.pipelines/v2/templates/stages-cs.yml +++ b/.pipelines/v2/templates/stages-cs.yml @@ -83,6 +83,8 @@ stages: - job: test pool: name: onnxruntime-native-arm64-16core + demands: + - ImageOverride -equals onnxruntime-Win2025-arm64 os: windows hostArchitecture: arm64 templateContext: diff --git a/.pipelines/v2/templates/stages-js.yml b/.pipelines/v2/templates/stages-js.yml index 41030205c..ebc1ba0c8 100644 --- a/.pipelines/v2/templates/stages-js.yml +++ b/.pipelines/v2/templates/stages-js.yml @@ -62,6 +62,8 @@ stages: - job: build pool: name: onnxruntime-native-arm64-16core + demands: + - ImageOverride -equals onnxruntime-Win2025-arm64 os: windows hostArchitecture: arm64 variables: @@ -223,6 +225,8 @@ stages: - job: test pool: name: onnxruntime-native-arm64-16core + demands: + - ImageOverride -equals onnxruntime-Win2025-arm64 os: windows hostArchitecture: arm64 templateContext: diff --git a/.pipelines/v2/templates/stages-python.yml b/.pipelines/v2/templates/stages-python.yml index 70587d060..98cc93d6b 100644 --- a/.pipelines/v2/templates/stages-python.yml +++ b/.pipelines/v2/templates/stages-python.yml @@ -56,6 +56,8 @@ stages: - job: build pool: name: onnxruntime-native-arm64-16core + demands: + - ImageOverride -equals onnxruntime-Win2025-arm64 os: windows hostArchitecture: arm64 templateContext: @@ -214,6 +216,8 @@ stages: - job: test pool: name: onnxruntime-native-arm64-16core + demands: + - ImageOverride -equals onnxruntime-Win2025-arm64 os: windows hostArchitecture: arm64 templateContext: