diff --git a/.pipelines/foundry-local-packaging.yml b/.pipelines/foundry-local-packaging.yml index bedd8a3d..ad07a975 100644 --- a/.pipelines/foundry-local-packaging.yml +++ b/.pipelines/foundry-local-packaging.yml @@ -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 @@ -81,6 +85,9 @@ extends: name: onnxruntime-Win-CPU-2022 os: windows sdl: + sourceRepositoriesToScan: + exclude: + - repository: test-data-shared binskim: break: false scanOutputDirectoryOnly: true diff --git a/.pipelines/v2/templates/stages-cs.yml b/.pipelines/v2/templates/stages-cs.yml index c271dda1..6ffa2354 100644 --- a/.pipelines/v2/templates/stages-cs.yml +++ b/.pipelines/v2/templates/stages-cs.yml @@ -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 - template: steps-test-cs.yml parameters: flNugetDir: '$(Pipeline.Workspace)/${{ parameters._config_base.nativeArtifact }}' @@ -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 }}' @@ -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 }}' @@ -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' diff --git a/.pipelines/v2/templates/stages-js.yml b/.pipelines/v2/templates/stages-js.yml index e434f7c7..867bf0c1 100644 --- a/.pipelines/v2/templates/stages-js.yml +++ b/.pipelines/v2/templates/stages-js.yml @@ -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' @@ -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' @@ -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' diff --git a/.pipelines/v2/templates/stages-python.yml b/.pipelines/v2/templates/stages-python.yml index 7a07c7da..495a31f9 100644 --- a/.pipelines/v2/templates/stages-python.yml +++ b/.pipelines/v2/templates/stages-python.yml @@ -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' @@ -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' @@ -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' @@ -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' diff --git a/.pipelines/v2/templates/steps-build-linux.yml b/.pipelines/v2/templates/steps-build-linux.yml index b16b13fd..fe31dd75 100644 --- a/.pipelines/v2/templates/steps-build-linux.yml +++ b/.pipelines/v2/templates/steps-build-linux.yml @@ -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 }} @@ -43,10 +46,7 @@ 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 - bash: | set -euo pipefail @@ -54,7 +54,7 @@ steps: --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 @@ -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 ===" @@ -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" diff --git a/.pipelines/v2/templates/steps-build-macos.yml b/.pipelines/v2/templates/steps-build-macos.yml index 278bdbff..a49a052f 100644 --- a/.pipelines/v2/templates/steps-build-macos.yml +++ b/.pipelines/v2/templates/steps-build-macos.yml @@ -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 }} @@ -51,10 +54,7 @@ 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 - bash: | set -euo pipefail @@ -62,7 +62,7 @@ steps: --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 @@ -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 ===" @@ -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" diff --git a/.pipelines/v2/templates/steps-build-windows.yml b/.pipelines/v2/templates/steps-build-windows.yml index 0e17f07b..16d577a9 100644 --- a/.pipelines/v2/templates/steps-build-windows.yml +++ b/.pipelines/v2/templates/steps-build-windows.yml @@ -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 }} @@ -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 - ${{ if and(eq(parameters.arch, 'x64'), eq(parameters.useWinml, false)) }}: - script: >- @@ -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 @@ -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 @@ -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 @@ -132,7 +132,7 @@ 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 @@ -140,10 +140,10 @@ steps: - ${{ 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/ @@ -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 @@ -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' @@ -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' diff --git a/.pipelines/v2/templates/steps-prefetch-nuget.yml b/.pipelines/v2/templates/steps-prefetch-nuget.yml index 66107529..34f85339 100644 --- a/.pipelines/v2/templates/steps-prefetch-nuget.yml +++ b/.pipelines/v2/templates/steps-prefetch-nuget.yml @@ -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 = @{ diff --git a/.pipelines/v2/templates/steps-test-cs.yml b/.pipelines/v2/templates/steps-test-cs.yml index 73274e27..adecbb9d 100644 --- a/.pipelines/v2/templates/steps-test-cs.yml +++ b/.pipelines/v2/templates/steps-test-cs.yml @@ -21,6 +21,20 @@ parameters: steps: +- task: PowerShell@2 + displayName: 'Set source paths' + inputs: + targetType: inline + pwsh: true + script: | + $multiCheckout = "$(Build.SourcesDirectory)/Foundry-Local" + if (Test-Path $multiCheckout) { + $repoRoot = $multiCheckout + } else { + $repoRoot = "$(Build.SourcesDirectory)" + } + Write-Host "##vso[task.setvariable variable=repoRoot]$repoRoot" + - task: UseDotNet@2 displayName: 'Use .NET 10 SDK' inputs: @@ -110,7 +124,7 @@ steps: targetType: inline pwsh: true script: | - $proj = "$(Build.SourcesDirectory)/sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj" + $proj = "$(repoRoot)/sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj" $rid = dotnet msbuild $proj -getProperty:NETCoreSdkRuntimeIdentifier if ($LASTEXITCODE -ne 0 -or -not $rid) { throw "Failed to determine RuntimeIdentifier" } Write-Host "Restoring for RuntimeIdentifier: $rid" @@ -142,7 +156,7 @@ steps: # The redirect file foundry_local.native.cfg is a local-dev override that, if # present, takes priority in DllLoader and would silently point the loader at # an arbitrary path on the agent. Sweep it out of every bin folder before tests. - $root = "$(Build.SourcesDirectory)/sdk_v2/cs" + $root = "$(repoRoot)/sdk_v2/cs" $stale = Get-ChildItem -Path $root -Recurse -Force -Filter 'foundry_local.native.cfg' -ErrorAction SilentlyContinue if ($stale) { Write-Host "Removing stale redirect files:" @@ -157,7 +171,7 @@ steps: targetType: inline pwsh: true script: | - $proj = "$(Build.SourcesDirectory)/sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj" + $proj = "$(repoRoot)/sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj" # Test TFMs: # * net9.0 covers the .NET (Core) runtime test surface. diff --git a/.pipelines/v2/templates/steps-test-js.yml b/.pipelines/v2/templates/steps-test-js.yml index d161da06..003b3420 100644 --- a/.pipelines/v2/templates/steps-test-js.yml +++ b/.pipelines/v2/templates/steps-test-js.yml @@ -18,6 +18,20 @@ parameters: steps: +- task: PowerShell@2 + displayName: 'Set source paths' + inputs: + targetType: inline + pwsh: true + script: | + $multiCheckout = "$(Build.SourcesDirectory)/Foundry-Local" + if (Test-Path $multiCheckout) { + $repoRoot = $multiCheckout + } else { + $repoRoot = "$(Build.SourcesDirectory)" + } + Write-Host "##vso[task.setvariable variable=repoRoot]$repoRoot" + - task: NodeTool@0 displayName: 'Use Node.js 20' inputs: @@ -26,7 +40,7 @@ steps: - ${{ if eq(parameters.rid, 'win-x64') }}: - pwsh: | $src = "${{ parameters.prebuildArtifactDir }}/prebuilds" - $dst = "$(Build.SourcesDirectory)/sdk_v2/js/prebuilds" + $dst = "$(repoRoot)/sdk_v2/js/prebuilds" if (-not (Test-Path $src)) { throw "Prebuild artifact missing: $src" } if (Test-Path $dst) { Remove-Item -Recurse -Force $dst } New-Item -ItemType Directory -Force -Path $dst | Out-Null @@ -38,7 +52,7 @@ steps: - bash: | set -euo pipefail src="${{ parameters.prebuildArtifactDir }}/prebuilds" - dst="$(Build.SourcesDirectory)/sdk_v2/js/prebuilds" + dst="$(repoRoot)/sdk_v2/js/prebuilds" if [ ! -d "$src" ]; then echo "Prebuild artifact missing: $src" >&2; exit 1; fi rm -rf "$dst" mkdir -p "$dst" @@ -51,17 +65,17 @@ steps: displayName: 'npm ci (runs install-native postinstall)' inputs: command: custom - workingDir: '$(Build.SourcesDirectory)/sdk_v2/js' + workingDir: '$(repoRoot)/sdk_v2/js' customCommand: 'ci --no-audit --no-fund' - pwsh: | - Set-Location "$(Build.SourcesDirectory)/sdk_v2/js" + Set-Location "$(repoRoot)/sdk_v2/js" npm run build:ts if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } displayName: 'Build TypeScript' - pwsh: | - Set-Location "$(Build.SourcesDirectory)/sdk_v2/js" + Set-Location "$(repoRoot)/sdk_v2/js" npx --no-install vitest run --reporter=verbose if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } displayName: 'Run vitest' @@ -71,19 +85,19 @@ steps: - ${{ if or(eq(parameters.rid, 'linux-x64'), eq(parameters.rid, 'osx-arm64')) }}: - bash: | set -euo pipefail - cd "$(Build.SourcesDirectory)/sdk_v2/js" + cd "$(repoRoot)/sdk_v2/js" npm ci --no-audit --no-fund displayName: 'npm ci (runs install-native postinstall)' - bash: | set -euo pipefail - cd "$(Build.SourcesDirectory)/sdk_v2/js" + cd "$(repoRoot)/sdk_v2/js" npm run build:ts displayName: 'Build TypeScript' - bash: | set -euo pipefail - cd "$(Build.SourcesDirectory)/sdk_v2/js" + cd "$(repoRoot)/sdk_v2/js" npx --no-install vitest run --reporter=verbose displayName: 'Run vitest' env: diff --git a/.pipelines/v2/templates/steps-test-python.yml b/.pipelines/v2/templates/steps-test-python.yml index 9396a7cc..996f07a2 100644 --- a/.pipelines/v2/templates/steps-test-python.yml +++ b/.pipelines/v2/templates/steps-test-python.yml @@ -23,6 +23,20 @@ parameters: steps: +- task: PowerShell@2 + displayName: 'Set source paths' + inputs: + targetType: inline + pwsh: true + script: | + $multiCheckout = "$(Build.SourcesDirectory)/Foundry-Local" + if (Test-Path $multiCheckout) { + $repoRoot = $multiCheckout + } else { + $repoRoot = "$(Build.SourcesDirectory)" + } + Write-Host "##vso[task.setvariable variable=repoRoot]$repoRoot" + - task: UsePythonVersion@0 displayName: 'Use Python 3.12' inputs: @@ -80,7 +94,7 @@ steps: targetType: inline pwsh: true script: | - Push-Location "$(Build.SourcesDirectory)/sdk_v2/python" + Push-Location "$(repoRoot)/sdk_v2/python" try { # Override pythonpath = ["src"] from pyproject.toml so pytest # imports the installed wheel (which contains the compiled cffi diff --git a/sdk_v2/DEVELOPMENT.md b/sdk_v2/DEVELOPMENT.md index bc8afb6c..6ce486d4 100644 --- a/sdk_v2/DEVELOPMENT.md +++ b/sdk_v2/DEVELOPMENT.md @@ -69,6 +69,11 @@ install per-SDK package dependencies on first run: | Python | `python -m pip install -e .[dev]` (compiles the cffi extension; needs MSVC/Clang) → `python -m pytest test/`. | | JS | `npm install` (runs `node-gyp` against the C++ build output) → `npm run build` → `npm test` (vitest). | +In CI, the shared `test-data-shared` cache is checked out from +`AIFoundryLocal/test-data-shared` in the same ADO org that runs the Foundry +Local Packaging pipeline, so sdk_v2 jobs no longer depend on the older +`windows.ai.toolkit` org path. + ## Common knobs ```powershell