From 4d2b98155f0bcc7cc4231397be92db2adbf6cfbd Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Wed, 17 Apr 2024 08:37:56 +0800 Subject: [PATCH] More fixes on random connection excepiton in Mac Build. (#20328) ### Description supplement of #20322 ### Motivation and Context Fixes random connection exceptions in Mac build in Python Packaging Pipeline https://dev.azure.com/aiinfra/Lotus/_build/results?buildId=443617&view=logs&j=5849a411-e258-5ce5-39bd-7b65d44961a0&t=ccb871c8-76d9-5e80-55b0-4279efd5567f and IOS full xcframework https://dev.azure.com/aiinfra/Lotus/_build/results?buildId=443458&view=logs&j=370fd1a2-3dec-5916-4d2c-8aae58c72d28&t=686352ba-ee61-5ad4-8739-e8abd07372a4&s=e9aa87c8-a9ad-51f7-3b12-045ecc319776 --- .../azure-pipelines/templates/c-api-cpu.yml | 10 ++++++++++ .../templates/py-packaging-stage.yml | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml b/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml index 44f7c1829af9b..8b09613082997 100644 --- a/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml +++ b/tools/ci_build/github/azure-pipelines/templates/c-api-cpu.yml @@ -109,6 +109,7 @@ stages: - template: use-xcode-version.yml parameters: xcodeVersion: 14.2 + - script: | /bin/bash $(Build.SourcesDirectory)/tools/ci_build/github/apple/build_host_protoc.sh \ $(Build.SourcesDirectory) \ @@ -116,6 +117,15 @@ stages: $(Build.BinariesDirectory)/protobuf_install displayName: Build Host Protoc + - template: download-deps.yml + + - task: PythonScript@0 + displayName: 'Update deps.txt' + inputs: + scriptPath: $(Build.SourcesDirectory)/tools/ci_build/replace_urls_in_deps.py + arguments: --new_dir $(Build.BinariesDirectory)/deps + workingDirectory: $(Build.BinariesDirectory) + - script: | set -e -x python3 tools/ci_build/github/apple/build_apple_framework.py \ diff --git a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml index 1219952836ff5..4f8d667199a35 100644 --- a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml @@ -57,10 +57,10 @@ parameters: - MinSizeRel stages: -- stage: Python_Packaging_Windows_CPU - dependsOn: [] - jobs: - - ${{ if eq(parameters.enable_windows_cpu, true) }}: +- ${{ if eq(parameters.enable_windows_cpu, true) }}: + - stage: Python_Packaging_Windows_CPU + dependsOn: [] + jobs: - job: Windows_py_Wheels pool: 'onnxruntime-Win-CPU-2022' strategy: @@ -393,6 +393,15 @@ stages: parameters: xcodeVersion: 14.2 + - template: download-deps.yml + + - task: PythonScript@0 + displayName: 'Update deps.txt' + inputs: + scriptPath: $(Build.SourcesDirectory)/tools/ci_build/replace_urls_in_deps.py + arguments: --new_dir $(Build.BinariesDirectory)/deps + workingDirectory: $(Build.BinariesDirectory) + - script: | set -e -x export _PYTHON_HOST_PLATFORM=macosx-${{variables.MACOSX_DEPLOYMENT_TARGET}}-universal2