mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-24 19:43:35 +00:00
* Update ONNX to 1.12 (#11924) Follow-ups that need to happen after this and before the next ORT release: * Support SequenceMap with https://github.com/microsoft/onnxruntime/pull/11731 * Support signal ops with https://github.com/microsoft/onnxruntime/pull/11778 Follow-ups that need to happen after this but don't necessarily need to happen before the release: * Implement LayerNormalization kernel for opset version 17: https://github.com/microsoft/onnxruntime/issues/11916 Fixes #11640 * Dll version fix ovep4.1 (#11953) * Setting default version values for ovep dlls as well * Update backend_manager.cc Co-authored-by: mayavijx <mayax.vijayan@intel.com> Co-authored-by: mohsin <mohsinx.mohammad@intel.com> * Optimize t5 encoder in beam search (#11926) * ooptimize t5 encoder * update * update * update * refactor expand impl * cuda tests passed * update * alignment * more alignments * review comments * Allow saving on CPU usage for infrequent inference requests by reducing thread spinning (#11841) Introduce Start/Stop threadpool spinning switch Add a session config option to force spinning stop at the end of the Run() * Restructure function inliner (#11731) * Add nested function call tests * Add overload for Specialize * Pass symboltable to onnx shape inference * Avoid renaming empty names * Enable sequence_map tests which failed before this change * Deprecate APIs returning raw ptrs and provide replacements (#11922) Provider better documentation * register signal ops for opset 17 (#11778) * Register signal ops for op set 17 Note code is mostly being moved, not added. These ops were previously only registered as Microsoft contrib ops and only built if `BUILD_MS_EXPERIMENTAL_OPS=1`. They've been added to the ai.onnx standard op set in version 17. Main components of this change: * Move the kernels from the conrib_ops directory to the core directory. * Add function bodies for ms experimental ops. This will allow old models that use the contrib ops to continue to function. All the function bodies consist of a single op (the new standard op), so performance overhead should be minimal. Minor clean-up also in this change: * De-duplicate get_scalar_value_from_tensor: put it in a new utils.h. * Fix some bugs that caused compilation errors with the experimental ops. Tested with `build.sh --ms_experimental` * Fix some spelling errors and lint violations. * Replace a couple of switch statements with `MLTypeCallDispatcher`. * Use `InlineVector` instead of `std::vector`. Unblocks https://github.com/microsoft/onnxruntime/issues/11640 * Include opset 15 in Conv+BatchNormalization fusion (#11960) * Fix WinML Tests are still targetting deprecated (deleted) experimental signal op definitions (#12006) * fix winml tests * remove legacy test * switch idft -> dft+inverse attr * upgrade opset 13->17 for signal ops tests * [C# Tests] Add support for double tensor output in TestPreTrainedModels. (#12008) Add support for double tensor output in TestPreTrainedModels. * DML EP ResNet50 opset 15 fails in ONNX checker for FusedBatchNormalization lacking training_mode attribute (#12010) FusedBatchNormalization include training_mode attribute * Generalize native op creation (#11539) * create op from ep * read input count from context * create holder to host nodes * fix typo * cast type before comparison * throw error on API fail * silence warning from minimal build * switch to unique_ptr with deleter to host nodes * fix typo * fix build err for minimal * fix build err for minimal * add UT for conv * enable test on CUDA * add comment * fix typo * use gsl::span and string view for Node constructor * Added two APIs - CopyKernelInfo and ReleaseKernelInfo * pass gsl::span by value * switch to span<NodeArg* const> to allow for reference to const containers * fix typo * fix reduced build err * fix reduced build err * refactoring node construction logic * rename exceptions * add input and output count as arguments for op creation * refactor static member * use ORT_CATCH instead of catch * cancel try catch * add static value name map * format input definition and set err code * fix comments * fix typo * [DML EP] Pad operator: Handle negative pad counts (#11974) * Pad fallback to CPU * Added queryPad in operatorRegistration.cpp * Acknowledged PR comments * Used any_of * used none_of instead of any_of Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com> * Add warning about future computation change for ConvTranspose with auto_pad (#11984) * Add warning about future computation change for Convtranspose with auto_pad * improve msg * update TODO to make lint happy * update more contents for warning and add if * valid was not infected * move it into kernel registration * parse auto_pad myself * try to use conv_transpose_attrs_.auto_pad directly * update roialign cuda impl to onnx opset16 (#12036) * roialign opset16 * fix * fix * Fix windows eager build break by pinning to torch version 1.11.0 (#12033) Fix windows and linux eager build to torch 1.11.0. * Skip Constant Folding for ops producing an optional type output (#11839) * Disable sequence-type tests since C# infra doesn't support well (#12037) * Extend lifetime of KernelDef when creating a standalone op (#12057) place tmp kernel def as local variable to cover the lifetime of kernel creation * Add targets files for new .net6 frameworks (#12016) * Add net6 targets. Remove maccatalyst as we don't have a native build targetting that. * Set platform in macos targets * Add targetFramework entries * Move NativeLib.DllName definition and set using preprocessor values for simplicity. Couldn't get it to build with the preprocessor based setup when it was in a separate file. Update the nuspec generation to set platform version for .net6 targets. TODO: Validate versions. I copied them from the managed nuget package the packaging pipeline generated prior to adding targets. Possibly w could/should lower some of the versions. Hopefully the need to specify a version goes away when the release version of VS2022 supports .net6. * Try android 31.1 as https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md suggests that should be available on the CI machines * Fix patch version mismatch Add some extra debug info in case it helps * Debug nuget location in CI * Add workspace entry back in * Add steps * One more attempt with hardcoded nuget.exe path and original android31.0 version * Better fix - found explicit nuget download and updated version there. * flake8 fixes * Fix black complaints. * Exit Microsoft_ML_OnnxRuntime_CheckPrerequisites for net6 iOS. * Removed outdated comment * Fix DML custom operators which set descriptor heap to command list (#12059) * Make C# runtest.sh automatically set latest opset (#12039) * Update C# runtest.sh for opset 17 Should have been part of https://github.com/microsoft/onnxruntime/pull/11924 * get appropriate opset version from onnx doc * use absolute rather than relative path * fix typo in var name * Disable DML command list reuse for Xbox (#12063) disable cl reuse for xbox * Add data type check in ConvAddRelu fusion (#12058) * Add undocumented attribute to disable generation of Java bindings from the Android AAR. (#12075) The generated bindings causes C# build errors that require workaround code. Disabling generation should avoid the need for any workarounds. As the user has the C# ORT package with the C# to C bindings there's no need for binding generation that calls the ORT Java API (which is C# -> Java ->C). * enable the extensions custom build for java and android (#11823) * generate quantization parameter for outputs (#12089) * DML EP Update to DML 1.9 (#12090) * Update to DML 1.9 * Appease obnoxious Python formatting tool * Fix orttraining-linux-ci-pipeline - Symbolic shape infer (#11965) fix symbolic shape error due to upgraded numpy + legacy sympy * check consumers of dq node before swap dq and transpose (#12099) * check consumers of dq node before swap dq and transpose * add unit test Co-authored-by: Gary Miguel <garymiguel@microsoft.com> Co-authored-by: Preetha Veeramalai <preetha.veeramalai@intel.com> Co-authored-by: mayavijx <mayax.vijayan@intel.com> Co-authored-by: mohsin <mohsinx.mohammad@intel.com> Co-authored-by: Ye Wang <52801275+wangyems@users.noreply.github.com> Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com> Co-authored-by: G. Ramalingam <grama@microsoft.com> Co-authored-by: Dwayne Robinson <dwayner@microsoft.com> Co-authored-by: Sheil Kumar <smk2007@gmail.com> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com> Co-authored-by: sumitsays <sumitagarwal330@gmail.com> Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com> Co-authored-by: Chun-Wei Chen <jacky82226@gmail.com> Co-authored-by: George Wu <jywu@microsoft.com> Co-authored-by: Wil Brady <25513670+WilBrady@users.noreply.github.com> Co-authored-by: Hariharan Seshadri <shariharan91@gmail.com> Co-authored-by: Wei-Sheng Chin <wschin@outlook.com> Co-authored-by: Scott McKay <skottmckay@gmail.com> Co-authored-by: Jeff Bloomfield <38966965+jeffbloo@users.noreply.github.com> Co-authored-by: Justin Stoecker <justoeck@microsoft.com> Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com> Co-authored-by: Yufeng Li <liyufeng1987@gmail.com> Co-authored-by: pengwa <pengwa@microsoft.com>
1074 lines
42 KiB
YAML
1074 lines
42 KiB
YAML
parameters:
|
|
- name: RunOnnxRuntimeTests
|
|
displayName: Run Tests?
|
|
type: boolean
|
|
default: true
|
|
|
|
- name: DoCompliance
|
|
displayName: Run Compliance Tasks?
|
|
type: boolean
|
|
default: true
|
|
|
|
- name: PublishingNuget
|
|
displayName: Publishing Nuget Packages and report binary size to mysql
|
|
type: boolean
|
|
default: true
|
|
|
|
- name: DoEsrp
|
|
displayName: Run code sign tasks? Must be true if you are doing an Onnx Runtime release.
|
|
type: boolean
|
|
default: false
|
|
|
|
- name: IsReleaseBuild
|
|
displayName: Is a release build? Set it to true if you are doing an Onnx Runtime release.
|
|
type: boolean
|
|
default: false
|
|
|
|
- name: AdditionalBuildFlags
|
|
displayName: Additional build flags for build.py
|
|
type: string
|
|
default: ''
|
|
|
|
- name: AdditionalWinBuildFlags
|
|
displayName: Additional build flags that just for Windows Builds
|
|
type: string
|
|
default: ''
|
|
|
|
- name: OrtNugetPackageId
|
|
displayName: Package name for nuget
|
|
type: string
|
|
default: 'Microsoft.ML.OnnxRuntime'
|
|
|
|
- name: BuildVariant
|
|
type: string
|
|
default: 'default'
|
|
|
|
jobs:
|
|
- template: c-api-linux-cpu.yml
|
|
parameters:
|
|
AdditionalBuildFlags: ${{ parameters.AdditionalBuildFlags }}
|
|
BaseImage: 'centos:7'
|
|
OnnxruntimeArch: 'x64'
|
|
OnnxruntimeCFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -O3 -Wl,--strip-all'
|
|
OnnxruntimeCXXFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -O3 -Wl,--strip-all'
|
|
OnnxruntimeNodejsBindingArch: 'x64'
|
|
|
|
- template: c-api-linux-cpu.yml
|
|
parameters:
|
|
AdditionalBuildFlags: ${{ parameters.AdditionalBuildFlags }}
|
|
BaseImage: 'arm64v8/centos:7'
|
|
OnnxruntimeArch: 'aarch64'
|
|
OnnxruntimeCFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -O3 -Wl,--strip-all'
|
|
OnnxruntimeCXXFlags: '-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -O3 -Wl,--strip-all'
|
|
OnnxruntimeNodejsBindingArch: 'arm64'
|
|
|
|
- job: MacOS_C_API_Packaging_CPU_x64
|
|
workspace:
|
|
clean: all
|
|
variables:
|
|
MACOSX_DEPLOYMENT_TARGET: '10.14'
|
|
pool:
|
|
vmImage: 'macOS-11'
|
|
timeoutInMinutes: 240
|
|
steps:
|
|
- template: set-version-number-variables-step.yml
|
|
|
|
- script: |
|
|
set -e
|
|
pushd .
|
|
cd $(Build.SourcesDirectory)/cmake/external/protobuf
|
|
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo
|
|
make -j$(getconf _NPROCESSORS_ONLN)
|
|
make install
|
|
popd
|
|
export PATH=$(Build.BinariesDirectory)/protobuf/bin:$PATH
|
|
export ONNX_ML=1
|
|
export CMAKE_ARGS="-DONNX_GEN_PB_TYPE_STUBS=OFF -DONNX_WERROR=OFF"
|
|
python3 -m pip install numpy==1.16.6 wheel
|
|
python3 -m pip install $(Build.SourcesDirectory)/cmake/external/onnx
|
|
sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
|
|
displayName: 'Build and Test MacOS'
|
|
|
|
- template: mac-packaging.yml
|
|
parameters :
|
|
AdditionalBuildFlags : ${{ parameters.AdditionalBuildFlags }} --build_java --build_nodejs --use_coreml --cmake_extra_defines CMAKE_OSX_ARCHITECTURES=arm64
|
|
MacosArch: arm64
|
|
BuildJava: true
|
|
BuildNodejs: true
|
|
|
|
- template: mac-packaging.yml
|
|
parameters :
|
|
AdditionalBuildFlags : ${{ parameters.AdditionalBuildFlags }} --use_coreml --cmake_extra_defines CMAKE_OSX_ARCHITECTURES="arm64;x86_64"
|
|
MacosArch: universal2
|
|
BuildJava: false
|
|
BuildNodejs: false
|
|
|
|
- template: mac-packaging.yml
|
|
parameters :
|
|
AdditionalBuildFlags : ${{ parameters.AdditionalBuildFlags }} --build_java --build_nodejs --use_coreml
|
|
MacosArch: x86_64
|
|
BuildJava: true
|
|
BuildNodejs: true
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
inputs:
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
artifactName: 'onnxruntime-osx'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
|
|
- template: android-java-api-aar.yml
|
|
parameters:
|
|
buildConfig: 'Release'
|
|
buildSettings: '$(Build.SourcesDirectory)/tools/ci_build/github/android/default_mobile_aar_build_settings.json'
|
|
includedOpsConfig: '$(Build.SourcesDirectory)/tools/ci_build/github/android/mobile_package.required_operators.config'
|
|
artifactName: 'onnxruntime-android-mobile-aar'
|
|
job_name_suffix: 'Mobile'
|
|
packageName: 'onnxruntime-mobile'
|
|
|
|
- template: android-java-api-aar.yml
|
|
parameters:
|
|
buildConfig: 'Release'
|
|
buildSettings: '$(Build.SourcesDirectory)/tools/ci_build/github/android/default_full_aar_build_settings.json'
|
|
artifactName: 'onnxruntime-android-full-aar'
|
|
job_name_suffix: 'Full'
|
|
publish_executables: '1'
|
|
|
|
- job: iOS_Full_xcframework
|
|
workspace:
|
|
clean: all
|
|
pool:
|
|
vmImage: 'macOS-11'
|
|
timeoutInMinutes: 180
|
|
steps:
|
|
- template: set-version-number-variables-step.yml
|
|
|
|
- script: |
|
|
/bin/bash $(Build.SourcesDirectory)/tools/ci_build/github/apple/build_host_protoc.sh \
|
|
$(Build.SourcesDirectory) \
|
|
$(Build.BinariesDirectory)/protobuf \
|
|
$(Build.BinariesDirectory)/protobuf_install
|
|
displayName: Build Host Protoc
|
|
|
|
- script: |
|
|
set -e -x
|
|
python3 tools/ci_build/github/apple/build_ios_framework.py \
|
|
--build_dir "$(Build.BinariesDirectory)/ios_framework" \
|
|
--path_to_protoc_exe $(Build.BinariesDirectory)/protobuf_install/bin/protoc \
|
|
tools/ci_build/github/apple/default_full_ios_framework_build_settings.json
|
|
mkdir $(Build.BinariesDirectory)/artifacts
|
|
mkdir -p $(Build.BinariesDirectory)/artifacts_staging/onnxruntime-ios-xcframework-$(OnnxRuntimeVersion)
|
|
cp -R $(Build.BinariesDirectory)/ios_framework/framework_out/onnxruntime.xcframework \
|
|
$(Build.BinariesDirectory)/artifacts_staging/onnxruntime-ios-xcframework-$(OnnxRuntimeVersion)
|
|
pushd $(Build.BinariesDirectory)/artifacts_staging
|
|
zip -vr $(Build.BinariesDirectory)/artifacts/onnxruntime_xcframework.zip \
|
|
onnxruntime-ios-xcframework-$(OnnxRuntimeVersion)
|
|
popd
|
|
displayName: "Build iOS xcframework"
|
|
|
|
- script: |
|
|
python3 tools/ci_build/github/apple/test_ios_packages.py \
|
|
--fail_if_cocoapods_missing \
|
|
--framework_info_file "$(Build.BinariesDirectory)/ios_framework/framework_info.json" \
|
|
--c_framework_dir "$(Build.BinariesDirectory)/ios_framework/framework_out" \
|
|
--variant Full
|
|
displayName: "Test iOS framework"
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.BinariesDirectory)/artifacts'
|
|
artifactName: 'onnxruntime-ios-full-xcframework'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
|
|
- template: win-ci.yml
|
|
parameters:
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
job_name_suffix: CPU_x86_${{ parameters.BuildVariant }}
|
|
EnvSetupScript: setup_env_x86.bat
|
|
buildArch: x86
|
|
msbuildPlatform: Win32
|
|
packageName: x86
|
|
buildparameter: ${{ parameters.AdditionalBuildFlags }} ${{ parameters.AdditionalWinBuildFlags}}
|
|
runTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
buildJava: false
|
|
buildNodejs: false
|
|
|
|
- template: win-ci.yml
|
|
parameters:
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
job_name_suffix: CPU_arm_${{ parameters.BuildVariant }}
|
|
EnvSetupScript: setup_env.bat
|
|
buildArch: x64
|
|
msbuildPlatform: arm
|
|
packageName: arm
|
|
buildparameter: --arm ${{ parameters.AdditionalBuildFlags }} ${{ parameters.AdditionalWinBuildFlags}}
|
|
runTests: false
|
|
buildJava: false
|
|
buildNodejs: false
|
|
|
|
- template: win-ci.yml
|
|
parameters:
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
job_name_suffix: CPU_arm64_${{ parameters.BuildVariant }}
|
|
EnvSetupScript: setup_env.bat
|
|
buildArch: x64
|
|
msbuildPlatform: arm64
|
|
packageName: arm64
|
|
buildparameter: --build_nodejs --arm64 ${{ parameters.AdditionalBuildFlags }} ${{ parameters.AdditionalWinBuildFlags}}
|
|
runTests: false
|
|
buildJava: false
|
|
buildNodejs: true
|
|
|
|
- template: win-ci.yml
|
|
parameters:
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
job_name_suffix: CPU_x64_${{ parameters.BuildVariant }}
|
|
EnvSetupScript: setup_env.bat
|
|
buildArch: x64
|
|
msbuildPlatform: x64
|
|
packageName: x64
|
|
buildparameter: --build_java --build_nodejs ${{ parameters.AdditionalBuildFlags }} ${{ parameters.AdditionalWinBuildFlags}}
|
|
runTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
buildJava: true
|
|
buildNodejs: true
|
|
|
|
- job: Jar_Packaging
|
|
workspace:
|
|
clean: all
|
|
pool: 'Win-CPU-2021'
|
|
dependsOn:
|
|
- Linux_C_API_Packaging_CPU_x64
|
|
- Linux_C_API_Packaging_CPU_aarch64
|
|
- MacOS_C_API_Packaging_CPU_x64
|
|
- Windows_Packaging_CPU_x86_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_x64_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_arm_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_arm64_${{ parameters.BuildVariant }}
|
|
condition: succeeded()
|
|
steps:
|
|
- checkout: self
|
|
submodules: false
|
|
- template: set-version-number-variables-step.yml
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Pipeline Artifact - Win x64'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'drop-onnxruntime-java-win-x64'
|
|
targetPath: '$(Build.BinariesDirectory)\java-artifact\onnxruntime-java-win-x64'
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Pipeline Artifact - Linux x64'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'drop-onnxruntime-java-linux-x64'
|
|
targetPath: '$(Build.BinariesDirectory)\java-artifact\onnxruntime-java-linux-x64'
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Pipeline Artifact - Linux AARCH64'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'drop-onnxruntime-java-linux-aarch64'
|
|
targetPath: '$(Build.BinariesDirectory)\java-artifact\onnxruntime-java-linux-aarch64'
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Pipeline Artifact - MacOS x64'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'drop-onnxruntime-java-osx-x86_64'
|
|
targetPath: '$(Build.BinariesDirectory)\java-artifact\onnxruntime-java-osx-x86_64'
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Pipeline Artifact - MacOS ARM64'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'drop-onnxruntime-java-osx-arm64'
|
|
targetPath: '$(Build.BinariesDirectory)\java-artifact\onnxruntime-java-osx-arm64'
|
|
|
|
- task: PowerShell@2
|
|
displayName: 'PowerShell Script'
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: $(Build.SourcesDirectory)\tools\ci_build\github\windows\jar_packaging.ps1
|
|
failOnStderr: true
|
|
showWarnings: true
|
|
workingDirectory: '$(Build.BinariesDirectory)\java-artifact'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Java Files to Artifact Staging Directory'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\java-artifact\onnxruntime-java-win-x64'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: 'Publish Pipeline Artifact'
|
|
inputs:
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
artifact: 'onnxruntime-java'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- job: NuGet_Packaging_CPU
|
|
workspace:
|
|
clean: all
|
|
# we need to use the 2022 pool to create the nuget package with both pre-net6+Xamarin and net6 targets.
|
|
# VS2019 has no support for net6 and we need to use msbuild (from the VS install) to do the packing
|
|
pool: 'Azure-Pipelines-EO-Windows2022-aiinfra'
|
|
variables:
|
|
OrtPackageId: ${{ parameters.OrtNugetPackageId }}
|
|
breakCodesignValidationInjection: ${{ parameters.DoEsrp }}
|
|
dependsOn:
|
|
- Linux_C_API_Packaging_CPU_x64
|
|
- Linux_C_API_Packaging_CPU_aarch64
|
|
- MacOS_C_API_Packaging_CPU_x64
|
|
- Windows_Packaging_CPU_x86_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_x64_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_arm_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_arm64_${{ parameters.BuildVariant }}
|
|
- Android_Java_API_AAR_Packaging_Full
|
|
- iOS_Full_xcframework
|
|
condition: succeeded()
|
|
steps:
|
|
- checkout: self
|
|
submodules: true
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download win-x64 Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-win-x64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download win-x86 Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-win-x86'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download win-arm64 Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-win-arm64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download win-arm Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-win-arm'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download osx-x64 Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-osx'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download linux-x64 Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-linux-x64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet'
|
|
inputs:
|
|
artifactName: 'onnxruntime-linux-aarch64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download iOS Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-ios-full-xcframework'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download android-full-aar Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime-android-full-aar'
|
|
patterns: '**/*.aar'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download drop-extra Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'drop-extra'
|
|
targetPath: '$(Build.BinariesDirectory)/extra-artifact'
|
|
|
|
- script: |
|
|
dir
|
|
workingDirectory: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
displayName: 'List artifacts'
|
|
|
|
# Reconstruct the build dir
|
|
- task: PowerShell@2
|
|
displayName: 'Extract native libraries for addition to nuget native package'
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: $(Build.SourcesDirectory)\tools\ci_build\github\windows\extract_nuget_files.ps1
|
|
|
|
- script: |
|
|
mklink /D /J models C:\local\models
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
displayName: 'Create models link'
|
|
- task: NuGetToolInstaller@0
|
|
displayName: Use Nuget 6.2.1
|
|
inputs:
|
|
versionSpec: 6.2.1
|
|
|
|
- task: PowerShell@2
|
|
displayName: Install .NET 6 workloads
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
dotnet workload install android ios macos
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- task: PowerShell@2
|
|
displayName: Build Microsoft.ML.OnnxRuntime .NET 6 targets using dotnet
|
|
inputs:
|
|
targetType: 'inline'
|
|
# we don't specify 'Any CPU' as the platform here because if we do it gets added to the output path
|
|
# e.g. csharp\src\Microsoft.ML.OnnxRuntime\bin\Any CPU\RelWithDebInfo\net6.0-ios\
|
|
# which is inconsistent with the msbuild output path for the pre-.net6 targets
|
|
# e.g. csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\monoandroid11.0
|
|
# and makes it harder to do the packing
|
|
#
|
|
# 'Any CPU' is the default (first 'mixed' platform specified in the csproj) so this should be fine.
|
|
script: |
|
|
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- task: MSBuild@1
|
|
displayName: 'Restore NuGet Packages and create project.assets.json for pre-.net6 targets'
|
|
inputs:
|
|
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
|
platform: 'Any CPU'
|
|
configuration: RelWithDebInfo
|
|
msbuildArguments: '-t:restore -p:SelectedTargets=PreNet6 -p:OrtPackageId=$(OrtPackageId)'
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- task: MSBuild@1
|
|
displayName: 'Build C# for pre-.net6 targets'
|
|
inputs:
|
|
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
|
platform: 'Any CPU'
|
|
configuration: RelWithDebInfo
|
|
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- template: win-esrp-dll.yml
|
|
parameters:
|
|
FolderPath: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo'
|
|
DisplayName: 'ESRP - Sign C# dlls'
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
- task: MSBuild@1
|
|
displayName: Update projects.assets.json will combined list of all target frameworks
|
|
inputs:
|
|
solution: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj'
|
|
platform: 'Any CPU'
|
|
configuration: RelWithDebInfo
|
|
msbuildArguments: '-t:restore -p:SelectedTargets=All -p:OrtPackageId=$(OrtPackageId)'
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- task: MSBuild@1
|
|
displayName: 'Build Nuget Packages'
|
|
inputs:
|
|
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
|
|
platform: 'Any CPU'
|
|
configuration: RelWithDebInfo
|
|
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy native nuget package to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
|
Contents: '*.nupkg'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy native nuget symbols package to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
|
Contents: '*.snupkg'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy managed nuget package to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo'
|
|
Contents: '*.nupkg'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- template: esrp_nuget.yml
|
|
parameters:
|
|
DisplayName: 'ESRP - sign NuGet package'
|
|
FolderPath: '$(Build.ArtifactStagingDirectory)'
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
- template: validate-package.yml
|
|
parameters:
|
|
PackageType: 'nuget'
|
|
PackagePath: '$(Build.ArtifactStagingDirectory)'
|
|
PackageName: 'Microsoft.ML.OnnxRuntime.*nupkg'
|
|
PlatformsSupported: 'win-x64,win-x86,linux-x64,linux-arm64,osx.10.14-x64'
|
|
VerifyNugetSigning: false
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
displayName: 'Publish Pipeline NuGet Artifact'
|
|
inputs:
|
|
artifactName: 'drop-signed-nuget-CPU'
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
|
|
- task: MSBuild@1
|
|
displayName: 'Clean C#'
|
|
inputs:
|
|
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
|
platform: 'Any CPU'
|
|
configuration: RelWithDebInfo
|
|
msbuildArguments: '-t:Clean -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId)'
|
|
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
|
|
|
- task: RoslynAnalyzers@2
|
|
displayName: 'Run Roslyn Analyzers'
|
|
inputs:
|
|
userProvideBuildInfo: msBuildInfo
|
|
msBuildCommandline: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe" $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln -p:configuration="RelWithDebInfo" -p:Platform="Any CPU" -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId)'
|
|
condition: and(succeeded(), eq('${{ parameters.DoCompliance }}', true))
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- job: Nodejs_Packaging_CPU
|
|
workspace:
|
|
clean: all
|
|
pool: 'Win-CPU-2021'
|
|
variables:
|
|
${{ if eq(parameters.IsReleaseBuild, true) }}:
|
|
NpmPackagingMode: 'release'
|
|
${{ if not(eq(parameters.IsReleaseBuild, true)) }}:
|
|
NpmPackagingMode: 'dev'
|
|
breakCodesignValidationInjection: ${{ parameters.DoEsrp }}
|
|
dependsOn:
|
|
- Linux_C_API_Packaging_CPU_x64
|
|
- Linux_C_API_Packaging_CPU_aarch64
|
|
- MacOS_C_API_Packaging_CPU_x64
|
|
- Windows_Packaging_CPU_x64_${{ parameters.BuildVariant }}
|
|
- Windows_Packaging_CPU_arm64_${{ parameters.BuildVariant }}
|
|
condition: succeeded()
|
|
steps:
|
|
- checkout: self
|
|
submodules: true
|
|
|
|
- script: |
|
|
echo.>>.gitattributes
|
|
echo /js/** text=auto eol=lf>>.gitattributes
|
|
rd /s /q js
|
|
git checkout -- js/**
|
|
git checkout -- .gitattributes
|
|
workingDirectory: '$(Build.SourcesDirectory)'
|
|
displayName: 'Testing: force EOL to lf on windows for /js/**'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet (Win x64)'
|
|
inputs:
|
|
artifactName: 'onnxruntime-win-x64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet (Win ARM64)'
|
|
inputs:
|
|
artifactName: 'onnxruntime-win-arm64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet (OSX)'
|
|
inputs:
|
|
artifactName: 'onnxruntime-osx'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet (Linux x64)'
|
|
inputs:
|
|
artifactName: 'onnxruntime-linux-x64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet (Linux aarch64)'
|
|
inputs:
|
|
artifactName: 'onnxruntime-linux-aarch64'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Nodejs (Win x64)'
|
|
inputs:
|
|
artifactName: 'drop-onnxruntime-nodejs-win-x64'
|
|
targetPath: '$(Build.BinariesDirectory)/nodejs-artifacts/win32/x64/'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Nodejs (Win ARM64)'
|
|
inputs:
|
|
artifactName: 'drop-onnxruntime-nodejs-win-arm64'
|
|
targetPath: '$(Build.BinariesDirectory)/nodejs-artifacts/win32/arm64/'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Nodejs (macOS x86_64)'
|
|
inputs:
|
|
artifactName: 'drop-onnxruntime-nodejs-osx-x86_64'
|
|
targetPath: '$(Build.BinariesDirectory)/nodejs-artifacts/darwin/x64/'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Nodejs (macOS arm64)'
|
|
inputs:
|
|
artifactName: 'drop-onnxruntime-nodejs-osx-arm64'
|
|
targetPath: '$(Build.BinariesDirectory)/nodejs-artifacts/darwin/arm64/'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Nodejs (Linux x64)'
|
|
inputs:
|
|
artifactName: 'drop-onnxruntime-nodejs-linux-x64'
|
|
targetPath: '$(Build.BinariesDirectory)/nodejs-artifacts/linux/x64/'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Nodejs (Linux aarch64)'
|
|
inputs:
|
|
artifactName: 'drop-onnxruntime-nodejs-linux-aarch64'
|
|
targetPath: '$(Build.BinariesDirectory)/nodejs-artifacts/linux/arm64/'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet'
|
|
inputs:
|
|
artifactName: 'drop-extra'
|
|
targetPath: '$(Build.BinariesDirectory)/extra-artifact'
|
|
|
|
- task: PowerShell@2
|
|
displayName: 'PowerShell Script'
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: $(Build.SourcesDirectory)\tools\ci_build\github\windows\extract_nuget_files.ps1
|
|
|
|
- script: |
|
|
dir
|
|
workingDirectory: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
displayName: 'List artifacts'
|
|
|
|
- script: |
|
|
npm ci
|
|
workingDirectory: '$(Build.SourcesDirectory)/js'
|
|
displayName: 'Install NPM packages /js'
|
|
- script: |
|
|
npm ci
|
|
workingDirectory: '$(Build.SourcesDirectory)/js/common'
|
|
displayName: 'Install NPM packages /js/common'
|
|
- script: |
|
|
npm ci
|
|
workingDirectory: '$(Build.SourcesDirectory)/js/node'
|
|
displayName: 'Install NPM packages /js/node'
|
|
|
|
# Node.js binding win32/x64
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nuget binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\x64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts\onnxruntime-win-x64\lib'
|
|
Contents: '*.dll'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\x64'
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nodejs binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\x64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\nodejs-artifacts\win32\x64'
|
|
Contents: '*.node'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\x64'
|
|
|
|
# Node.js binding win32/arm64
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nuget binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\arm64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts\onnxruntime-win-arm64\lib'
|
|
Contents: '*.dll'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\arm64'
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nodejs binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\arm64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\nodejs-artifacts\win32\arm64'
|
|
Contents: '*.node'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\arm64'
|
|
|
|
# Node.js binding linux/x64
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nuget binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\x64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts\onnxruntime-linux-x64\lib'
|
|
Contents: 'libonnxruntime.so.*'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\x64'
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nodejs binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\x64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\nodejs-artifacts\linux\x64'
|
|
Contents: '*.node'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\x64'
|
|
|
|
# Node.js binding linux/arm64
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nuget binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\arm64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts\onnxruntime-linux-aarch64\lib'
|
|
Contents: 'libonnxruntime.so.*'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\arm64'
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nodejs binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\arm64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\nodejs-artifacts\linux\arm64'
|
|
Contents: '*.node'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\linux\arm64'
|
|
|
|
# Node.js binding darwin/x64
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nuget binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\x64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts\onnxruntime-osx-x86_64\lib'
|
|
Contents: 'libonnxruntime.*.dylib'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\x64'
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nodejs binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\x64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\nodejs-artifacts\darwin\x64'
|
|
Contents: '*.node'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\x64'
|
|
|
|
# Node.js binding darwin/arm64
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nuget binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\arm64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts\onnxruntime-osx-arm64\lib'
|
|
Contents: 'libonnxruntime.*.dylib'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\arm64'
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy nodejs binaries to: $(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\arm64\'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)\nodejs-artifacts\darwin\arm64'
|
|
Contents: '*.node'
|
|
TargetFolder: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\darwin\arm64'
|
|
|
|
- task: PowerShell@2
|
|
inputs:
|
|
filePath: '$(Build.SourcesDirectory)\tools\ci_build\github\js\pack-npm-packages.ps1'
|
|
arguments: '$(NpmPackagingMode) $(Build.SourcesDirectory) node'
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
errorActionPreference: stop
|
|
displayName: 'Pack NPM packages'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy onnxruntime-common package to staging directory'
|
|
inputs:
|
|
SourceFolder: '$(Build.SourcesDirectory)/js/common/'
|
|
Contents: 'onnxruntime-common-*.tgz'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy onnxruntime-node package to staging directory'
|
|
inputs:
|
|
SourceFolder: '$(Build.SourcesDirectory)/js/node/'
|
|
Contents: 'onnxruntime-node-*.tgz'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
displayName: 'Publish NPM packages files'
|
|
inputs:
|
|
artifactName: 'NPM_packages'
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- template: ../nuget/templates/test_win.yml
|
|
parameters:
|
|
AgentPool : 'Win-CPU-2021'
|
|
Skipx86Tests : false
|
|
NugetPackageName : 'Microsoft.ML.OnnxRuntime'
|
|
ArtifactSuffix: 'CPU'
|
|
|
|
- template: ../nuget/templates/test_linux.yml
|
|
parameters:
|
|
AgentPool : Linux-CPU
|
|
NugetPackageName : 'Microsoft.ML.OnnxRuntime'
|
|
ArtifactSuffix: 'CPU'
|
|
|
|
- template: ../nuget/templates/test_macos.yml
|
|
parameters:
|
|
AgentPool : macOS-11
|
|
ArtifactSuffix: 'CPU'
|
|
|
|
- template: ../nodejs/templates/test_win.yml
|
|
parameters:
|
|
AgentPool : 'Win-CPU-2021'
|
|
JobSuffix : 'Win_CPU_x64'
|
|
|
|
- template: ../nodejs/templates/test_linux.yml
|
|
parameters:
|
|
AgentPool : 'Linux-CPU'
|
|
JobSuffix : 'Linux_CPU_x64'
|
|
|
|
- template: ../nodejs/templates/test_macos.yml
|
|
parameters:
|
|
JobSuffix : 'macOS_CPU_x64'
|
|
|
|
- job: Publish_NuGet_Package_And_Report
|
|
workspace:
|
|
clean: all
|
|
variables:
|
|
- name: GDN_CODESIGN_TARGETDIRECTORY
|
|
value: '$(Build.BinariesDirectory)/nuget-artifact/final-package'
|
|
pool: 'Win-CPU-2021'
|
|
condition: and (succeeded(), and (${{ parameters.PublishingNuget }}, eq(variables['Build.SourceBranch'], 'refs/heads/master')))
|
|
dependsOn:
|
|
- NuGet_Test_Win_CPU
|
|
- NuGet_Test_Linux_CPU
|
|
- NuGet_Test_MacOS
|
|
steps:
|
|
- checkout: self
|
|
submodules: false
|
|
- template: set-version-number-variables-step.yml
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Signed NuGet Package'
|
|
inputs:
|
|
artifactName: 'drop-signed-nuget-CPU'
|
|
targetPath: $(Build.BinariesDirectory)/nuget-artifact/final-package
|
|
|
|
- template: ../nuget/templates/get-nuget-package-version-as-variable.yml
|
|
parameters:
|
|
packageFolder: '$(Build.BinariesDirectory)/nuget-artifact/final-package'
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Post binary sizes to the dashboard database using command line'
|
|
inputs:
|
|
script: |
|
|
echo changing directory to artifact download path
|
|
cd $(Build.BinariesDirectory)/nuget-artifact/final-package
|
|
echo processing nupkg
|
|
SETLOCAL EnableDelayedExpansion
|
|
FOR /R %%i IN (*.nupkg) do (
|
|
set filename=%%~ni
|
|
IF NOT "!filename:~25,7!"=="Managed" (
|
|
echo processing %%~ni.nupkg
|
|
copy %%~ni.nupkg %%~ni.zip
|
|
echo copied to zip
|
|
echo listing lib files in the zip
|
|
REM use a single .csv file to put the data
|
|
echo os,arch,build_config,size > $(Build.BinariesDirectory)\binary_size_data.txt
|
|
7z.exe l -slt %%~ni.zip runtimes\linux-x64\native\libonnxruntime.so | findstr /R /C:"^Size = [0-9]*" | for /F "tokens=3" %%a in ('more') do if not "%%a" == "" echo linux,x64,${{ parameters.buildVariant }},%%a >> $(Build.BinariesDirectory)\binary_size_data.txt
|
|
7z.exe l -slt %%~ni.zip runtimes\linux-arm64\native\libonnxruntime.so | findstr /R /C:"^Size = [0-9]*" | for /F "tokens=3" %%a in ('more') do if not "%%a" == "" echo linux,aarch64,${{ parameters.buildVariant }},%%a >> $(Build.BinariesDirectory)\binary_size_data.txt
|
|
7z.exe l -slt %%~ni.zip runtimes\osx.10.14-x64\native\libonnxruntime.dylib | findstr /R /C:"^Size = [0-9]*" | for /F "tokens=3" %%a in ('more') do if not "%%a" == "" echo osx,x64,${{ parameters.buildVariant }},%%a >> $(Build.BinariesDirectory)\binary_size_data.txt
|
|
7z.exe l -slt %%~ni.zip runtimes\win-x64\native\onnxruntime.dll | findstr /R /C:"^Size = [0-9]*" | for /F "tokens=3" %%a in ('more') do if not "%%a" == "" echo win,x64,${{ parameters.buildVariant }},%%a >> $(Build.BinariesDirectory)\binary_size_data.txt
|
|
7z.exe l -slt %%~ni.zip runtimes\win-x86\native\onnxruntime.dll | findstr /R /C:"^Size = [0-9]*" | for /F "tokens=3" %%a in ('more') do if not "%%a" == "" echo win,x86,${{ parameters.buildVariant }},%%a >> $(Build.BinariesDirectory)\binary_size_data.txt
|
|
)
|
|
)
|
|
|
|
- task: AzureCLI@2
|
|
displayName: 'Azure CLI'
|
|
inputs:
|
|
azureSubscription: AIInfraBuildOnnxRuntimeOSS
|
|
scriptLocation: inlineScript
|
|
scriptType: batch
|
|
inlineScript: |
|
|
python.exe -m pip install -r $(Build.SourcesDirectory)\tools\ci_build\github\windows\post_to_dashboard\requirements.txt && ^
|
|
python.exe $(Build.SourcesDirectory)\tools\ci_build\github\windows\post_binary_sizes_to_dashboard.py --commit_hash=$(Build.SourceVersion) --size_data_file=binary_size_data.txt --build_project=Lotus --build_id=$(Build.BuildId)
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Copy Signed Native NuGet Package to Internal NuGet Feed'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/${{ parameters.OrtNugetPackageId }}.$(NuGetPackageVersionNumber).nupkg'
|
|
feedPublish: 'OnnxRuntime'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Copy Signed Managed NuGet Package to Internal NuGet Feed'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Managed.$(NuGetPackageVersionNumber).nupkg'
|
|
feedPublish: 'OnnxRuntime'
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'Copy Signed Native NuGet Package to ORT-NIGHTLY'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/${{ parameters.OrtNugetPackageId }}.$(NuGetPackageVersionNumber).nupkg'
|
|
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'Copy Signed Managed NuGet Package to ORT-NIGHTLY'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Managed.$(NuGetPackageVersionNumber).nupkg'
|
|
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- job: Final_Jar_Testing_Windows
|
|
workspace:
|
|
clean: all
|
|
pool: 'Win-CPU-2021'
|
|
timeoutInMinutes: 60
|
|
variables:
|
|
- name: runCodesignValidationInjection
|
|
value: false
|
|
dependsOn:
|
|
Jar_Packaging
|
|
steps:
|
|
- template: set-version-number-variables-step.yml
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Final Jar'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'onnxruntime-java'
|
|
targetPath: '$(Build.BinariesDirectory)\final-jar'
|
|
|
|
- task: CmdLine@2
|
|
inputs:
|
|
script: |
|
|
mkdir test
|
|
pushd test
|
|
jar xf $(Build.BinariesDirectory)\final-jar\testing.jar
|
|
popd
|
|
powershell -Command "Invoke-WebRequest https://oss.sonatype.org/service/local/repositories/releases/content/org/junit/platform/junit-platform-console-standalone/1.6.2/junit-platform-console-standalone-1.6.2.jar -OutFile junit-platform-console-standalone-1.6.2.jar"
|
|
powershell -Command "Invoke-WebRequest https://oss.sonatype.org/service/local/repositories/releases/content/com/google/protobuf/protobuf-java/3.20.1/protobuf-java-3.20.1.jar -OutFile protobuf-java-3.20.1.jar"
|
|
java -jar junit-platform-console-standalone-1.6.2.jar -cp .;.\test;protobuf-java-3.20.1.jar;onnxruntime-$(OnnxRuntimeVersion).jar --scan-class-path --fail-if-no-tests --disable-banner
|
|
workingDirectory: '$(Build.BinariesDirectory)\final-jar'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- job: Final_Jar_Testing_Linux
|
|
workspace:
|
|
clean: all
|
|
pool: 'Linux-CPU'
|
|
variables:
|
|
- name: runCodesignValidationInjection
|
|
value: false
|
|
timeoutInMinutes: 60
|
|
dependsOn:
|
|
Jar_Packaging
|
|
steps:
|
|
- template: set-version-number-variables-step.yml
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Final Jar'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'onnxruntime-java'
|
|
targetPath: '$(Build.BinariesDirectory)/final-jar'
|
|
|
|
- task: CmdLine@2
|
|
inputs:
|
|
script: |
|
|
echo "Java Version"
|
|
java --version
|
|
mkdir test
|
|
pushd test
|
|
jar xf $(Build.BinariesDirectory)/final-jar/testing.jar
|
|
popd
|
|
wget https://oss.sonatype.org/service/local/repositories/releases/content/org/junit/platform/junit-platform-console-standalone/1.6.2/junit-platform-console-standalone-1.6.2.jar -P ./
|
|
wget https://oss.sonatype.org/service/local/repositories/releases/content/com/google/protobuf/protobuf-java/3.20.1/protobuf-java-3.20.1.jar -P ./
|
|
LD_LIBRARY_PATH=./test:${LD_LIBRARY_PATH}
|
|
java -jar ./junit-platform-console-standalone-1.6.2.jar -cp .:./test:./protobuf-java-3.20.1.jar:./onnxruntime-$(OnnxRuntimeVersion).jar --scan-class-path --fail-if-no-tests --disable-banner
|
|
workingDirectory: '$(Build.BinariesDirectory)/final-jar'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- job: Final_Jar_Testing_MacOs
|
|
workspace:
|
|
clean: all
|
|
pool:
|
|
vmImage: 'macOS-11'
|
|
variables:
|
|
- name: runCodesignValidationInjection
|
|
value: false
|
|
timeoutInMinutes: 60
|
|
dependsOn:
|
|
Jar_Packaging
|
|
steps:
|
|
- template: set-version-number-variables-step.yml
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Final Jar'
|
|
inputs:
|
|
buildType: 'current'
|
|
artifactName: 'onnxruntime-java'
|
|
targetPath: '$(Build.BinariesDirectory)/final-jar'
|
|
|
|
- task: CmdLine@2
|
|
inputs:
|
|
script: |
|
|
echo "Java Version"
|
|
java --version
|
|
mkdir test
|
|
pushd test
|
|
jar xf $(Build.BinariesDirectory)/final-jar/testing.jar
|
|
popd
|
|
wget https://oss.sonatype.org/service/local/repositories/releases/content/org/junit/platform/junit-platform-console-standalone/1.6.2/junit-platform-console-standalone-1.6.2.jar -P ./
|
|
wget https://oss.sonatype.org/service/local/repositories/releases/content/com/google/protobuf/protobuf-java/3.20.1/protobuf-java-3.20.1.jar -P ./
|
|
sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
|
|
DYLD_LIBRARY_PATH=./test:${DYLD_LIBRARY_PATH}
|
|
java -jar ./junit-platform-console-standalone-1.6.2.jar -cp .:./test:./protobuf-java-3.20.1.jar:./onnxruntime-$(OnnxRuntimeVersion).jar --scan-class-path --fail-if-no-tests --disable-banner
|
|
workingDirectory: '$(Build.BinariesDirectory)/final-jar'
|
|
|
|
- template: component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|
|
|
|
- template: android-java-api-aar-test.yml
|
|
parameters:
|
|
artifactName: 'onnxruntime-android-mobile-aar'
|
|
job_name_suffix: 'Mobile'
|
|
packageName: 'onnxruntime-mobile'
|
|
|
|
- template: android-java-api-aar-test.yml
|
|
parameters:
|
|
artifactName: 'onnxruntime-android-full-aar'
|
|
job_name_suffix: 'Full'
|