Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 2 additions & 13 deletions .pipelines/foundry-local-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# Builds Foundry Local Core from neutron-server (windows.ai.toolkit project),
# then packages the C# and JS SDKs from this repo using the built Core.
#
# Produces artifacts: flc-nuget, flc-nuget-winml, flc-wheels, flc-wheels-winml,
# cs-sdk, cs-sdk-winml, js-sdk, js-sdk-winml, python-sdk, python-sdk-winml,
# rust-sdk, rust-sdk-winml
# Produces artifacts: flc-nuget, flc-wheels, cs-sdk, js-sdk, python-sdk, rust-sdk

# CI: only auto-run on pushes to main / release branches. Without an explicit
# trigger block, ADO defaults to "every commit on every branch", which fires
Expand Down Expand Up @@ -54,17 +52,11 @@ parameters:
variables:
- group: FoundryLocal-ESRP-Signing
# C++ SDK (sdk_v2/cpp) native dependency versions. Must match cmake defaults
# in sdk_v2/deps_versions.json and sdk_v2/deps_versions_winml.json.
# in sdk_v2/deps_versions.json.
- name: cppOrtVersion
value: '1.25.1'
- name: cppOrtVersionWinml
# Pinned to the WinML-aligned ORT line so foundry_local.dll's ORT ABI matches
# the WinML EP catalog plugins it loads. See FindOnnxRuntime.cmake.
value: '1.23.2.3'
- name: cppGenaiVersion
value: '0.13.2'
- name: cppWinmlVersion
value: '1.8.2192'
- name: cppBuildConfig
value: 'RelWithDebInfo'

Expand Down Expand Up @@ -167,7 +159,6 @@ extends:

# ── Compute Version ──
# A single version string is computed once and shared across all stages.
# This prevents timestamp drift between standard and WinML builds.
# Outputs (written to the `version-info` pipeline artifact):
# sdk_v2 (no suffix; FLC is legacy-only and not emitted here):
# sdkVersion.txt – semver for C# (e.g. X.Y.Z-dev.202604061234)
Expand Down Expand Up @@ -269,6 +260,4 @@ extends:
parameters:
buildConfig: $(cppBuildConfig)
ortVersion: $(cppOrtVersion)
ortVersionWinml: $(cppOrtVersionWinml)
genaiVersion: $(cppGenaiVersion)
winmlVersion: $(cppWinmlVersion)
125 changes: 4 additions & 121 deletions .pipelines/v2/templates/stages-build-native.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# Native build + pack stages for the Foundry Local C++ SDK.
#
# Per-platform stages each produce a `cpp-native-<rid>[-winml]` pipeline
# artifact. Two pack stages assemble the artifacts into separate NuGet
# packages on every build (PR and main):
# Per-platform stages each produce a `cpp-native-<rid>` pipeline artifact.
# A single pack stage assembles the artifacts into a NuGet package:
#
# pack_nuget – Microsoft.AI.Foundry.Local.Runtime
# (win-x64, win-arm64, linux-x64, osx-arm64)
# pack_nuget_winml – Microsoft.AI.Foundry.Local.Runtime.WinML
# (win-x64, win-arm64; both built with --use_winml)
# pack_nuget – Microsoft.AI.Foundry.Local.Runtime
# (win-x64, win-arm64, linux-x64, osx-arm64)

parameters:
- name: buildConfig
type: string
- name: ortVersion
type: string
- name: ortVersionWinml
type: string
- name: genaiVersion
type: string
- name: winmlVersion
type: string

stages:

Expand Down Expand Up @@ -54,7 +47,6 @@ stages:
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
runTests: true
stageHeaders: true

Expand Down Expand Up @@ -86,7 +78,6 @@ stages:
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
runTests: false
stageHeaders: false

Expand Down Expand Up @@ -150,77 +141,6 @@ stages:
genaiVersion: ${{ parameters.genaiVersion }}
runTests: true

# ====================================================================
# Windows x64 (WinML) — build + test
# The WinML variant links against the WinML-aligned ORT (1.23.x), which
# is older than the base ORT and lacks some ops used by cataloged vision
# models (e.g. com.microsoft:CausalConvWithState). The C++ VisionFixture
# and the C# VisionTests both skip themselves on WinML so the rest of
# the suite still runs against this configuration.
# ====================================================================
- stage: cpp_build_win_x64_winml
displayName: 'C++ Native: Windows x64 (WinML)'
dependsOn:
- compute_version
jobs:
- job: build
pool:
name: onnxruntime-Win-CPU-2022
os: windows
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'version-info'
targetPath: '$(Pipeline.Workspace)/version-info'
outputs:
- output: pipelineArtifact
artifactName: 'cpp-native-win-x64-winml'
targetPath: '$(Build.ArtifactStagingDirectory)/native'
steps:
- template: steps-build-windows.yml
parameters:
arch: x64
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
useWinml: true
runTests: true
stageHeaders: false

# ====================================================================
# Windows ARM64 (WinML) — cross-compile only
# ====================================================================
- stage: cpp_build_win_arm64_winml
displayName: 'C++ Native: Windows ARM64 (WinML)'
dependsOn:
- compute_version
jobs:
- job: build
pool:
name: onnxruntime-Win-CPU-2022
os: windows
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'version-info'
targetPath: '$(Pipeline.Workspace)/version-info'
outputs:
- output: pipelineArtifact
artifactName: 'cpp-native-win-arm64-winml'
targetPath: '$(Build.ArtifactStagingDirectory)/native'
steps:
- template: steps-build-windows.yml
parameters:
arch: arm64
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
useWinml: true
runTests: false
stageHeaders: false

