Skip to content

Commit 892e608

Browse files
author
Sayan Shaw
committed
Merge branch 'main' of https://github.com/microsoft/onnxruntime-extensions into sayanshaw/qwen2-5-vl
2 parents 3cf6969 + 9ea10e1 commit 892e608

File tree

2 files changed

+56
-52
lines changed

2 files changed

+56
-52
lines changed

.pipelines/ci.yml

Lines changed: 35 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,10 @@ stages:
4545
ort.version: '1.18.1'
4646

4747
steps:
48-
- task: DownloadGitHubRelease@0
49-
inputs:
50-
connection: 'microsoft'
51-
userRepository: 'microsoft/onnxruntime'
52-
defaultVersionType: 'specificTag'
53-
version: 'v$(ort.version)'
54-
itemPattern: '*-linux-x64-$(ort.version)*'
55-
downloadPath: '$(Build.SourcesDirectory)'
56-
displayName: Download the ONNXRuntime prebuilt package.
48+
- template: templates/download-file.yml
49+
parameters:
50+
url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort.version)/onnxruntime-linux-x64-$(ort.version).tgz"
51+
outputFilePath: "$(Build.SourcesDirectory)/onnxruntime-linux-x64-$(ort.version).tgz"
5752

5853
- task: ExtractFiles@1
5954
inputs:
@@ -234,15 +229,10 @@ stages:
234229
- script: brew install libomp
235230
displayName: 'Install omp'
236231

237-
- task: DownloadGitHubRelease@0
238-
inputs:
239-
connection: 'microsoft'
240-
userRepository: 'microsoft/onnxruntime'
241-
defaultVersionType: 'specificTag'
242-
version: 'v$(ort.version)'
243-
itemPattern: '$(ort.dirname)*'
244-
downloadPath: '$(Build.SourcesDirectory)'
245-
displayName: Download the ONNXRuntime prebuilt package.
232+
- template: templates/download-file.yml
233+
parameters:
234+
url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort.version)/onnxruntime-osx-x86_64-$(ort.version).tgz"
235+
outputFilePath: "$(Build.SourcesDirectory)/onnxruntime-osx-x86_64-$(ort.version).tgz"
246236

247237
- task: ExtractFiles@1
248238
inputs:
@@ -353,15 +343,18 @@ stages:
353343
ort.version: '1.15.1'
354344

355345
steps:
356-
- task: DownloadGitHubRelease@0
346+
- task: UsePythonVersion@0
357347
inputs:
358-
connection: 'microsoft'
359-
userRepository: 'microsoft/onnxruntime'
360-
defaultVersionType: 'specificTag'
361-
version: 'v$(ort.version)'
362-
itemPattern: '*-win-x64-$(ort.version)*'
363-
downloadPath: '$(Build.SourcesDirectory)'
364-
displayName: Download the ONNXRuntime prebuilt package.
348+
versionSpec: '3.12'
349+
disableDownloadFromRegistry: true
350+
addToPath: true
351+
architecture: 'x64'
352+
displayName: Use ADO python task
353+
354+
- template: templates/download-file.yml
355+
parameters:
356+
url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort.version)/onnxruntime-win-x64-$(ort.version).zip"
357+
outputFilePath: "$(Build.SourcesDirectory)/onnxruntime-win-x64-$(ort.version).zip"
365358

366359
- task: ExtractFiles@1
367360
inputs:
@@ -506,6 +499,14 @@ stages:
506499
ORT_VERSION: '1.17.1'
507500
timeoutInMinutes: 120
508501
steps:
502+
- task: UsePythonVersion@0
503+
inputs:
504+
versionSpec: '3.12'
505+
disableDownloadFromRegistry: true
506+
addToPath: true
507+
architecture: 'x64'
508+
displayName: Use ADO python task
509+
509510
- template: templates/set_winenv.yml
510511
parameters:
511512
EnvSetupScript: 'set_env_cuda.bat'
@@ -517,15 +518,10 @@ stages:
517518
where nvcc
518519
displayName: check cuda version
519520
520-
- task: DownloadGitHubRelease@0
521-
inputs:
522-
connection: 'microsoft'
523-
userRepository: 'microsoft/onnxruntime'
524-
defaultVersionType: 'specificTag'
525-
version: 'v$(ORT_VERSION)'
526-
itemPattern: '*-win-x64-gpu-$(ORT_VERSION)*'
527-
downloadPath: '$(Build.SourcesDirectory)'
528-
displayName: Download the ONNXRuntime prebuilt package.
521+
- template: templates/download-file.yml
522+
parameters:
523+
url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ORT_VERSION)/onnxruntime-win-x64-gpu-$(ORT_VERSION).zip"
524+
outputFilePath: "$(Build.SourcesDirectory)/onnxruntime-win-x64-gpu-$(ORT_VERSION).zip"
529525

530526
- task: ExtractFiles@1
531527
inputs:
@@ -548,14 +544,6 @@ stages:
548544
ctest -C RelWithDebInfo --output-on-failure
549545
displayName: Run C++ native tests
550546
551-
- task: UsePythonVersion@0
552-
inputs:
553-
versionSpec: '3.12'
554-
disableDownloadFromRegistry: true
555-
addToPath: true
556-
architecture: 'x64'
557-
displayName: Use ADO python task
558-
559547
- script: |
560548
set CUDA_PATH=$(Agent.TempDirectory)\v11.8
561549
python -m pip install --upgrade setuptools pip
@@ -604,15 +592,10 @@ stages:
604592
versionSpec: '3.12'
605593
addToPath: true
606594

607-
- task: DownloadGitHubRelease@0
608-
inputs:
609-
connection: 'microsoft'
610-
userRepository: 'microsoft/onnxruntime'
611-
defaultVersionType: 'specificTag'
612-
version: 'v$(ORT_VERSION)'
613-
itemPattern: '*-linux-x64-gpu-$(ORT_VERSION)*'
614-
downloadPath: '$(Build.SourcesDirectory)'
615-
displayName: Download the ONNXRuntime prebuilt package.
595+
- template: templates/download-file.yml
596+
parameters:
597+
url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ORT_VERSION)/onnxruntime-linux-x64-gpu-$(ORT_VERSION).tgz"
598+
outputFilePath: "$(Build.SourcesDirectory)/onnxruntime-linux-x64-gpu-$(ORT_VERSION).tgz"
616599

617600
- task: ExtractFiles@1
618601
inputs:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Downloads a file from `url` and saves it to `outputFilePath`.
2+
parameters:
3+
- name: url
4+
type: string
5+
- name: outputFilePath
6+
type: string
7+
8+
steps:
9+
- task: PythonScript@0
10+
inputs:
11+
scriptSource: inline
12+
script: |
13+
import sys
14+
import urllib.request
15+
16+
url = sys.argv[1]
17+
output_file_path = sys.argv[2]
18+
19+
urllib.request.urlretrieve(url, filename=output_file_path)
20+
arguments: '"${{ parameters.url }}" "${{ parameters.outputFilePath }}"'
21+
displayName: "Download file from URL: ${{ parameters.url }}"

0 commit comments

Comments
 (0)