Skip to content

Commit 2acfddf

Browse files
committed
Add macos ci
1 parent 609d1aa commit 2acfddf

File tree

5 files changed

+55
-38
lines changed

5 files changed

+55
-38
lines changed

ci/onnx2bnn_build.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pr:
2727
- dabnn/*
2828

2929
jobs:
30-
- job: Linux_AppImage
30+
- job: LinuxAppImage
3131
pool:
3232
vmImage: 'ubuntu-16.04'
3333
steps:
@@ -48,7 +48,7 @@ jobs:
4848
pathtoPublish: $(Build.ArtifactStagingDirectory)
4949
artifactName: onnx2bnn AppImage
5050
- template: template_onnx2bnn_github_release.yml
51-
- job: Windows_Python_Package
51+
- job: Windows
5252
pool:
5353
vmImage: 'vs2017-win2016'
5454
steps:
@@ -61,10 +61,18 @@ jobs:
6161
contents: 'onnx2bnn.exe'
6262
targetFolder: $(Build.ArtifactStagingDirectory)
6363
- template: template_onnx2bnn_github_release.yml
64-
- script: python -m twine upload dist/* --verbose
65-
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
66-
displayName: Upload wheel to PyPI
67-
workingDirectory: tools/onnx2bnn/python/
68-
env:
69-
TWINE_USERNAME: $(twineUsername)
70-
TWINE_PASSWORD: $(twinePassword)
64+
- template: template_onnx2bnn_upload_to_pypi.yml
65+
- job: macOS
66+
pool:
67+
vmImage: 'macOS-10.14'
68+
steps:
69+
- checkout: self
70+
submodules: true
71+
- template: template_onnx2bnn_build_python_all_version.yml
72+
- task: CopyFiles@2
73+
inputs:
74+
sourceFolder: '.setuptools-cmake-build/tools/onnx2bnn'
75+
contents: 'onnx2bnn.*'
76+
targetFolder: $(Build.ArtifactStagingDirectory)
77+
- template: template_onnx2bnn_github_release.yml
78+
- template: template_onnx2bnn_upload_to_pypi.yml
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
22
- script: python -m pip install --user --upgrade setuptools wheel twine
33
displayName: Install setuptools, wheel and twine
4-
- script: python setup.py sdist bdist_wheel
4+
- script: python setup.py bdist_wheel
55
workingDirectory: tools/onnx2bnn/python/
66
displayName: Build onnx2bnn python package
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
steps:
2-
- task: UsePythonVersion@0
3-
inputs:
4-
versionSpec: '3.7'
5-
addToPath: true
6-
architecture: 'x64'
7-
- template: template_onnx2bnn_build_python.yml
8-
- task: UsePythonVersion@0
9-
inputs:
10-
versionSpec: '3.6'
11-
addToPath: true
12-
architecture: 'x64'
13-
- template: template_onnx2bnn_build_python.yml
14-
- task: UsePythonVersion@0
15-
inputs:
16-
versionSpec: '3.5'
17-
addToPath: true
18-
architecture: 'x64'
19-
- template: template_onnx2bnn_build_python.yml
2+
- task: UsePythonVersion@0
3+
inputs:
4+
versionSpec: '3.7'
5+
addToPath: true
6+
architecture: 'x64'
7+
- template: template_onnx2bnn_build_python.yml
8+
- task: UsePythonVersion@0
9+
inputs:
10+
versionSpec: '3.6'
11+
addToPath: true
12+
architecture: 'x64'
13+
- template: template_onnx2bnn_build_python.yml
14+
- task: UsePythonVersion@0
15+
inputs:
16+
versionSpec: '3.5'
17+
addToPath: true
18+
architecture: 'x64'
19+
- template: template_onnx2bnn_build_python.yml
2020

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
steps:
2-
- task: GitHubRelease@0
3-
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
4-
inputs:
5-
gitHubConnection: 'dabnn release'
6-
repositoryName: '$(Build.Repository.Name)'
7-
action: 'edit'
8-
tag: '$(Build.SourceBranchName)'
9-
target: '$(Build.SourceVersion)'
10-
assets: '$(Build.ArtifactStagingDirectory)/*'
11-
assetUploadMode: 'replace'
2+
- task: GitHubRelease@0
3+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
4+
inputs:
5+
gitHubConnection: 'dabnn release'
6+
repositoryName: '$(Build.Repository.Name)'
7+
action: 'edit'
8+
tag: '$(Build.SourceBranchName)'
9+
target: '$(Build.SourceVersion)'
10+
assets: '$(Build.ArtifactStagingDirectory)/*'
11+
assetUploadMode: 'replace'
1212

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
steps:
2+
- script: python -m twine upload dist/* --verbose
3+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
4+
displayName: Upload wheel to PyPI
5+
workingDirectory: tools/onnx2bnn/python/
6+
env:
7+
TWINE_USERNAME: $(twineUsername)
8+
TWINE_PASSWORD: $(twinePassword)
9+

0 commit comments

Comments
 (0)