Skip to content

Commit 1f6dc88

Browse files
authored
Migrate Zip-Nuget Package Pipeline to 1ES (#23609) Also, kleidail is disabled in MacOS and iOS packaging stage due to (#24152) (#24153)
NuGet_Packaging_CPU is broken due to similar issue from #23923 ### Description Migrate [Zip-Nuget Package Pipeline](https://aiinfra.visualstudio.com/Lotus/_build?definitionId=940&_a=summary) to 1ES ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> ### Check list - [x] Issue with onnxruntime-Win-CPU-2022 - [x] [Spot Bug](https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=697830&view=logs&j=6c6a898f-bbbb-5c72-8695-82b606149fa2&t=433f102b-5ed3-5fed-87a0-6107744ce9b1&l=81)
1 parent 25b06f2 commit 1f6dc88

18 files changed

+383
-374
lines changed

tools/ci_build/github/apple/default_full_ios_framework_build_settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"--build_apple_framework",
1919
"--use_coreml",
2020
"--skip_tests",
21+
"--no_kleidiai",
2122
"--cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF"
2223
],
2324
"iphoneos": [

tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml

Lines changed: 125 additions & 199 deletions
Large diffs are not rendered by default.

tools/ci_build/github/azure-pipelines/nodejs/templates/test_linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ stages:
1919
- name: OnnxRuntimeBuildDirectory
2020
value: '$(Build.BinariesDirectory)'
2121
steps:
22+
- task: NodeTool@0
23+
inputs:
24+
versionSpec: '20.x'
2225
- template: test.yml

tools/ci_build/github/azure-pipelines/nodejs/templates/test_macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ stages:
1111
clean: all
1212
timeoutInMinutes: 120
1313
pool:
14-
vmImage: 'macOS-14'
14+
name: 'Azure Pipelines'
15+
image: 'macOS-14'
16+
os: 'macOS'
1517

1618
variables:
1719
- name: OnnxRuntimeBuildDirectory

tools/ci_build/github/azure-pipelines/nuget/templates/dml-vs-2022.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
parameters:
33
DoDebugBuild: 'true' # Unused. Use BuildConfigurations instead.
4-
DoCompliance: 'false'
54
BuildCommand: ''
65
StageName: 'Windows_CI_Dev'
76
DoNugetPack: 'false'
@@ -144,7 +143,7 @@ stages:
144143
displayName: 'Create NuGet Package'
145144
failOnStderr: true
146145
147-
- task: PublishPipelineArtifact@0
146+
- task: 1ES.PublishPipelineArtifact@1
148147
displayName: 'Publish Pipeline Artifact: ${{ parameters.ArtifactName }}'
149148
inputs:
150149
artifactName: ${{ parameters.ArtifactName }}
@@ -182,7 +181,7 @@ stages:
182181
workingDirectory: '$(Build.SourcesDirectory)\js\node'
183182
displayName: 'Create NPM Package'
184183
185-
- task: PublishPipelineArtifact@0
184+
- task: 1ES.PublishPipelineArtifact@1
186185
displayName: 'Publish Pipeline Artifact: ${{ parameters.ArtifactName }}'
187186
inputs:
188187
artifactName: ${{ parameters.ArtifactName }}
@@ -208,17 +207,11 @@ stages:
208207
DisplayName: 'ESRP - Sign Node.js binding binaries'
209208
DoEsrp: ${{ parameters.DoEsrp }}
210209
Pattern: '*.node'
211-
- task: PublishPipelineArtifact@1
210+
- task: 1ES.PublishPipelineArtifact@1
212211
inputs:
213212
targetPath: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\${{ parameters.sln_platform }}'
214213
artifactName: 'drop-onnxruntime-nodejs-win-${{ parameters.sln_platform }}-dml'
215214

216-
217-
- ${{ if eq(parameters['DoCompliance'], 'true') }}:
218-
- template: ../../templates/compliance.yml
219-
parameters :
220-
msbuildPlatform: ${{ parameters.sln_platform }}
221-
222215
- template: ../../templates/component-governance-component-detection-steps.yml
223216
parameters :
224217
condition : 'succeeded'

tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ stages:
1111
workspace:
1212
clean: all
1313
pool:
14-
vmImage: 'macOS-14'
14+
name: 'Azure Pipelines'
15+
image: 'macOS-14'
16+
os: 'macOS'
1517

1618
variables:
1719
- name: OnnxRuntimeBuildDirectory
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
parameters:
2+
- name: DoEsrp
3+
type: boolean
4+
default: true
5+
6+
stages:
7+
- stage: NuGet_Packaging_DML
8+
dependsOn:
9+
- Windows_CI_GPU_DML_Dev
10+
- Windows_CI_GPU_DML_Dev_x86
11+
- Windows_CI_GPU_DML_Dev_arm64
12+
condition: succeeded()
13+
jobs:
14+
- job: NuGet_Packaging_DML
15+
workspace:
16+
clean: all
17+
pool: 'onnxruntime-Win2022-GPU-dml-A10'
18+
steps:
19+
- task: DownloadPipelineArtifact@0
20+
displayName: 'Download Pipeline Artifact - NuGet DirectML'
21+
inputs:
22+
artifactName: 'drop-nuget-dml'
23+
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
24+
25+
- task: DownloadPipelineArtifact@0
26+
displayName: 'Download Pipeline Artifact - NuGet DirectML x86'
27+
inputs:
28+
artifactName: 'drop-win-dml-x86-zip'
29+
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
30+
31+
- task: DownloadPipelineArtifact@0
32+
displayName: 'Download Pipeline Artifact - NuGet DirectML arm64'
33+
inputs:
34+
artifactName: 'drop-win-dml-arm64-zip'
35+
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
36+
37+
- script: |
38+
pushd $(Build.BinariesDirectory)\nuget-artifact-dml
39+
dir
40+
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/unzip.exe -OutFile unzip.exe"
41+
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/zip.exe -OutFile zip.exe"
42+
set PATH=%CD%;%PATH%
43+
SETLOCAL EnableDelayedExpansion
44+
FOR /R %%i IN (*.nupkg) do (
45+
set filename=%%~ni
46+
IF NOT "!filename:~25,7!"=="Managed" (
47+
rename %%~ni.nupkg %%~ni.zip
48+
unzip %%~ni.zip -d %%~ni
49+
del /Q %%~ni.zip
50+
51+
unzip win-dml-x86.zip -d win-x86
52+
mkdir %%~ni\runtimes\win-x86
53+
mkdir %%~ni\runtimes\win-x86\native
54+
55+
move win-x86\runtimes\win-x86\native\onnxruntime.dll %%~ni\runtimes\win-x86\native\onnxruntime.dll
56+
move win-x86\runtimes\win-x86\native\onnxruntime.lib %%~ni\runtimes\win-x86\native\onnxruntime.lib
57+
move win-x86\runtimes\win-x86\native\onnxruntime.pdb %%~ni\runtimes\win-x86\native\onnxruntime.pdb
58+
59+
unzip win-dml-arm64.zip -d win-arm64
60+
mkdir %%~ni\runtimes\win-arm64
61+
mkdir %%~ni\runtimes\win-arm64\native
62+
63+
move win-arm64\runtimes\win-arm64\native\onnxruntime.dll %%~ni\runtimes\win-arm64\native\onnxruntime.dll
64+
move win-arm64\runtimes\win-arm64\native\onnxruntime.lib %%~ni\runtimes\win-arm64\native\onnxruntime.lib
65+
move win-arm64\runtimes\win-arm64\native\onnxruntime.pdb %%~ni\runtimes\win-arm64\native\onnxruntime.pdb
66+
67+
68+
pushd %%~ni
69+
zip -r ..\%%~ni.zip .
70+
popd
71+
move %%~ni.zip %%~ni.nupkg
72+
)
73+
)
74+
popd
75+
copy $(Build.BinariesDirectory)\nuget-artifact-dml\Microsoft.ML.OnnxRuntime.DirectML*nupkg $(Build.ArtifactStagingDirectory)
76+
displayName: 'Bundle DML NuGet and other binaries'
77+
78+
- template: ../templates/esrp_nuget.yml
79+
parameters:
80+
DisplayName: 'ESRP - sign NuGet package'
81+
FolderPath: '$(Build.ArtifactStagingDirectory)'
82+
DoEsrp: ${{ parameters.DoEsrp }}
83+
84+
- template: ../templates/validate-package.yml
85+
parameters:
86+
PackageType: 'nuget'
87+
PackagePath: '$(Build.ArtifactStagingDirectory)'
88+
PackageName: 'Microsoft.ML.OnnxRuntime.DirectML*nupkg'
89+
PlatformsSupported: 'win-x64,win-x86,win-arm64'
90+
VerifyNugetSigning: ${{ parameters.DoEsrp }}
91+
92+
- task: 1ES.PublishPipelineArtifact@1
93+
displayName: 'Publish Pipeline NuGet Artifact'
94+
inputs:
95+
artifactName: 'drop-signed-nuget-dml'
96+
targetPath: '$(Build.ArtifactStagingDirectory)'
97+
- template: ../templates/component-governance-component-detection-steps.yml
98+
parameters:
99+
condition: 'succeeded'

tools/ci_build/github/azure-pipelines/templates/android-java-api-aar-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ parameters:
2121

2222
jobs:
2323
- job: Final_AAR_Testing_Android
24-
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
24+
pool:
25+
name: 'onnxruntime-Ubuntu2204-AMD-CPU'
26+
os: linux
2527
workspace:
2628
clean: all
2729
variables:

0 commit comments

Comments
 (0)