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
17 changes: 1 addition & 16 deletions .pipelines/foundry-local-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,7 @@ 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.
- 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'
# All ORT/GenAI/WinML versions are read from sdk_v2/deps_versions.json at runtime.
- name: cppBuildConfig
value: 'RelWithDebInfo'

Expand Down Expand Up @@ -268,7 +257,3 @@ extends:
- template: v2/templates/stages-sdk-v2.yml
parameters:
buildConfig: $(cppBuildConfig)
ortVersion: $(cppOrtVersion)
ortVersionWinml: $(cppOrtVersionWinml)
genaiVersion: $(cppGenaiVersion)
winmlVersion: $(cppWinmlVersion)
2 changes: 1 addition & 1 deletion .pipelines/v2/sdk_v2-pipeline-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ purposes:

Versions are pipeline-level variables, currently:

* `ortVersion` `1.25.1` (`Microsoft.ML.OnnxRuntime.Foundry`)
* `ortVersion` `1.25.1` (`Microsoft.ML.OnnxRuntime`)
* `ortVersionWinml` `1.23.2.3` (WinML-aligned ORT line, used by the WinML build stages)
* `genaiVersion` `0.13.2` (`Microsoft.ML.OnnxRuntimeGenAI.Foundry`)
* `winmlVersion` `1.8.2192` (`Microsoft.WindowsAppSDK.ML`)
Expand Down
32 changes: 3 additions & 29 deletions .pipelines/v2/templates/stages-build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@
# (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)
#
# ORT/GenAI versions are read from sdk_v2/deps_versions.json at runtime.

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 @@ -52,9 +46,6 @@ stages:
parameters:
arch: x64
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
runTests: true
stageHeaders: true

Expand Down Expand Up @@ -84,14 +75,11 @@ stages:
parameters:
arch: arm64
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
runTests: false
stageHeaders: false

# ====================================================================
# Linux x64 — build + test
# Linux x64— build + test
# ====================================================================
- stage: cpp_build_linux_x64
displayName: 'C++ Native: Linux x64'
Expand All @@ -115,8 +103,6 @@ stages:
- template: steps-build-linux.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
runTests: true

# ====================================================================
Expand Down Expand Up @@ -146,8 +132,6 @@ stages:
- template: steps-build-macos.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
runTests: true

# ====================================================================
Expand Down Expand Up @@ -181,9 +165,6 @@ stages:
parameters:
arch: x64
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
useWinml: true
runTests: true
stageHeaders: false
Expand Down Expand Up @@ -214,9 +195,6 @@ stages:
parameters:
arch: arm64
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
useWinml: true
runTests: false
stageHeaders: false
Expand Down Expand Up @@ -261,8 +239,6 @@ stages:
steps:
- template: steps-pack-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
variant: base

# ====================================================================
Expand Down Expand Up @@ -297,6 +273,4 @@ stages:
steps:
- template: steps-pack-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
variant: winml
15 changes: 3 additions & 12 deletions .pipelines/v2/templates/stages-sdk-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,21 @@
# publishes the `version-info` pipeline artifact (containing sdkVersion.txt
# and pyVersion.txt). All downstream stages read from that artifact rather
# than recomputing a timestamp.
#
# ORT/GenAI/WinML versions are read from sdk_v2/deps_versions.json at runtime
# by each build job — no version parameters needed here.

parameters:
- name: buildConfig
type: string
default: 'RelWithDebInfo'
- name: ortVersion
type: string
- name: ortVersionWinml
type: string
- name: genaiVersion
type: string
- name: winmlVersion
type: string

stages:

# ── Native builds + pack ──
- template: stages-build-native.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
ortVersion: ${{ parameters.ortVersion }}
ortVersionWinml: ${{ parameters.ortVersionWinml }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}

# ── C# SDK (base) ──
- template: stages-cs.yml
Expand Down
13 changes: 6 additions & 7 deletions .pipelines/v2/templates/steps-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
# Pool: onnxruntime-Ubuntu2404-AMD-CPU. Has the toolchain pre-installed but we
# still bootstrap vcpkg and pre-download NuGet packages from the aiinfra feed
# for version pinning.
#
# Reads ORT/GenAI versions from sdk_v2/deps_versions.json (single source of truth).

parameters:
- name: buildConfig
type: string
- name: ortVersion
type: string
- name: genaiVersion
type: string
- name: runTests
type: boolean
default: false
Expand All @@ -23,11 +21,12 @@ steps:
"$(Build.BinariesDirectory)/vcpkg/bootstrap-vcpkg.sh" -disableMetrics
displayName: 'Bootstrap vcpkg'

- template: steps-read-deps-versions.yml
parameters:
shell: bash

- template: steps-prefetch-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ''
includeWinml: false
includeOrtGpuLinux: true
shell: bash
Expand Down
13 changes: 6 additions & 7 deletions .pipelines/v2/templates/steps-build-macos.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Reusable macOS build steps for the Foundry Local C++ SDK.
#
# Pool: AcesShared (Sequoia, Apple Silicon). Builds and tests natively.
#
# Reads ORT/GenAI versions from sdk_v2/deps_versions.json (single source of truth).

parameters:
- name: buildConfig
type: string
- name: ortVersion
type: string
- name: genaiVersion
type: string
- name: runTests
type: boolean
default: false
Expand All @@ -32,11 +30,12 @@ steps:
pkg-config --version
displayName: 'Verify build tools'

- template: steps-read-deps-versions.yml
parameters:
shell: bash

