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
7 changes: 7 additions & 0 deletions .pipelines/foundry-local-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ resources:
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: test-data-shared
type: git
name: AIFoundryLocal/test-data-shared
ref: refs/heads/main

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
Expand All @@ -81,6 +85,9 @@ extends:
name: onnxruntime-Win-CPU-2022
os: windows
sdl:
sourceRepositoriesToScan:
exclude:
- repository: test-data-shared
binskim:
break: false
scanOutputDirectoryOnly: true
Expand Down
18 changes: 5 additions & 13 deletions .pipelines/v2/templates/stages-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
Comment thread
prathikr marked this conversation as resolved.
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
Expand Down Expand Up @@ -159,9 +157,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_winml.nativeArtifact }}'
Expand Down Expand Up @@ -192,9 +188,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
Expand Down Expand Up @@ -230,12 +224,10 @@ stages:
fi
git lfs install
displayName: 'Install git-lfs (macOS)'
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-cs.yml
parameters:
flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}'
isWinML: false
testDataSharedDir: '$(Build.SourcesDirectory)/test-data-shared'
additionalTestArgs: '--settings $(Build.SourcesDirectory)/sdk_v2/cs/test/FoundryLocal.Tests/sequential.runsettings'
additionalTestArgs: '--settings $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cs/test/FoundryLocal.Tests/sequential.runsettings'
12 changes: 3 additions & 9 deletions .pipelines/v2/templates/stages-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-js.yml
parameters:
rid: 'win-x64'
Expand All @@ -224,9 +222,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-js.yml
parameters:
rid: 'linux-x64'
Expand Down Expand Up @@ -259,9 +255,7 @@ stages:
fi
git lfs install
displayName: 'Install git-lfs (macOS)'
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-js.yml
parameters:
rid: 'osx-arm64'
Expand Down
16 changes: 4 additions & 12 deletions .pipelines/v2/templates/stages-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-python.yml
parameters:
wheelDir: '$(Pipeline.Workspace)/python-sdk-base-win-x64'
Expand All @@ -204,9 +202,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-python.yml
parameters:
wheelDir: '$(Pipeline.Workspace)/python-sdk-base-linux-x64'
Expand Down Expand Up @@ -239,9 +235,7 @@ stages:
fi
git lfs install
displayName: 'Install git-lfs (macOS)'
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-python.yml
parameters:
wheelDir: '$(Pipeline.Workspace)/python-sdk-base-osx-arm64'
Expand Down Expand Up @@ -336,9 +330,7 @@ stages:
steps:
- checkout: self
clean: true
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
- checkout: test-data-shared
- template: steps-test-python.yml
parameters:
wheelDir: '$(Pipeline.Workspace)/python-sdk-winml-win-x64'
Expand Down
16 changes: 8 additions & 8 deletions .pipelines/v2/templates/steps-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ steps:
"$(Build.BinariesDirectory)/vcpkg/bootstrap-vcpkg.sh" -disableMetrics
displayName: 'Bootstrap vcpkg'

- checkout: self
clean: true

- template: steps-prefetch-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
Expand All @@ -43,18 +46,15 @@ steps:
displayName: 'Append version define'

- ${{ if eq(parameters.runTests, true) }}:
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
basePath: '$(Agent.BuildDirectory)'
- checkout: test-data-shared
Comment thread
prathikr marked this conversation as resolved.

- bash: |
set -euo pipefail
python3 build.py --configure --build \
--config ${{ parameters.buildConfig }} \
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)/vcpkg

Expand All @@ -63,10 +63,10 @@ steps:
set -euo pipefail
python3 build.py --test --config ${{ parameters.buildConfig }}
displayName: 'Run tests'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)/vcpkg
FOUNDRY_TEST_DATA_DIR: $(Agent.BuildDirectory)/test-data-shared
FOUNDRY_TEST_DATA_DIR: $(Build.SourcesDirectory)/Foundry-Local/test-data-shared

- bash: |
echo "=== vcpkg buildtrees error logs ==="
Expand All @@ -85,7 +85,7 @@ steps:
# side); test/example binaries are not part of the redistributable surface.
- bash: |
set -euo pipefail
src='$(Build.SourcesDirectory)/sdk_v2/cpp/build/Linux/${{ parameters.buildConfig }}/bin'
src='$(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp/build/Linux/${{ parameters.buildConfig }}/bin'
dst='$(Build.ArtifactStagingDirectory)/native'
mkdir -p "$dst"

Expand Down
16 changes: 8 additions & 8 deletions .pipelines/v2/templates/steps-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ steps:
pkg-config --version
displayName: 'Verify build tools'

- checkout: self
clean: true

- template: steps-prefetch-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
Expand All @@ -51,18 +54,15 @@ steps:
displayName: 'Append version define'

- ${{ if eq(parameters.runTests, true) }}:
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
basePath: '$(Agent.BuildDirectory)'
- checkout: test-data-shared
Comment thread
prathikr marked this conversation as resolved.

- bash: |
set -euo pipefail
python3 build.py --configure --build \
--config ${{ parameters.buildConfig }} \
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)/vcpkg

Expand All @@ -71,10 +71,10 @@ steps:
set -euo pipefail
python3 build.py --test --config ${{ parameters.buildConfig }}
displayName: 'Run tests'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)/vcpkg
FOUNDRY_TEST_DATA_DIR: $(Agent.BuildDirectory)/test-data-shared
FOUNDRY_TEST_DATA_DIR: $(Build.SourcesDirectory)/Foundry-Local/test-data-shared

