This repository has been archived by the owner on Feb 7, 2022. It is now read-only.
forked from purduesigbots/pros-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
98 lines (93 loc) · 2.68 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
variables:
python.version.linux: '3.7.x'
python.version.windows: '3.7.x'
jobs:
- job: UpdateBuildNumber
timeoutInMinutes: 5
pool:
vmImage: ubuntu-18.04
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version.linux)
architecture: x64
- script: python version.py
- bash: echo "##vso[build.UpdateBuildNumber]`cat version`"
- job: Windows
dependsOn: UpdateBuildNumber
timeoutInMinutes: 30
strategy:
maxParallel: 2
matrix:
x64:
buildArch: x64
x86:
buildArch: x86
pool:
vmImage: vs2017-win2016
steps:
- powershell: choco install 7zip.install -y
displayName: Install 7z
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version.windows)
architecture: $(buildArch)
- powershell: scripts/build.ps1
displayName: Build
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'pros_cli-$(Build.BuildNumber)-win-$(buildArch)'
targetPath: 'out'
- job: Linux
timeoutInMinutes: 30
dependsOn: UpdateBuildNumber
strategy:
maxParallel: 2
matrix:
x64:
buildArch: x64
# x86:
# buildArch: x86
pool:
vmImage: ubuntu-18.04
steps:
# Microsoft/azure-pipelines-image-generation#225
# - bash: |
# sudo apt-add-repository ppa:deadsnakes/ppa
# sudo apt-get update
# sudo apt-get install python3.6 python3.6-dev python3-setuptools
# displayName: Use Python 3.6
# Hopefully this will work soon
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version.linux)
architecture: $(buildArch)
- bash: scripts/build.sh
displayName: Build
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'pros_cli-$(Build.BuildNumber)-linux-$(buildArch)'
targetPath: 'out'
- job: PublishArtifact
dependsOn:
- UpdateBuildNumber
- Linux
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/develop'), startsWith(variables['Build.SourceBranch'], 'refs/tags/')))
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version.linux)
architecture: x64
- checkout: none
- task: DownloadPipelineArtifact@2
inputs:
artifact: 'pros_cli-$(Build.BuildNumber)-linux-x64'
path: $(System.DefaultWorkingDirectory)
- script: |
pip install --upgrade setuptools
pip install twine
- task: TwineAuthenticate@1
inputs:
artifactFeed: 'pros-cli'
- script: |
twine upload -r pros-cli --config-file $(PYPIRC_PATH) $(System.DefaultWorkingDirectory)/*.whl