Skip to content

Commit 71ea923

Browse files
Raymond Yangpranavsharma
Raymond Yang
authored andcommitted
Add the mac python packaging script (#72)
* Add pipeline for building python wheels for Windows/Linux CPU and GPU * try enable mkldnn * remove mklml * Update python packaging configuration * Try macos pywheel packaging * Try removing mkldnn from mac build * Use conda in mac agents * Change to build release only * Add the mac wheel packaging list to the packaging yaml * Add mkldnn into mac wheels
1 parent 3a7ecc5 commit 71ea923

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

tools/ci_build/github/azure-pipelines/azure-pipelines-py-packaging.yml

+47
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,50 @@ jobs:
182182
filename: deactivate
183183
continueOnError: true
184184
condition: always()
185+
186+
- job: MacOS_py_Wheels
187+
pool:
188+
vmImage: 'macOS-10.13'
189+
strategy:
190+
matrix:
191+
Python35:
192+
python.version: '3.5'
193+
Python36:
194+
python.version: '3.6'
195+
196+
steps:
197+
- task: CondaEnvironment@1
198+
inputs:
199+
createCustomEnvironment: true
200+
environmentName: 'py$(python.version)'
201+
packageSpecs: 'python=$(python.version)'
202+
cleanEnvironment: true
203+
204+
- script: |
205+
sudo python -m pip install numpy
206+
sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
207+
./build.sh --config Release --skip_submodule_sync --parallel --use_mkldnn --build_wheel
208+
displayName: 'Command Line Script'
209+
210+
- task: CopyFiles@2
211+
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
212+
inputs:
213+
SourceFolder: '$(Build.SourcesDirectory)'
214+
Contents: '**/dist/onnxruntime-*.whl'
215+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
216+
217+
- task: PublishBuildArtifacts@1
218+
displayName: 'Publish Artifact: ONNXRuntime python wheel'
219+
inputs:
220+
ArtifactName: onnxruntime
221+
222+
- script: 'sudo rm -rf $(Agent.BuildDirectory)'
223+
displayName: 'Clean build folders/files'
224+
condition: always()
225+
226+
- task: CmdLine@1
227+
displayName: 'Deactivating Conda Environment'
228+
inputs:
229+
filename: deactivate
230+
continueOnError: true
231+
condition: always()

0 commit comments

Comments
 (0)