- bash: |
echo "=== vcpkg buildtrees error logs ==="
Expand All @@ -90,7 +90,7 @@ steps:
# are not part of the redistributable surface.
- bash: |
set -euo pipefail
src='$(Build.SourcesDirectory)/sdk_v2/cpp/build/macOS/${{ parameters.buildConfig }}/bin'
src='$(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp/build/macOS/${{ parameters.buildConfig }}/bin'
dst='$(Build.ArtifactStagingDirectory)/native'
mkdir -p "$dst"

Expand Down
28 changes: 14 additions & 14 deletions .pipelines/v2/templates/steps-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ steps:
echo @exit /b 0 > $(Build.BinariesDirectory)\tools\pkg-config.bat
displayName: 'Bootstrap vcpkg'

- checkout: self
clean: true

- template: steps-prefetch-nuget.yml
parameters:
ortVersion: ${{ parameters.ortVersion }}
Expand All @@ -78,10 +81,7 @@ steps:

# Tests need shared model files.
- ${{ if eq(parameters.runTests, true) }}:
- template: ../../templates/checkout-steps.yml@self
parameters:
repoName: test-data-shared
basePath: '$(Agent.BuildDirectory)'
- checkout: test-data-shared
Comment thread
prathikr marked this conversation as resolved.
Comment thread
prathikr marked this conversation as resolved.

- ${{ if and(eq(parameters.arch, 'x64'), eq(parameters.useWinml, false)) }}:
- script: >-
Expand All @@ -91,7 +91,7 @@ steps:
--cmake_generator "Visual Studio 17 2022"
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build (x64)'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg
PKG_CONFIG: $(Build.BinariesDirectory)\tools\pkg-config.bat
Expand All @@ -105,7 +105,7 @@ steps:
--use_winml --winml_sdk_version ${{ parameters.winmlVersion }}
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build (x64, WinML)'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg
PKG_CONFIG: $(Build.BinariesDirectory)\tools\pkg-config.bat
Expand All @@ -118,7 +118,7 @@ steps:
--cmake_generator "Visual Studio 17 2022"
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build (arm64 cross-compile)'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg
PKG_CONFIG: $(Build.BinariesDirectory)\tools\pkg-config.bat
Expand All @@ -132,18 +132,18 @@ steps:
--use_winml --winml_sdk_version ${{ parameters.winmlVersion }}
--cmake_extra_defines $(cmakeFetchDefines)
displayName: 'Configure and build (arm64 cross-compile, WinML)'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg
PKG_CONFIG: $(Build.BinariesDirectory)\tools\pkg-config.bat

- ${{ if and(eq(parameters.runTests, true), eq(parameters.arch, 'x64')) }}:
- script: python build.py --test --config ${{ parameters.buildConfig }}
displayName: 'Run tests'
workingDirectory: $(Build.SourcesDirectory)/sdk_v2/cpp
workingDirectory: $(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp
env:
VCPKG_ROOT: $(Build.BinariesDirectory)\vcpkg
FOUNDRY_TEST_DATA_DIR: $(Agent.BuildDirectory)\test-data-shared
FOUNDRY_TEST_DATA_DIR: $(Build.SourcesDirectory)\Foundry-Local\test-data-shared

# Stage the redistributable native artifacts.
# - Standard build: vcpkg statically links ORT/GenAI/azure-*/spdlog/fmt/
Expand All @@ -162,8 +162,8 @@ steps:
targetType: inline
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 }}'
$binDir = '$(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp/build/Windows/${{ parameters.buildConfig }}/bin/${{ parameters.buildConfig }}'
$linkDir = '$(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp/build/Windows/${{ parameters.buildConfig }}/${{ parameters.buildConfig }}'
$dst = '$(Build.ArtifactStagingDirectory)/native'
New-Item -ItemType Directory -Force -Path $dst | Out-Null

Expand All @@ -189,7 +189,7 @@ steps:
- task: CopyFiles@2
displayName: 'Stage public headers'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/sdk_v2/cpp/include'
SourceFolder: '$(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp/include'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/include'

Expand All @@ -202,6 +202,6 @@ steps:
- task: CopyFiles@2
displayName: 'Stage ms-gsl headers'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/sdk_v2/cpp/build/Windows/${{ parameters.buildConfig }}/vcpkg_installed/x64-windows/include/gsl'
SourceFolder: '$(Build.SourcesDirectory)/Foundry-Local/sdk_v2/cpp/build/Windows/${{ parameters.buildConfig }}/vcpkg_installed/x64-windows/include/gsl'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/include/gsl'
8 changes: 7 additions & 1 deletion .pipelines/v2/templates/steps-prefetch-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ steps:
pwsh: true
script: |
$ErrorActionPreference = 'Stop'
$depsFile = Join-Path "$(Build.SourcesDirectory)" "sdk_v2/deps_versions.json"
$multiCheckout = Join-Path "$(Build.SourcesDirectory)" "Foundry-Local"
if (Test-Path $multiCheckout) {
$repoRoot = $multiCheckout
} else {
$repoRoot = "$(Build.SourcesDirectory)"
}
$depsFile = Join-Path $repoRoot "sdk_v2/deps_versions.json"
if (-not (Test-Path $depsFile)) { throw "deps_versions.json not found at $depsFile" }
$deps = Get-Content $depsFile -Raw | ConvertFrom-Json
$expected = @{
Expand Down
Loading
Loading