forked from pygae/clifford
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
183 lines (156 loc) · 6.21 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- master
jobs:
- job: 'Test'
strategy:
matrix:
linuxPython35:
imageName: 'ubuntu-16.04'
python.version: '3.5'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo apt-get install python3-setuptools && sudo python3 setup.py develop --no-deps'
linuxPython36:
imageName: 'ubuntu-16.04'
python.version: '3.6'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo apt-get install python3-setuptools && sudo python3 setup.py develop --no-deps'
linuxPython37:
imageName: 'ubuntu-16.04'
python.version: '3.7'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo apt-get install python3-setuptools && sudo python3 setup.py develop --no-deps'
linuxPython38:
imageName: 'ubuntu-16.04'
python.version: '3.8'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo apt-get install python3-setuptools && sudo python3 setup.py develop --no-deps'
linuxPython38NumbaDev:
imageName: 'ubuntu-16.04'
python.version: '3.8'
numbacommand: '-c numba/label/dev numba'
installPackageCommand: 'sudo apt-get install python3-setuptools && sudo python3 setup.py develop --no-deps'
macPython35:
imageName: 'macos-10.13'
python.version: '3.5'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo python setup.py develop --no-deps'
macPython36:
imageName: 'macos-10.13'
python.version: '3.6'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo python setup.py develop --no-deps'
macPython37:
imageName: 'macos-10.13'
python.version: '3.7'
numbacommand: '-c numba numba'
installPackageCommand: 'sudo python setup.py develop --no-deps'
# TODO[gh-226]: Add a 3.8 run for macos
macPython37NumbaDev:
imageName: 'macos-10.13'
python.version: '3.7'
numbacommand: '-c numba/label/dev numba'
installPackageCommand: 'sudo python setup.py develop --no-deps'
windowsPython35:
imageName: 'vs2017-win2016'
python.version: '3.5'
numbacommand: '-c numba numba'
installPackageCommand: 'python setup.py install'
windowsPython36:
imageName: 'vs2017-win2016'
python.version: '3.6'
numbacommand: '-c numba numba'
installPackageCommand: 'python setup.py develop'
windowsPython37:
imageName: 'vs2017-win2016'
python.version: '3.7'
numbacommand: '-c numba numba'
installPackageCommand: 'python setup.py develop'
windowsPython38:
imageName: 'vs2017-win2016'
python.version: '3.8'
numbacommand: '-c numba numba'
installPackageCommand: 'python setup.py develop'
windowsPython38NumbaDev:
imageName: 'vs2017-win2016'
python.version: '3.8'
numbacommand: '-c numba/label/dev numba'
installPackageCommand: 'python setup.py develop'
pool:
vmImage: $(imageName)
steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH linux
condition: eq(variables['imageName'], 'ubuntu-16.04')
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH mac
condition: eq(variables['imageName'], 'macos-10.13')
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH windows
condition: eq(variables['imageName'], 'vs2017-win2016')
- script: conda create --yes --quiet --name myEnvironment
displayName: Create Anaconda environment windows
condition: eq(variables['imageName'], 'vs2017-win2016')
- bash: conda create --yes --quiet --name myEnvironment
displayName: Create Conda environment not windows
condition: ne(variables['imageName'], 'vs2017-win2016')
- script: |
call activate myEnvironment
conda update -n base -y -c defaults conda
conda update -y conda
displayName: Update conda env windows
condition: eq(variables['imageName'], 'vs2017-win2016')
- script: |
call activate myEnvironment
conda install --yes python=$(python.version) h5py pytest setuptools scipy numpy
conda install --yes -c conda-forge sparse
conda install --yes $(numbacommand)
displayName: Install dependencies windows
condition: eq(variables['imageName'], 'vs2017-win2016')
- script: |
call activate myEnvironment
$(installPackageCommand)
displayName: Install package windows
condition: eq(variables['imageName'], 'vs2017-win2016')
- bash: |
source activate myEnvironment
conda update -n base -y -c defaults conda
conda update -y conda
conda install --yes python=$(python.version) h5py pytest setuptools scipy numpy
conda install --yes -c conda-forge sparse
conda install --yes $(numbacommand)
python -m pip install -U pytest
$(installPackageCommand)
displayName: Install dependencies not windows
condition: ne(variables['imageName'], 'vs2017-win2016')
- bash: |
source activate myEnvironment
pip install -U pytest
pytest clifford/test --doctest-modules --junitxml=junit/test-results.xml
displayName: pytest not windows
condition: ne(variables['imageName'], 'vs2017-win2016')
- script: |
call activate myEnvironment
pip install -U pytest
pytest clifford/test --doctest-modules --junitxml=junit/test-results.xml
displayName: pytest windows
condition: eq(variables['imageName'], 'vs2017-win2016')
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(imageName) $(python.version)'
condition: succeededOrFailed()
- job: 'Publish'
dependsOn: 'Test'
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- script: python setup.py sdist
displayName: 'Build sdist'