Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ jobs:
clean: true
submodules: none

- task: UsePythonVersion@0
inputs:
- template: templates/setup-feeds-and-python-steps.yml
parameters:
versionSpec: '3.12'
addToPath: true
architecture: 'x64'

- template: templates/get-docker-image-steps.yml
Expand Down
14 changes: 4 additions & 10 deletions tools/ci_build/github/azure-pipelines/nuget/templates/test_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,9 @@ stages:
value: '-Dorg.gradle.daemon=false'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
addToPath: true
architecture: x64
- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'
- template: ../../templates/setup-feeds-and-python-steps.yml
parameters:
architecture: 'x64'

- task: NuGetToolInstaller@0
displayName: Use Nuget 6.10.x
Expand All @@ -69,7 +63,7 @@ stages:
- download: build
displayName: 'Download Nuget'
artifact: 'drop-signed-nuget-${{ parameters.ArtifactSuffix }}'


- template: get-nuget-package-version-as-variable.yml
parameters:
Expand Down
15 changes: 6 additions & 9 deletions tools/ci_build/github/azure-pipelines/post-merge-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,9 @@ stages:
- checkout: self
submodules: false

- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
addToPath: true
architecture: x64
- template: templates/setup-feeds-and-python-steps.yml
parameters:
architecture: 'x64'

- task: CmdLine@2
displayName: 'Run build_custom_android_package.py'
Expand Down Expand Up @@ -432,11 +430,10 @@ stages:
vmImage: "macOS-14"

steps:
- task: UsePythonVersion@0
inputs:
- template: templates/setup-feeds-and-python-steps.yml
parameters:
versionSpec: "3.12"
addToPath: true
architecture: "x64"
architecture: 'x64'

- template: templates/use-xcode-version.yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ jobs:
ANDROID_AVD_HOME: $(Agent.TempDirectory)
timeoutInMinutes: 90
steps:
- task: UsePythonVersion@0
displayName: Use python 3.12
inputs:
versionSpec: "3.12"
addToPath: true
architecture: "x64"
- template: ../../templates/setup-feeds-and-python-steps.yml
parameters:
architecture: 'x64'

- task: JavaToolInstaller@0
displayName: Use jdk 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ stages:
steps:
- checkout: self
submodules: true

- template: ../templates/setup-feeds-and-python-steps.yml

- template: ../templates/flex-downloadPipelineArtifact.yml
parameters:
StepName: 'Download Pipeline Artifact - NuGet'
Expand Down Expand Up @@ -72,16 +75,6 @@ stages:
SpecificArtifact: ${{ parameters.SpecificArtifact }}
BuildId: ${{ parameters.BuildId }}

- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: 3.12

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'

- template: ../templates/set-version-number-variables-step.yml

# Reconstruct the build dir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ stages:
- name: CUDA_VERSION
value: ${{ parameters.CudaVersion }}
steps:
- template: ../templates/setup-feeds-and-python-steps.yml
- template: ../templates/set-version-number-variables-step.yml
- task: UsePythonVersion@0
displayName: Use Python 3.12
inputs:
versionSpec: 3.12
- template: ../templates/get-docker-image-steps.yml
parameters:
Dockerfile: tools/ci_build/github/linux/docker/inference/x86_64/default/cuda${{ variables.CUDA_VERSION_MAJOR }}/Dockerfile
Expand Down Expand Up @@ -90,10 +87,7 @@ stages:
- checkout: self
clean: true
submodules: recursive
- task: UsePythonVersion@0
displayName: Use Python 3.12
inputs:
versionSpec: 3.12
- template: ../templates/setup-feeds-and-python-steps.yml
- template: ../templates/get-docker-image-steps.yml
parameters:
Dockerfile: tools/ci_build/github/linux/docker/inference/x86_64/default/cuda${{ variables.CUDA_VERSION_MAJOR }}/Dockerfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ stages:
- checkout: onnxruntime-inference-examples # due to checkout multiple repos, the root directory is $(Build.SourcesDirectory)/onnxruntime-inference-examples
submodules: false

- template: ../templates/setup-feeds-and-python-steps.yml

- script: dir $(Build.SourcesDirectory)
- template: ../templates/jobs/download_win_gpu_library.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,11 @@ stages:
clean: true
submodules: none

- task: UsePythonVersion@0
inputs:
- template: ../templates/setup-feeds-and-python-steps.yml
parameters:
versionSpec: ${{ parameters.PYTHON_VERSION }}
addToPath: true
architecture: 'x64'

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'

