Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
13c5bff
win arm64
Jul 16, 2026
08b2605
typo
Jul 16, 2026
d4389ad
copilot
Jul 16, 2026
36158ce
pwsh
Jul 16, 2026
5bb9f69
pwsh pwsh
Jul 16, 2026
e88f761
install azcli
Jul 16, 2026
77b794b
winget
Jul 16, 2026
fda0d31
installer
Jul 17, 2026
183576b
nit
Jul 21, 2026
ad8ac36
azpath
Jul 21, 2026
88dde39
azcopy
Jul 21, 2026
06aa132
cmake
Jul 21, 2026
c1e6d73
cmake
Jul 21, 2026
7cc2a73
cmake
Jul 21, 2026
1f97a38
ninja
Jul 22, 2026
9fa1cf4
ninja cmd
Jul 22, 2026
7ff72fa
type
Jul 22, 2026
b861198
pls
Jul 22, 2026
de9874a
restore
Jul 22, 2026
ddb74d2
pwsh
Jul 22, 2026
5842c63
simpl
Jul 22, 2026
86cb7b6
typo
Jul 23, 2026
8a52368
Revert "simpl"
Jul 23, 2026
a1c0d3e
Revert "restore"
Jul 23, 2026
3a2d82e
python
Jul 23, 2026
43ac875
typo
Jul 23, 2026
7b43ad3
nits
Jul 23, 2026
500e279
typo
Jul 23, 2026
2dd2e38
visual studio
Jul 23, 2026
6cf8667
python
Jul 23, 2026
b286860
fixes
Jul 24, 2026
d46eded
diagnose
Jul 24, 2026
c6878f5
vc
Jul 24, 2026
23a1700
formaT
Jul 24, 2026
a8631d4
c# tests fix
Jul 25, 2026
84943b1
arm64 expected transcription
Jul 25, 2026
b87155a
fix
Jul 25, 2026
93c59b3
audio robustness
Jul 26, 2026
5177943
restore
Jul 26, 2026
6f82c9f
restore restore
Jul 26, 2026
d7acf45
restore restore restore
Jul 26, 2026
3bb99f8
refactor
Jul 26, 2026
718f6c5
normalize bug fix
Jul 26, 2026
0b5e35e
nit
Jul 26, 2026
8518b2a
cleanup
Jul 26, 2026
3e01a0f
azcopy command
Jul 26, 2026
c9df1b3
broad
Jul 27, 2026
e4ec7d7
pls
Jul 27, 2026
c4286ae
final
Jul 27, 2026
c748186
Merge remote-tracking branch 'origin' into prathikrao/win-arm64-pipel…
Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 74 additions & 3 deletions .pipelines/templates/fetch-test-data-from-blob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,63 @@ parameters:
- name: destinationPath
type: string
default: '$(Build.SourcesDirectory)/test-data-shared'
- name: scriptType
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:
azureSubscription: 'ortcibuild_readonly_mi2-ONNX Runtime-AIFoundryLocal'
scriptType: pscore
scriptType: ${{ parameters.scriptType }}
scriptLocation: inlineScript
inlineScript: |
$ErrorActionPreference = 'Stop'
Expand All @@ -21,7 +71,8 @@ steps:
$container = 'models'
$prefix = 'foundrylocal/models'

