-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
azure-pipelines.yml
150 lines (128 loc) · 4 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
# https://dev.azure.com/spyder-ide/spyder-terminal/
jobs:
################################################################################
# macOS
################################################################################
- job: 'macOS'
pool:
vmImage: 'macOS-10.13'
timeoutInMinutes: 100
variables:
USE_CONDA: "yes"
CI: True
AZURE: True
SPYDER_DEV: True
# Run the pipeline with multiple Python versions
strategy:
matrix:
Python27:
python.version: '2.7'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 4
steps:
# Set the UsePythonVersion task to reference the matrix variable for its Python version
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: sudo chown -R 501:20 /Users/runner/.conda
displayName: Fix .conda permissions
- script: sudo install -d -m 0777 /usr/local/miniconda/envs/
displayName: Fix conda env permissions
# Conda setup environment.
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/conda-environment?view=vsts
- task: CondaEnvironment@0
inputs:
environmentName: 'test'
packageSpecs: 'python=$(python.version)'
# Install dependencies
- script: |
./continuous_integration/azure/install.sh
displayName: 'Install dependencies'
continueOnError: false
# Show Conda Build Env
- script: |
conda list
displayName: 'Show build environment'
continueOnError: true
# Run Tests
- script: |
./continuous_integration/azure/runtests.sh || ./continuous_integration/azure/runtests.sh || ./continuous_integration/azure/runtests.sh || ./continuous_integration/azure/runtests.sh
displayName: 'Run tests'
continueOnError: false
# Publish test results to the Azure DevOps server
- task: PublishTestResults@2
inputs:
testResultsFiles: 'result.xml'
testRunTitle: 'macOS - Python $(python.version)'
condition: succeededOrFailed()
################################################################################
# Windows
################################################################################
- job: 'Windows'
pool:
vmImage: 'vs2017-win2016'
timeoutInMinutes: 100
variables:
CI: True
AZURE: True
PYTHON: "C:\\Miniconda"
PYWINPTY_BLOCK: 0
SPYDER_DEV: True
CODECOV_TOKEN: "273c981b-7851-4895-a4bb-07377c67791e"
# Run the pipeline with multiple Python versions
strategy:
matrix:
Python36:
python.version: '3.6'
use.conda: "yes"
# Python37:
# python.version: '3.7'
# use.conda: "no"
maxParallel: 4
steps:
# Set the UsePythonVersion task to reference the matrix variable for its Python version
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
# Conda setup environment.
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/conda-environment?view=vsts
- task: CondaEnvironment@0
inputs:
environmentName: 'test'
packageSpecs: 'python=$(python.version)'
updateConda: false
# Install dependencies
- script: |
continuous_integration\azure\install.bat
displayName: 'Install dependencies'
continueOnError: false
# Show Conda Build Env
- script: |
conda list
displayName: 'Show build environment'
continueOnError: true
# Setup Build
- script: |
python setup.py build_static
displayName: 'Setup build'
continueOnError: false
# Run tests
- script: |
python runtests.py
displayName: 'Run tests'
continueOnError: false
- script: |
continuous_integration\azure\runcodecov.bat
displayName: 'Run code coverage'
continueOnError: false
# Publish test results to the Azure DevOps server
- task: PublishTestResults@2
inputs:
testResultsFiles: 'result.xml'
testRunTitle: 'Windows - Python $(python.version)'
condition: succeededOrFailed()