- template: ../templates/jobs/download_win_gpu_library.yml
parameters:
CudaVersion: ${{ parameters.CudaVersion }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,11 @@ stages:
clean: true
submodules: none

- task: UsePythonVersion@0
inputs:
- template: ../templates/setup-feeds-and-python-steps.yml
parameters:
versionSpec: ${{ parameters.PYTHON_VERSION }}
addToPath: true
architecture: 'x64'

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'

- script: python -m pip install -r $(Build.SourcesDirectory)\tools\ci_build\github\windows\python\requirements.txt
env:
TMPDIR: "$(Agent.TempDirectory)"
Expand Down
11 changes: 1 addition & 10 deletions tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,7 @@ stages:
DisplayName: 'ESRP - Sign C# dlls'
DoEsrp: true

- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: 3.12

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'

- template: setup-feeds-and-python-steps.yml

- task: MSBuild@1
displayName: 'Build Nuget Packages'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ jobs:
clean: true
submodules: none

- ${{ if eq(parameters.OnnxruntimeArch, 'x64') }}:
# Only need to install Python on x64 agents as Python is pre-installed on arm64 agents
- task: UsePythonVersion@0
displayName: Use Python 3.12
inputs:
versionSpec: 3.12
# Authenticate to Lotus to pull pip in UsePythonVersion task
- template: ../templates/setup-feeds-and-python-steps.yml
parameters:
architecture: ${{ parameters.OnnxruntimeArch }}

- template: set-version-number-variables-step.yml
- ${{ if eq(parameters.OnnxruntimeArch, 'x64') }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ parameters:
type: string

steps:
- task: UsePythonVersion@0
inputs:

- template: setup-feeds-and-python-steps.yml
parameters:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'


- task: PythonScript@0
displayName: 'Check test result yml'
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,7 @@ stages:
artifactName: 'onnxruntime-osx'
targetPath: '$(Build.BinariesDirectory)/osx'

- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
addToPath: true

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'
- template: setup-feeds-and-python-steps.yml

- task: PowerShell@2
displayName: 'Create osx directories'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ steps:
SecretsFilter: "java-pgp-pwd,java-pgp-key"
RunAsPreJob: false

- task: UsePythonVersion@0
displayName: "Use Python 3.12"
inputs:
versionSpec: "3.12"
- template: setup-feeds-and-python-steps.yml

- task: PythonScript@0
displayName: "Sign files: GnuPG, sha1, and md5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ steps:
- checkout: self
submodules: false

- task: UsePythonVersion@0
inputs:
- template: setup-feeds-and-python-steps.yml
parameters:
versionSpec: '3.13'
addToPath: true

- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Lotus'

- template: set-version-number-variables-step.yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ jobs:
git submodule update --init --recursive
workingDirectory: '$(Build.SourcesDirectory)'
displayName: 'Checkout submodules'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
addToPath: true
- template: templates/setup-feeds-and-python-steps.yml
parameters:
versionSpec: "3.12"
architecture: $(buildArch)
- task: NodeTool@0
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,35 @@ parameters:
steps:
- task: PowerShell@2
displayName: 'Build and Package Java Artifacts'
env:
msbuild_platform: ${{ parameters.msbuildPlatform }}
java_artifact_id: ${{ parameters.java_artifact_id }}
pre_release_version_suffix_string: ${{ parameters.PreReleaseVersionSuffixString }}
pre_release_version_suffix_number: ${{ parameters.PreReleaseVersionSuffixNumber }}
build_only: ${{ parameters.buildOnly }}
inputs:
targetType: 'inline'
script: |
# Define arguments for the Python script
$scriptArgs = @(
"--sources-dir", "$(Build.SourcesDirectory)",
"--binaries-dir", "$(Build.BinariesDirectory)",
"--platform", "${{ parameters.msbuildPlatform }}",
"--build-config", "RelWithDebInfo",
"--java-artifact-id", "${{ parameters.java_artifact_id }}",
"--pre-release-version-suffix-string", "${{ parameters.PreReleaseVersionSuffixString }}",
"--pre-release-version-suffix-number", "${{ parameters.PreReleaseVersionSuffixNumber }}",
"--commit-hash", "$(OnnxRuntimeGitCommitHash)"
"--sources-dir", "${env:BUILD_SOURCESDIRECTORY}",
"--binaries-dir", "${env:BUILD_BINARIESDIRECTORY}",
"--platform", "${env:msbuild_platform}",
"--build-config", "RelWithDebInfo",
"--java-artifact-id", "${env:java_artifact_id}",
"--pre-release-version-suffix-string", "${env:pre_release_version_suffix_string}",
"--pre-release-version-suffix-number", "${env:pre_release_version_suffix_number}",
"--commit-hash", "${env:ONNXRUNTIMEGITCOMMITHASH}"
)

# Conditionally add the --build-only flag if the parameter is true
if ('${{ parameters.buildOnly }}' -eq 'True') {
if (${env:build_only} -eq 'True') {
$scriptArgs += "--build-only"
}

# Define the path to the python script within your repository
$scriptPath = "$(Build.SourcesDirectory)/tools/ci_build/manage_java_artifacts.py"
$scriptPath = "${env:BUILD_SOURCESDIRECTORY}/tools/ci_build/manage_java_artifacts.py"

# Execute the Python script, passing all arguments
Write-Host "Executing Python script: $scriptPath with arguments: $($scriptArgs -join ' ')"
python $scriptPath $scriptArgs
python $scriptPath $scriptArgs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ stages:
steps:
- template: set-version-number-variables-step.yml

- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: 3.12
- template: setup-feeds-and-python-steps.yml

- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact - win-x64'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ stages:
- checkout: self
submodules: false

- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
addToPath: true
- template: setup-feeds-and-python-steps.yml

- template: set-version-number-variables-step.yml

Expand Down Expand Up @@ -130,5 +127,3 @@ stages:
packageParentPath: '$(Build.BinariesDirectory)'
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
allowPackageConflicts: true


Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ jobs:
steps:
- checkout: none

- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
- template: setup-feeds-and-python-steps.yml
parameters:
versionSpec: $(PythonVersion)

- download: build # pipeline resource identifier.
Expand Down
Loading
Loading