From 28a6f6b11b358e677f5f11aecc6f0a73b5eb2dfa Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Wed, 31 Jul 2019 15:57:26 -0700 Subject: [PATCH] Add back MacOS leg of the Python packaging job (#1523) (#1526) * Add MacOS leg of Python packaging job * Update copy files source directory for Mac OS leg * Add a task to display the binaries directories contents after build wheel creation * Revert some changes * Add task to log * Update * Remove unnecessary logs --- .../azure-pipelines-py-packaging.yml | 42 +++++++++++++++++++ .../docker/scripts/install_manylinux2010.sh | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/azure-pipelines-py-packaging.yml b/tools/ci_build/github/azure-pipelines/azure-pipelines-py-packaging.yml index 751c351a78..3ac6d3bc19 100644 --- a/tools/ci_build/github/azure-pipelines/azure-pipelines-py-packaging.yml +++ b/tools/ci_build/github/azure-pipelines/azure-pipelines-py-packaging.yml @@ -209,3 +209,45 @@ jobs: displayName: 'Component Detection' - template: templates/clean-agent-build-directory-step.yml + +- job: MacOS_py_Wheels + pool: + vmImage: 'macOS-10.13' + strategy: + matrix: + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + steps: + - task: CondaEnvironment@1 + inputs: + createCustomEnvironment: true + environmentName: 'py$(python.version)' + packageSpecs: 'python=$(python.version)' + cleanEnvironment: true + + - script: | + sudo python -m pip install numpy==1.15.0 + sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer + ./build.sh --config Release --skip_submodule_sync --parallel --use_openmp --build_wheel + displayName: 'Command Line Script' + + - task: CopyFiles@2 + displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)' + inputs: + SourceFolder: '$(Build.SourcesDirectory)/build/Linux/Release/dist' + Contents: '*.whl' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: ONNXRuntime python wheel' + inputs: + ArtifactName: onnxruntime + + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Detection' + + - template: templates/clean-agent-build-directory-step.yml \ No newline at end of file diff --git a/tools/ci_build/github/linux/docker/scripts/install_manylinux2010.sh b/tools/ci_build/github/linux/docker/scripts/install_manylinux2010.sh index 664684bd00..50c2b9880f 100755 --- a/tools/ci_build/github/linux/docker/scripts/install_manylinux2010.sh +++ b/tools/ci_build/github/linux/docker/scripts/install_manylinux2010.sh @@ -26,7 +26,7 @@ if [ ! -f /opt/onnxruntime-python/bin/python${PYTHON_VER} ]; then ln -s python /opt/onnxruntime-python/bin/python${PYTHON_VER} fi python -m pip install --upgrade --force-reinstall pip==19.1.1 -python -m pip install --upgrade --force-reinstall numpy==1.16.3 +python -m pip install --upgrade --force-reinstall numpy==1.15.0 python -m pip install --upgrade --force-reinstall requests==2.21.0 python -m pip install --upgrade --force-reinstall wheel==0.31.1 python -m pip install --upgrade --force-reinstall setuptools==41.0.1