forked from microsoft/dpu-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
99 lines (82 loc) · 2.33 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
jobs:
- job: 'Python_Test'
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: python -m pip install --upgrade pip && pip install -r requirements.txt && pip install torch==1.6.0
displayName: 'Install dependencies'
workingDirectory: 'python/'
- script: |
pip install pytest
pytest tests --doctest-modules --junitxml=junit/test-results.xml
displayName: 'pytest'
workingDirectory: 'python/'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'python/**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
- job: 'Python_Publish'
dependsOn: 'Python_Test'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- script: python setup.py sdist
displayName: 'Build sdist'
workingDirectory: 'python/'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: dist'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
pathtoPublish: './'
artifactName: 'dist'
- job: 'DotNet_Build'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: DotNetCoreInstaller@0
inputs:
version: '2.1.300'
- script: dotnet restore
workingDirectory: 'dotnet/'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: 'dotnet/**/*.csproj'
arguments: '--configuration Release'
# One of these days, we should add tests:
#- task: DotNetCoreCLI@2
# inputs:
# command: test
# projects: 'dotnet/**/*Tests/*.csproj'
# arguments: '--configuration $(buildConfiguration)'
- job: 'DotNet_Publish'
dependsOn: 'DotNet_Build'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: dotnet pack
workingDirectory: 'dotnet/'
# - task: NuGetCommand@2
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# command: push
# nuGetFeedType: external
# publishFeedCredentials: 'mabrocks-DPU.Utils-NuGet'
# packagesToPush: 'dotnet/**/*.nupkg'