Skip to content

Commit

Permalink
try VS 2022 in windowsAI pipeline (#14608)
Browse files Browse the repository at this point in the history
### Description
update VS2019 to VS 2022 in
onnxruntime-Nuget-WindowsAI-Pipeline-Official


### 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. -->
  • Loading branch information
mszhanyi authored and rui-ren committed Feb 7, 2023
1 parent c60e2b6 commit 2931e1a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .pipelines/windowsai-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ parameters:
displayName: BuildArch
type: string
default: 'x64'

- name: Runtime
displayName: MSVC Runtime, should be 'dynamic' or 'static'.
type: string
default: 'dynamic'

- name: PythonPackageName
displayName: PythonPackageName on nuget.org to use
type: string
Expand All @@ -17,8 +17,8 @@ parameters:
jobs:
- job: Windows_Packaging_${{ parameters.BuildArch }}_${{ parameters.Runtime }}
pool:
type: windows
type: windows

variables:
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
ob_sdl_binskim_break: true
Expand All @@ -40,7 +40,7 @@ jobs:
restoreSolution: $(Build.SourcesDirectory)\.pipelines\nuget_config\x64\packages.config
${{ if eq(parameters.BuildArch, 'arm64') }}:
restoreSolution: $(Build.SourcesDirectory)\.pipelines\nuget_config\x64\packages.config

- script: |
@echo off
set vswherepath="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
Expand All @@ -50,10 +50,10 @@ jobs:
set vsdevcmd="%%i\Common7\Tools\vsdevcmd.bat"
)
)
@echo vslatest %vslatest%
@echo vsdevcmd %vsdevcmd%
@echo ##vso[task.setvariable variable=vslatest]%vslatest%
@echo ##vso[task.setvariable variable=vsdevcmd]%vsdevcmd% -arch=${{ parameters.BuildArch }}
displayName: 'locate vsdevcmd via vswhere'
Expand All @@ -80,7 +80,7 @@ jobs:
7z x cmake-3.24.3-windows-x86_64.zip
set PYTHONHOME=$(Build.BinariesDirectory)\${{ parameters.PythonPackageName }}.3.7.9\tools
set PYTHONPATH=$(Build.BinariesDirectory)\${{ parameters.PythonPackageName }}.3.7.9\tools
$(Build.BinariesDirectory)\${{ parameters.PythonPackageName }}.3.7.9\tools\python.exe "$(Build.SourcesDirectory)\tools\ci_build\build.py" --build_dir $(Build.BinariesDirectory) --build_shared_lib --enable_onnx_tests --ms_experimental --use_dml --use_winml --cmake_generator "Visual Studio 16 2019" --update --config RelWithDebInfo --enable_lto --use_telemetry --disable_rtti --enable_wcos $(BuildFlags) --cmake_extra_defines CMAKE_SYSTEM_VERSION=10.0.19041.0 --cmake_path $(Build.BinariesDirectory)\cmake-3.24.3-windows-x86_64\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake-3.24.3-windows-x86_64\bin\ctest.exe
$(Build.BinariesDirectory)\${{ parameters.PythonPackageName }}.3.7.9\tools\python.exe "$(Build.SourcesDirectory)\tools\ci_build\build.py" --build_dir $(Build.BinariesDirectory) --build_shared_lib --enable_onnx_tests --ms_experimental --use_dml --use_winml --cmake_generator "Visual Studio 17 2022" --update --config RelWithDebInfo --enable_lto --use_telemetry --disable_rtti --enable_wcos $(BuildFlags) --cmake_extra_defines CMAKE_SYSTEM_VERSION=10.0.19041.0 --cmake_path $(Build.BinariesDirectory)\cmake-3.24.3-windows-x86_64\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake-3.24.3-windows-x86_64\bin\ctest.exe
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Generate cmake config'
Expand All @@ -97,7 +97,7 @@ jobs:
maximumCpuCount: true
logProjectEvents: true
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
createLogFile: true
createLogFile: true

- ${{ if eq(parameters.Runtime, 'dynamic') }}:
- script: |
Expand All @@ -114,8 +114,8 @@ jobs:
copy $(Build.SourcesDirectory)\onnxruntime\test\testdata\sequence_length.onnx $(Build.ArtifactStagingDirectory)\test_artifact\
copy $(Build.SourcesDirectory)\onnxruntime\test\testdata\sequence_construct.onnx $(Build.ArtifactStagingDirectory)\test_artifact\
displayName: 'Copy WinML test collateral to artifact directory'
- ${{ if eq(parameters.BuildArch, 'x64') }}:
- script: |
call $(vsdevcmd)
Expand All @@ -129,8 +129,8 @@ jobs:
signing_profile: 'external_distribution'
files_to_sign: '**/*.exe;**/*.dll'
search_root: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
displayName: 'Sign runtime DLLs'
displayName: 'Sign runtime DLLs'

- ${{ if eq(parameters.BuildArch, 'x64') }}:
- script: |
call $(vsdevcmd)
Expand Down

0 comments on commit 2931e1a

Please sign in to comment.