# ====================================================================
# Pack — base NuGet package (all 4 platforms)
# ====================================================================
Expand Down Expand Up @@ -263,40 +183,3 @@ stages:
parameters:
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
variant: base

# ====================================================================
# Pack — WinML NuGet package (Windows x64 + arm64 only)
# ====================================================================
- stage: cpp_pack_nuget_winml
displayName: 'C++ Native: Pack NuGet (WinML)'
dependsOn:
- compute_version
- cpp_build_win_x64_winml
- cpp_build_win_arm64_winml
jobs:
- job: pack
pool:
name: onnxruntime-Win-CPU-2022
os: windows
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'version-info'
targetPath: '$(Pipeline.Workspace)/version-info'
- input: pipelineArtifact
artifactName: 'cpp-native-win-x64-winml'
targetPath: '$(Pipeline.Workspace)/cpp-native-win-x64-winml'
- input: pipelineArtifact
artifactName: 'cpp-native-win-arm64-winml'
targetPath: '$(Pipeline.Workspace)/cpp-native-win-arm64-winml'
outputs:
- output: pipelineArtifact
artifactName: 'cpp-nuget-winml'
targetPath: '$(Build.ArtifactStagingDirectory)/nuget'
steps:
- template: steps-pack-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
variant: winml
94 changes: 8 additions & 86 deletions .pipelines/v2/templates/stages-cs.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,28 @@
# Build + test stages for the sdk_v2 C# SDK, parameterized by variant.
# Build + test stages for the sdk_v2 C# SDK.
#
# variant: base -> Microsoft.AI.Foundry.Local (build + test win/linux/osx)
# variant: winml -> Microsoft.AI.Foundry.Local.WinML (build + test win only)
# variant: base -> Microsoft.AI.Foundry.Local (build + test win/linux/osx)
#
# Depends on the matching native pack stage from stages-build-native.yml:
# base -> cpp_pack_nuget (artifact: cpp-nuget)
# winml -> cpp_pack_nuget_winml (artifact: cpp-nuget-winml)
# Depends on the native pack stage from stages-build-native.yml:
# base -> cpp_pack_nuget (artifact: cpp-nuget)
#
# Produces a `cs-sdk-v2-<variant>` pipeline artifact containing the signed
# Produces a `cs-sdk-v2-base` pipeline artifact containing the signed
# .nupkg (+ .snupkg).

parameters:
- name: variant
type: string
default: 'base'
values: ['base', 'winml']
values: ['base']

# Per-variant config block selected at template-expansion time. Keeps the
# stage bodies free of nested ${{ if }} branching for static naming.
# Per-variant config block selected at template-expansion time.
- name: _config_base
type: object
default:
suffix: 'base'
isWinML: false
packStage: 'cpp_pack_nuget'
nativeArtifact: 'cpp-nuget'
csArtifact: 'cs-sdk-v2-base'

- name: _config_winml
type: object
default:
suffix: 'winml'
isWinML: true
packStage: 'cpp_pack_nuget_winml'
nativeArtifact: 'cpp-nuget-winml'
csArtifact: 'cs-sdk-v2-winml'

stages:

# ====================================================================
Expand Down Expand Up @@ -70,39 +57,6 @@ stages:
- template: steps-build-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
isWinML: false
outputDir: '$(Build.ArtifactStagingDirectory)/cs-sdk'

- ${{ if eq(parameters.variant, 'winml') }}:
- stage: cs_build_winml
displayName: 'C# SDK: Build (WinML)'
dependsOn:
- compute_version
- ${{ parameters._config_winml.packStage }}
jobs:
- job: build
pool:
name: onnxruntime-Win-CPU-2022
os: windows
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'version-info'
targetPath: '$(Pipeline.Workspace)/version-info'
- input: pipelineArtifact
artifactName: ${{ parameters._config_winml.nativeArtifact }}
targetPath: '$(Pipeline.Workspace)/${{ parameters._config_winml.nativeArtifact }}'
outputs:
- output: pipelineArtifact
artifactName: ${{ parameters._config_winml.csArtifact }}
targetPath: '$(Build.ArtifactStagingDirectory)/cs-sdk'
steps:
- checkout: self
clean: true
- template: steps-build-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_winml.nativeArtifact }}'
isWinML: true
outputDir: '$(Build.ArtifactStagingDirectory)/cs-sdk'

# ====================================================================
Expand Down Expand Up @@ -135,41 +89,11 @@ stages:
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
isWinML: false
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'

- ${{ if eq(parameters.variant, 'winml') }}:
- stage: cs_test_win_x64_winml
displayName: 'C# SDK: Test Windows x64 (WinML)'
dependsOn:
- cs_build_winml
jobs:
- job: test
pool:
name: onnxruntime-Win-CPU-2022
os: windows
templateContext:
inputs:
- input: pipelineArtifact
artifactName: 'version-info'
targetPath: '$(Pipeline.Workspace)/version-info'
- input: pipelineArtifact
artifactName: ${{ parameters._config_winml.nativeArtifact }}
targetPath: '$(Pipeline.Workspace)/${{ parameters._config_winml.nativeArtifact }}'
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_winml.nativeArtifact }}'
isWinML: true
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'

# ====================================================================
# Test — Linux x64 / macOS ARM64 (base variant only; WinML is Windows-only)
# Test — Linux x64 / macOS ARM64
# ====================================================================
- ${{ if eq(parameters.variant, 'base') }}:
- stage: cs_test_linux_x64
Expand Down Expand Up @@ -198,7 +122,6 @@ stages:
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
isWinML: false
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'

- stage: cs_test_osx_arm64
Expand Down Expand Up @@ -236,5 +159,4 @@ stages:
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
isWinML: false
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'
Loading
Loading