if (-not (Get-Command azcopy -ErrorAction SilentlyContinue)) {
$azcopyCommand = Get-Command azcopy -ErrorAction SilentlyContinue
if (-not $azcopyCommand) {
if ($IsMacOS) {
Write-Host 'azcopy not found on macOS agent. Installing via Homebrew...'
if (-not (Get-Command brew -ErrorAction SilentlyContinue)) {
Expand All @@ -30,12 +81,32 @@ steps:

brew update --quiet
brew install --quiet azcopy
} elseif ($env:AGENT_OS -eq 'Windows_NT' -and $env:AGENT_OSARCHITECTURE -eq 'ARM64') {
Write-Host 'azcopy not found on Windows agent. Installing from official zip...'
$zipPath = Join-Path $env:TEMP 'azcopy_windows.zip'
$extractRoot = Join-Path $env:TEMP 'azcopy'
Invoke-WebRequest -Uri 'https://aka.ms/downloadazcopy-v10-windows' -OutFile $zipPath -UseBasicParsing
if (Test-Path $extractRoot) {
Remove-Item -Path $extractRoot -Recurse -Force
}
Expand-Archive -Path $zipPath -DestinationPath $extractRoot -Force
$azcopyExe = Get-ChildItem -Path $extractRoot -Filter 'azcopy.exe' -Recurse | Select-Object -First 1
if (-not $azcopyExe) {
throw 'azcopy install completed but azcopy.exe was not found.'
}
$env:PATH = "$($azcopyExe.Directory.FullName);$env:PATH"
} else {
throw 'azcopy is not installed on this agent.'
}

$azcopyCommand = Get-Command azcopy -ErrorAction SilentlyContinue
}

if (-not $azcopyCommand) {
throw 'azcopy is not available on PATH after installation/probe.'
}

azcopy --version
& $azcopyCommand.Source --version | Write-Host

New-Item -ItemType Directory -Path $destination -Force | Out-Null
$publisherRoot = Join-Path $destination 'Microsoft'
Expand Down
9 changes: 6 additions & 3 deletions .pipelines/v2/templates/stages-build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ stages:
stageHeaders: true

# ====================================================================
# Windows ARM64 — cross-compile only (no tests on x64 host)
# Windows ARM64 — build + test
# ====================================================================
- stage: cpp_build_win_arm64
displayName: 'C++ Native: Windows ARM64'
Expand All @@ -66,8 +66,9 @@ stages:
jobs:
- job: build
pool:
name: onnxruntime-Win-CPU-2022
name: onnxruntime-native-arm64-16core
os: windows
hostArchitecture: arm64
templateContext:
inputs:
- input: pipelineArtifact
Expand All @@ -85,8 +86,10 @@ stages:
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
runTests: false
runTests: true
stageHeaders: false
pythonArchitecture: arm64
usePwsh: false

# ====================================================================
# Linux x64 — build + test
Expand Down
35 changes: 35 additions & 0 deletions .pipelines/v2/templates/stages-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,45 @@ stages:
- checkout: self
clean: true
- 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'
dependsOn:
- cs_build
jobs:
- job: test
pool:
name: onnxruntime-native-arm64-16core
os: windows
hostArchitecture: arm64
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'version-info'
targetPath: '$(Pipeline.Workspace)/version-info'
- input: pipelineArtifact
artifactName: 'cpp-nuget'
targetPath: '$(Pipeline.Workspace)/cpp-nuget'
steps:
- checkout: self
clean: true
- 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
Expand Down
42 changes: 35 additions & 7 deletions .pipelines/v2/templates/stages-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
# * cpp_build_win_x64 (the cpp-native-include artifact, which is
# stage-headers-only on the win-x64 build)
#
# Tests run on the same platform as the build, except win-arm64 (no
# Windows-ARM64 pool; build-only, matching the C# + Python matrices).
# Tests run on the same platform as the build.

stages:

Expand Down Expand Up @@ -69,8 +68,9 @@ stages:
jobs:
- job: build
pool:
name: onnxruntime-Win-CPU-2022
name: onnxruntime-native-arm64-16core
os: windows
hostArchitecture: arm64
variables:
- group: FoundryLocal-ESRP-Signing
templateContext:
Expand All @@ -97,7 +97,6 @@ stages:
nativeArtifactDir: '$(Pipeline.Workspace)/cpp-native-win-arm64'
includeArtifactDir: '$(Pipeline.Workspace)/cpp-native-include'
outputDir: '$(Build.ArtifactStagingDirectory)/js-prebuild'
targetArch: 'arm64'
signWindows: true

- stage: js_build_linux_x64
Expand Down Expand Up @@ -214,9 +213,9 @@ stages:
outputDir: '$(Build.ArtifactStagingDirectory)/js-prebuild'
signMac: true

# =====================================================================
# Test stages — same-platform only. win-arm64 is build-only.
# =====================================================================
# ================================================================
# Test stages — same-platform only (including native win-arm64).
# ================================================================

- stage: js_test_win_x64
displayName: 'JS SDK: Test Windows x64'
Expand All @@ -242,6 +241,35 @@ stages:
prebuildArtifactDir: '$(Pipeline.Workspace)/js-prebuild-win-x64'
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'

- stage: js_test_win_arm64
displayName: 'JS SDK: Test Windows ARM64'
dependsOn:
- js_build_win_arm64
jobs:
- job: test
pool:
name: onnxruntime-native-arm64-16core
os: windows
hostArchitecture: arm64
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'js-prebuild-win-arm64'
targetPath: '$(Pipeline.Workspace)/js-prebuild-win-arm64'
steps:
- checkout: self
clean: true
- 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'
dependsOn:
Expand Down
43 changes: 36 additions & 7 deletions .pipelines/v2/templates/stages-python.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Build + test stages for the sdk_v2 Python SDK (foundry-local-sdk).
#
# Builds win-x64 + win-arm64 + linux-x64 + linux-arm64 + osx-arm64;
# tests win-x64 + linux-x64 + linux-arm64 + osx-arm64
# (win-arm64 is build-only, matching the C# matrix).
# tests win-x64 + win-arm64 + linux-x64 + linux-arm64 + osx-arm64;
#
# Each build stage depends on the matching native build stage from
# stages-build-native.yml and consumes the `cpp-native-<rid>` pipeline artifact
Expand Down Expand Up @@ -56,8 +55,9 @@ stages:
jobs:
- job: build
pool:
name: onnxruntime-Win-CPU-2022
name: onnxruntime-native-arm64-16core
os: windows
hostArchitecture: arm64
templateContext:
inputs:
- input: pipelineArtifact
Expand All @@ -77,7 +77,7 @@ stages:
parameters:
nativeArtifactDir: '$(Pipeline.Workspace)/cpp-native-win-arm64'
rid: 'win-arm64'
targetArch: 'arm64'
pythonArchitecture: 'arm64'
outputDir: '$(Build.ArtifactStagingDirectory)/python-sdk'

- stage: python_build_linux_x64
Expand Down Expand Up @@ -178,9 +178,9 @@ stages:
pythonArchitecture: 'arm64'
outputDir: '$(Build.ArtifactStagingDirectory)/python-sdk'

# =================================================================
# Tests — win-x64, linux-x64, osx-arm64. win-arm64 is build-only.
# =================================================================
# ======================================================
# Tests — win-x64, win-arm64, linux-x64, osx-arm64.
# ======================================================
- stage: python_test_win_x64
displayName: 'Python SDK: Test Windows x64'
dependsOn:
Expand All @@ -206,6 +206,35 @@ stages:
wheelDir: '$(Pipeline.Workspace)/python-sdk-win-x64'
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'

- stage: python_test_win_arm64
displayName: 'Python SDK: Test Windows ARM64'
dependsOn:
- python_build_win_arm64
jobs:
- job: test
pool:
name: onnxruntime-native-arm64-16core
os: windows
hostArchitecture: arm64
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'python-sdk-win-arm64'
targetPath: '$(Pipeline.Workspace)/python-sdk-win-arm64'
steps:
- checkout: self
clean: true
- 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'
dependsOn:
Expand Down
Loading