Skip to content

Commit

Permalink
Add macos ci
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 22, 2019
1 parent 609d1aa commit 2acfddf
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 38 deletions.
26 changes: 17 additions & 9 deletions ci/onnx2bnn_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pr:
- dabnn/*

jobs:
- job: Linux_AppImage
- job: LinuxAppImage
pool:
vmImage: 'ubuntu-16.04'
steps:
Expand All @@ -48,7 +48,7 @@ jobs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: onnx2bnn AppImage
- template: template_onnx2bnn_github_release.yml
- job: Windows_Python_Package
- job: Windows
pool:
vmImage: 'vs2017-win2016'
steps:
Expand All @@ -61,10 +61,18 @@ jobs:
contents: 'onnx2bnn.exe'
targetFolder: $(Build.ArtifactStagingDirectory)
- template: template_onnx2bnn_github_release.yml
- script: python -m twine upload dist/* --verbose
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
displayName: Upload wheel to PyPI
workingDirectory: tools/onnx2bnn/python/
env:
TWINE_USERNAME: $(twineUsername)
TWINE_PASSWORD: $(twinePassword)
- template: template_onnx2bnn_upload_to_pypi.yml
- job: macOS
pool:
vmImage: 'macOS-10.14'
steps:
- checkout: self
submodules: true
- template: template_onnx2bnn_build_python_all_version.yml
- task: CopyFiles@2
inputs:
sourceFolder: '.setuptools-cmake-build/tools/onnx2bnn'
contents: 'onnx2bnn.*'
targetFolder: $(Build.ArtifactStagingDirectory)
- template: template_onnx2bnn_github_release.yml
- template: template_onnx2bnn_upload_to_pypi.yml
2 changes: 1 addition & 1 deletion ci/template_onnx2bnn_build_python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- script: python -m pip install --user --upgrade setuptools wheel twine
displayName: Install setuptools, wheel and twine
- script: python setup.py sdist bdist_wheel
- script: python setup.py bdist_wheel
workingDirectory: tools/onnx2bnn/python/
displayName: Build onnx2bnn python package
36 changes: 18 additions & 18 deletions ci/template_onnx2bnn_build_python_all_version.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml

20 changes: 10 additions & 10 deletions ci/template_onnx2bnn_github_release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
steps:
- task: GitHubRelease@0
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
gitHubConnection: 'dabnn release'
repositoryName: '$(Build.Repository.Name)'
action: 'edit'
tag: '$(Build.SourceBranchName)'
target: '$(Build.SourceVersion)'
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'replace'
- task: GitHubRelease@0
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
gitHubConnection: 'dabnn release'
repositoryName: '$(Build.Repository.Name)'
action: 'edit'
tag: '$(Build.SourceBranchName)'
target: '$(Build.SourceVersion)'
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'replace'

9 changes: 9 additions & 0 deletions ci/template_onnx2bnn_upload_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- script: python -m twine upload dist/* --verbose
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
displayName: Upload wheel to PyPI
workingDirectory: tools/onnx2bnn/python/
env:
TWINE_USERNAME: $(twineUsername)
TWINE_PASSWORD: $(twinePassword)

0 comments on commit 2acfddf

Please sign in to comment.