1
1
jobs :
2
- - template : templates/win-ci.yml
3
- parameters :
4
- AgentPool : ' Win-CPU'
5
- DoDebugBuild : ' true'
6
- DoCompliance : ' false'
7
- BuildCommand : ' $(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --use_tvm --use_automl --enable_pybind --use_mkldnn --use_openmp --build_shared_lib --build_csharp --enable_onnx_tests'
8
- JobName : ' Windows_CI_Dev'
9
- DoNugetPack : ' false'
10
- NuPackScript : ' '
11
- DoTestCoverage : ' false'
2
+ - job : ' build'
3
+ pool : ' Win-CPU-2019'
4
+ strategy :
5
+ maxParallel : 2
6
+ matrix :
7
+ debug :
8
+ BuildConfig : ' Debug'
9
+ release :
10
+ BuildConfig : ' RelWithDebInfo'
11
+ variables :
12
+ OrtPackageId : ' Microsoft.ML.OnnxRuntime'
13
+ MsbuildArguments : ' -detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary'
14
+ OnnxRuntimeBuildDirectory : ' $(Build.BinariesDirectory)'
15
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
16
+ EnvSetupScript : setup_env.bat
17
+ buildArch : x64
18
+ setVcvars : true
19
+ timeoutInMinutes : 60
20
+ workspace :
21
+ clean : all
22
+ steps :
23
+ - task : UsePythonVersion@0
24
+ inputs :
25
+ versionSpec : ' 3.7'
26
+ addToPath : true
27
+ architecture : $(buildArch)
28
+
29
+ - task : PythonScript@0
30
+ displayName : ' Generate cmake config'
31
+ inputs :
32
+ scriptPath : ' $(Build.SourcesDirectory)\tools\ci_build\build.py'
33
+ arguments : ' --config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "Visual Studio 16 2019" --build_wheel --use_automl --use_mkldnn --use_openmp --build_shared_lib --enable_onnx_tests'
34
+ workingDirectory : ' $(Build.BinariesDirectory)'
35
+
36
+ - task : VSBuild@1
37
+ displayName : ' Build'
38
+ inputs :
39
+ solution : ' $(Build.BinariesDirectory)\$(BuildConfig)\onnxruntime.sln'
40
+ platform : ' x64'
41
+ configuration : $(BuildConfig)
42
+ msbuildArgs : $(MsbuildArguments)
43
+ msbuildArchitecture : $(buildArch)
44
+ maximumCpuCount : true
45
+ logProjectEvents : false
46
+ workingFolder : ' $(Build.BinariesDirectory)\$(BuildConfig)'
47
+ createLogFile : true
48
+
49
+ - task : PythonScript@0
50
+ displayName : ' Build wheel'
51
+ inputs :
52
+ scriptPath : ' $(Build.SourcesDirectory)\setup.py'
53
+ arguments : ' bdist_wheel'
54
+ workingDirectory : ' $(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
55
+
56
+ - template : templates/set-test-data-variables-step.yml
57
+
58
+ - task : NuGetToolInstaller@0
59
+ displayName : Use Nuget 4.9
60
+ inputs :
61
+ versionSpec : 4.9.4
62
+
63
+ - task : PowerShell@2
64
+ displayName : ' Download AzCopy (used for download test data script)'
65
+ inputs :
66
+ targetType : ' inline'
67
+ script : |
68
+ Invoke-WebRequest -OutFile $(Build.BinariesDirectory)\azcopy.exe https://onnxruntimetestdata.blob.core.windows.net/models/azcopy.exe
69
+
70
+ - task : BatchScript@1
71
+ displayName : ' setup env'
72
+ inputs :
73
+ filename : ' $(Build.SourcesDirectory)\tools\ci_build\github\windows\$(EnvSetupScript)'
74
+ modifyEnvironment : true
75
+ workingFolder : ' $(Build.BinariesDirectory)'
76
+
77
+ - script : |
78
+ python -m pip install -q pyopenssl setuptools wheel numpy
79
+
80
+ workingDirectory: '$(Build.BinariesDirectory)'
81
+ displayName: 'Install python modules'
82
+
83
+ - task : PythonScript@0
84
+ displayName : ' Download test data'
85
+ inputs :
86
+ scriptPath : ' $(Build.SourcesDirectory)\tools\ci_build\github\download_test_data.py'
87
+ arguments : --test_data_url $(TestDataUrl) --build_dir $(Build.BinariesDirectory)
88
+ workingDirectory : $(Build.BinariesDirectory)
89
+
90
+ - task : DotNetCoreCLI@2
91
+ displayName : ' Restore nuget packages'
92
+ inputs :
93
+ command : restore
94
+ projects : ' $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
95
+ configuration : ' $(BuildConfig)'
96
+ arguments : ' --configuration $(BuildConfig) -p:Platform="Any CPU" -p:OrtPackageId=$(OrtPackageId)'
97
+ workingDirectory : ' $(Build.SourcesDirectory)\csharp'
98
+
99
+ - ${{ if eq(variables['BuildConfig'], 'RelWithDebInfo') }} :
100
+ - task : DotNetCoreCLI@2
101
+ displayName : ' Test C#'
102
+ inputs :
103
+ command : test
104
+ projects : ' $(Build.SourcesDirectory)\csharp\test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj'
105
+ configuration : ' $(BuildConfig)'
106
+ arguments : ' --configuration $(BuildConfig) -p:Platform="Any CPU" -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId)'
107
+ workingDirectory : ' $(Build.SourcesDirectory)\csharp'
108
+
109
+ - script : |
110
+ mklink /D /J $(Build.BinariesDirectory)\$(BuildConfig)\models $(Build.BinariesDirectory)\models
111
+ DIR dist\ /S /B > wheel_filename_file
112
+ set /p WHEEL_FILENAME=<wheel_filename_file
113
+ del wheel_filename_file
114
+ python.exe -m pip install -q --upgrade %WHEEL_FILENAME%
115
+ python $(Build.SourcesDirectory)\tools\ci_build\build.py --config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 16 2019" --use_mkldnn --build_wheel --enable_onnx_tests
116
+
117
+ workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
118
+ displayName: 'Run tests'
119
+
120
+
121
+ - task : ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
122
+ displayName : ' Component Detection'
123
+ condition : succeeded()
124
+
125
+ - template : templates/clean-agent-build-directory-step.yml
126
+
0 commit comments