Cjian/windows update python3.11 (#15243)

### Description
windows update python3.11



### 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. -->

---------

Co-authored-by: Ubuntu <chasun@chasunlinux.lw3b1xzoyrkuzm34swpscft0ff.dx.internal.cloudapp.net>
This commit is contained in:
Jian Chen 2023-03-28 22:15:47 -07:00 committed by GitHub
parent 659118f939
commit 85948d6bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 56 additions and 20 deletions

View file

@ -76,7 +76,7 @@ stages:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: ${{ parameters.BuildArch }}

View file

@ -26,7 +26,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: x64

View file

@ -52,7 +52,7 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
- task: PythonScript@0
@ -105,7 +105,7 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
- task: PythonScript@0

View file

@ -237,7 +237,7 @@ stages:
- task: DeleteFiles@1
displayName: 'Delete files from $(Build.BinariesDirectory)\$(BuildConfig)'
condition: and (succeeded(), eq(variables['PythonVersion'], '3.7'))
condition: and (succeeded(), eq(variables['PythonVersion'], '3.8'))
inputs:
SourceFolder: '$(Build.BinariesDirectory)\$(BuildConfig)'
Contents: |
@ -258,7 +258,7 @@ stages:
#in 32 bits Win32 build. I tried all the settings but they all don't work.
- task: SDLNativeRules@3
displayName: 'Run the PREfast SDL Native Rules for MSBuild'
condition: and (succeeded(), eq(variables['PythonVersion'], '3.7'))
condition: and (succeeded(), eq(variables['PythonVersion'], '3.8'))
inputs:
msBuildArchitecture: amd64
setupCommandlines: 'python $(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --enable_pybind --enable_onnx_tests --parallel --update --cmake_extra_defines onnxruntime_ENABLE_STATIC_ANALYSIS=ON'
@ -267,7 +267,7 @@ stages:
- task: TSAUpload@2
displayName: 'TSA upload'
condition: and(and (succeeded(), eq(variables['PythonVersion'], '3.7')), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
condition: and(and (succeeded(), eq(variables['PythonVersion'], '3.8')), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
GdnPublishTsaOnboard: false
GdnPublishTsaConfigFile: '$(Build.sourcesDirectory)\.gdn\.gdntsa'
@ -497,7 +497,7 @@ stages:
- task: DeleteFiles@1
displayName: 'Delete files from $(Build.BinariesDirectory)\RelWithDebInfo'
condition: and (succeeded(), eq(variables['PythonVersion'], '3.7'))
condition: and (succeeded(), eq(variables['PythonVersion'], '3.8'))
inputs:
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
Contents: |
@ -516,7 +516,7 @@ stages:
#Manually set msBuildCommandline so that we can also set CAExcludePath
- task: SDLNativeRules@3
displayName: 'Run the PREfast SDL Native Rules for MSBuild'
condition: and (succeeded(), eq(variables['PythonVersion'], '3.7'))
condition: and (succeeded(), eq(variables['PythonVersion'], '3.8'))
inputs:
msBuildArchitecture: amd64
setupCommandlines: 'python $(Build.SourcesDirectory)\tools\ci_build\build.py --config RelWithDebInfo --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --enable_pybind --enable_onnx_tests ${{ parameters.gpu_build_py_parameters }} --parallel $(EpBuildFlags) --update --cmake_extra_defines onnxruntime_ENABLE_STATIC_ANALYSIS=ON'
@ -525,7 +525,7 @@ stages:
- task: TSAUpload@2
displayName: 'TSA upload'
condition: and(and (succeeded(), eq(variables['PythonVersion'], '3.7')), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
condition: and(and (succeeded(), eq(variables['PythonVersion'], '3.8')), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
GdnPublishTsaOnboard: false
GdnPublishTsaConfigFile: '$(Build.sourcesDirectory)\.gdn\.gdntsa'

View file

@ -26,6 +26,10 @@ steps:
variables = {
"PythonManylinuxDir": "/opt/python/cp310-cp310"
}
elif version == "3.11":
variables = {
"PythonManylinuxDir": "/opt/python/cp311-cp311"
}
else:
raise ValueError("Unsupported Python version: '{}'".format(version))

View file

@ -0,0 +1,32 @@
jobs:
- job: Upload
workspace:
clean: all
pool: 'Win-CPU-2021'
variables:
- name: runCodesignValidationInjection
value: false
- name: skipComponentGovernanceDetection
value: true
dependsOn:
- CodeCoverage
condition: and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
steps:
- checkout: self
submodules: false
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact'
inputs:
buildType: 'current'
artifactName: 'html'
targetPath: '$(Build.BinariesDirectory)'
- task: AzureFileCopy@4
displayName: 'AzureBlob File Copy'
inputs:
SourcePath: '$(Build.BinariesDirectory)\*'
azureSubscription: AIInfraBuildOnnxRuntimeOSS
Destination: AzureBlob
storage: onnxruntime
ContainerName: '$web'

View file

@ -11,7 +11,7 @@ steps:
- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: 3.7
versionSpec: 3.8
- task: PythonScript@0
displayName: 'Validate Package'

View file

@ -82,7 +82,7 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: ${{ parameters.buildArch }}

View file

@ -78,7 +78,7 @@ stages:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: ${{ parameters.buildArch }}

View file

@ -56,7 +56,7 @@ jobs:
displayName: 'Checkout submodules'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: $(buildArch)
- task: NodeTool@0

View file

@ -21,7 +21,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: $(buildArch)

View file

@ -22,7 +22,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: $(buildArch)

View file

@ -18,7 +18,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: $(buildArch)

View file

@ -27,7 +27,7 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
versionSpec: '3.8'
addToPath: true
architecture: $(buildArch)

View file

@ -6,7 +6,7 @@ yum -y install \
graphviz
if [ ! -d "/opt/conda/bin" ]; then
PYTHON_EXES=("/opt/python/cp37-cp37m/bin/python3.7" "/opt/python/cp38-cp38/bin/python3.8" "/opt/python/cp39-cp39/bin/python3.9")
PYTHON_EXES=("/opt/python/cp38-cp38/bin/python3.8" "/opt/python/cp39-cp39/bin/python3.9" "/opt/python/cp310-cp310/bin/python3.10")
else
PYTHON_EXES=("/opt/conda/bin/python")
fi

View file

@ -6,7 +6,7 @@ yum -y install \
graphviz
if [ ! -d "/opt/conda/bin" ]; then
PYTHON_EXES=("/opt/python/cp37-cp37m/bin/python3.7" "/opt/python/cp38-cp38/bin/python3.8" "/opt/python/cp39-cp39/bin/python3.9")
PYTHON_EXES=("/opt/python/cp38-cp38/bin/python3.8" "/opt/python/cp39-cp39/bin/python3.9" "/opt/python/cp310-cp310/bin/python3.10")
else
PYTHON_EXES=("/opt/conda/bin/python")
fi