- template: steps-prefetch-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ''
includeWinml: false
shell: bash

Expand Down
26 changes: 9 additions & 17 deletions .pipelines/v2/templates/steps-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
# builds, optionally tests, and stages artifacts for the parent stage's
# templateContext.outputs.
#
# Reads all dependency versions from sdk_v2/deps_versions.json (single source of truth).
#
# Parameters:
# arch – 'x64' or 'arm64' (arm64 is cross-compiled, no tests)
# buildConfig – CMake config (Debug, Release, RelWithDebInfo, MinSizeRel)
# ortVersion – Microsoft.ML.OnnxRuntime.Foundry version
# genaiVersion – Microsoft.ML.OnnxRuntimeGenAI.Foundry version
# winmlVersion – Microsoft.WindowsAppSDK.ML version
# useWinml – Build the WinML variant (--use_winml). Caller is responsible
# for passing the WinML-aligned ortVersion (e.g. 1.23.2.3).
# useWinml – Build the WinML variant (--use_winml).
# runTests – Whether to run tests
# stageHeaders – Whether to stage public headers as a separate artifact

Expand All @@ -21,12 +19,6 @@ parameters:
values: ['x64', 'arm64']
- name: buildConfig
type: string
- name: ortVersion
type: string
- name: genaiVersion
type: string
- name: winmlVersion
type: string
- name: useWinml
type: boolean
default: false
Expand All @@ -49,6 +41,10 @@ steps:
versionSpec: '3.12'
architecture: 'x64'

- template: steps-read-deps-versions.yml
parameters:
shell: pwsh

- script: |
git clone https://github.com/microsoft/vcpkg.git $(Build.BinariesDirectory)\vcpkg
call $(Build.BinariesDirectory)\vcpkg\bootstrap-vcpkg.bat -disableMetrics
Expand All @@ -58,10 +54,6 @@ steps:

- template: steps-prefetch-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
genaiVersion: ${{ parameters.genaiVersion }}
winmlVersion: ${{ parameters.winmlVersion }}
includeWinml: ${{ parameters.useWinml }}
shell: pwsh

# Bake the pipeline-computed version into the binary so FoundryLocalGetVersionString()
Expand Down Expand Up @@ -103,7 +95,7 @@ steps:
--configure --build
--config ${{ parameters.buildConfig }}
--cmake_generator "Visual Studio 17 2022"
--use_winml --winml_sdk_version ${{ parameters.winmlVersion }}
--use_winml --winml_sdk_version $(winmlVersion)
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build (x64, WinML)'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
Expand All @@ -130,7 +122,7 @@ steps:
--configure --build --arm64
--config ${{ parameters.buildConfig }}
--cmake_generator "Visual Studio 17 2022"
--use_winml --winml_sdk_version ${{ parameters.winmlVersion }}
--use_winml --winml_sdk_version $(winmlVersion)
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build (arm64 cross-compile, WinML)'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
Expand Down
19 changes: 11 additions & 8 deletions .pipelines/v2/templates/steps-pack-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
# Inputs are downloaded by the parent job's templateContext.inputs into
# $(Pipeline.Workspace)/<artifactName>/.
#
# Reads ortVersion and genaiVersion from sdk_v2/deps_versions.json at runtime
# (set as job variables by an inline step below).
#
# Variants:
# base -> Microsoft.AI.Foundry.Local.Runtime
# (win-x64, win-arm64, linux-x64, osx-arm64)
# winml -> Microsoft.AI.Foundry.Local.Runtime.WinML
# (win-x64, win-arm64 only — both built with --use_winml)

parameters:
- name: ortVersion
type: string
- name: genaiVersion
type: string
- name: variant
type: string
default: 'base'
Expand All @@ -30,6 +29,10 @@ steps:
inputs:
versionSpec: '3.x'

- template: steps-read-deps-versions.yml
parameters:
shell: pwsh

# List downloaded pipeline artifacts so we can diagnose missing/misplaced files.
- task: PowerShell@2
displayName: 'List downloaded artifacts'
Expand Down Expand Up @@ -63,8 +66,8 @@ steps:
python "$(Build.SourcesDirectory)/sdk_v2/cpp/nuget/pack.py" `
--version "$version" `
--package_id "Microsoft.AI.Foundry.Local.Runtime" `
--ort_version "${{ parameters.ortVersion }}" `
--genai_version "${{ parameters.genaiVersion }}" `
--ort_version "$(ortVersion)" `
--genai_version "$(genaiVersion)" `
--win_x64 "$(Pipeline.Workspace)/cpp-native-win-x64" `
--win_arm64 "$(Pipeline.Workspace)/cpp-native-win-arm64" `
--linux_x64 "$(Pipeline.Workspace)/cpp-native-linux-x64" `
Expand Down Expand Up @@ -92,8 +95,8 @@ steps:
python "$(Build.SourcesDirectory)/sdk_v2/cpp/nuget/pack.py" `
--version "$version" `
--package_id "Microsoft.AI.Foundry.Local.Runtime.WinML" `
--ort_version "${{ parameters.ortVersion }}" `
--genai_version "${{ parameters.genaiVersion }}" `
--ort_version "$(ortVersion)" `
--genai_version "$(genaiVersion)" `
--win_x64 "$(Pipeline.Workspace)/cpp-native-win-x64-winml" `
--win_arm64 "$(Pipeline.Workspace)/cpp-native-win-arm64-winml" `
--output_dir "$outDir"
Expand Down
Loading
Loading