|
| 1 | +jobs: |
| 2 | +- job: Windows_CI_Dev |
| 3 | + variables: |
| 4 | + buildDirectory: '$(Build.BinariesDirectory)' |
| 5 | + steps: |
| 6 | + - template: templates/set-test-data-variables-step.yml |
| 7 | + - task: NuGetCommand@2 |
| 8 | + displayName: 'NuGet restore' |
| 9 | + inputs: |
| 10 | + restoreSolution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln' |
| 11 | + feedsToUse: config |
| 12 | + nugetConfigPath: '$(Build.SourcesDirectory)\csharp\Nuget.CSharp.config' |
| 13 | + restoreDirectory: '$(Build.SourcesDirectory)\csharp' |
| 14 | + - task: UniversalPackages@0 |
| 15 | + displayName: 'Download python' |
| 16 | + inputs: |
| 17 | + command: download |
| 18 | + vstsFeed: '$(System.TeamProject)' |
| 19 | + vstsFeedPackage: 'miniconda3_win64' |
| 20 | + vstsPackageVersion: '4.5.11' |
| 21 | + downloadDirectory: '$(Build.BinariesDirectory)\python' |
| 22 | + - task: CmdLine@1 |
| 23 | + displayName: 'Run python installer' |
| 24 | + inputs: |
| 25 | + filename: '$(Build.BinariesDirectory)\python\installer.exe' |
| 26 | + arguments: '/S /NoRegistry=1 /AddToPath=0 /RegisterPython=0 /D=$(Build.BinariesDirectory)\packages\python' |
| 27 | + timeoutInMinutes: 10 |
| 28 | + - task: BatchScript@1 |
| 29 | + displayName: 'setup env' |
| 30 | + inputs: |
| 31 | + filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\setup_env.bat' |
| 32 | + modifyEnvironment: true |
| 33 | + workingFolder: '$(Build.BinariesDirectory)' |
| 34 | + - task: CmdLine@1 |
| 35 | + displayName: 'Install conda modules' |
| 36 | + inputs: |
| 37 | + filename: '$(Build.BinariesDirectory)\packages\python\scripts\conda.exe' |
| 38 | + arguments: 'install -q --insecure -y pyopenssl setuptools wheel numpy' |
| 39 | + timeoutInMinutes: 10 |
| 40 | + |
| 41 | + - task: CmdLine@1 |
| 42 | + displayName: 'Download cmake' |
| 43 | + inputs: |
| 44 | + filename: '$(Build.BinariesDirectory)\packages\python\python.exe' |
| 45 | + arguments: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\download_cmake.py --build_dir $(Build.BinariesDirectory)' |
| 46 | + - task: CmdLine@1 |
| 47 | + displayName: 'Download test data and generate cmake config' |
| 48 | + inputs: |
| 49 | + filename: '$(Build.BinariesDirectory)\packages\python\python.exe' |
| 50 | + arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug Release --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 --enable_pybind --use_mkldnn --use_mklml --use_openmp --build_shared_lib --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --update' |
| 51 | + workingDirectory: "$(Build.BinariesDirectory)" |
| 52 | + |
| 53 | + - task: VSBuild@1 |
| 54 | + displayName: 'Build Debug' |
| 55 | + inputs: |
| 56 | + solution: '$(Build.BinariesDirectory)\Debug\onnxruntime.sln' |
| 57 | + platform: 'x64' |
| 58 | + configuration: 'Debug' |
| 59 | + msbuildArgs: '/m' |
| 60 | + msbuildArchitecture: 'x64' |
| 61 | + logProjectEvents: true |
| 62 | + workingFolder: '$(Build.BinariesDirectory)\Debug' |
| 63 | + - task: BatchScript@1 |
| 64 | + displayName: 'Test Debug' |
| 65 | + inputs: |
| 66 | + filename: '$(Build.BinariesDirectory)\packages\python\python.exe' |
| 67 | + arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --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 --enable_pybind --use_mkldnn --use_mklml --use_openmp --build_shared_lib --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --test' |
| 68 | + workingFolder: '$(Build.BinariesDirectory)' |
| 69 | + - task: VSBuild@1 |
| 70 | + displayName: 'Build C# Debug' |
| 71 | + inputs: |
| 72 | + solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln' |
| 73 | + platform: 'any cpu' |
| 74 | + configuration: 'Debug' |
| 75 | + restoreNugetPackages: false |
| 76 | + msbuildArchitecture: 'x64' |
| 77 | + workingFolder: '$(Build.SourcesDirectory)\csharp' |
| 78 | + msbuildArgs: '/m /p:OnnxRuntimeBuildDirectory=$(Build.BinariesDirectory)' |
| 79 | + |
| 80 | + - task: VSTest@2 |
| 81 | + displayName: 'VsTest - C# Debug' |
| 82 | + inputs: |
| 83 | + testAssemblyVer2: '**\bin\Debug\**\*Tests.dll' |
| 84 | + searchFolder: '$(Build.SourcesDirectory)\csharp\test' |
| 85 | + runInParallel: true |
| 86 | + configuration: Debug |
| 87 | + |
| 88 | + - task: VSBuild@1 |
| 89 | + displayName: 'Build Release' |
| 90 | + inputs: |
| 91 | + solution: '$(Build.BinariesDirectory)\Release\onnxruntime.sln' |
| 92 | + platform: 'x64' |
| 93 | + configuration: 'Release' |
| 94 | + msbuildArgs: '/m' |
| 95 | + msbuildArchitecture: 'x64' |
| 96 | + logProjectEvents: true |
| 97 | + workingFolder: '$(Build.BinariesDirectory)\Release' |
| 98 | + - task: BatchScript@1 |
| 99 | + displayName: 'Test Release' |
| 100 | + inputs: |
| 101 | + filename: '$(Build.BinariesDirectory)\packages\python\python.exe' |
| 102 | + arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Release --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 --enable_pybind --use_mkldnn --use_mklml --use_openmp --build_shared_lib --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --test' |
| 103 | + workingFolder: "$(Build.BinariesDirectory)" |
| 104 | + |
| 105 | + - task: VSBuild@1 |
| 106 | + displayName: 'Build c# Release' |
| 107 | + inputs: |
| 108 | + solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln' |
| 109 | + platform: 'any cpu' |
| 110 | + configuration: 'Release' |
| 111 | + msbuildArchitecture: 'x64' |
| 112 | + restoreNugetPackages: false |
| 113 | + workingFolder: '$(Build.SourcesDirectory)\csharp' |
| 114 | + msbuildArgs: '/m /p:OnnxRuntimeBuildDirectory=$(Build.BinariesDirectory)' |
| 115 | + |
| 116 | + - task: VSTest@2 |
| 117 | + displayName: 'VsTest - C# Release' |
| 118 | + inputs: |
| 119 | + testAssemblyVer2: '**\bin\Release\**\*Tests.dll' |
| 120 | + searchFolder: '$(Build.SourcesDirectory)\csharp\test' |
| 121 | + runInParallel: true |
| 122 | + configuration: Release |
| 123 | + |
| 124 | + - task: PublishTestResults@2 |
| 125 | + displayName: 'Publish unit test results' |
| 126 | + inputs: |
| 127 | + testResultsFiles: '**\*.results.xml' |
| 128 | + searchFolder: '$(Build.BinariesDirectory)' |
| 129 | + testRunTitle: 'Unit Test Run' |
| 130 | + condition: succeededOrFailed() |
| 131 | + |
| 132 | + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 |
| 133 | + displayName: 'Component Detection' |
| 134 | + |
| 135 | + - template: templates/clean-agent-build-directory-step.yml |
0 commit comments