forked from ibis-project/ibis
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
171 lines (140 loc) · 5.38 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
jobs:
- job: WindowsTest
pool:
vmImage: 'VS2017-Win2016'
strategy:
maxParallel: 3
matrix:
py35:
python.version: "3.5"
conda.version: "4.5"
conda.env: "ibis_3.5"
py36:
python.version: "3.6"
conda.version: "4.6"
conda.env: "ibis_3.6"
py37:
python.version: "3.7"
conda.version: "4.6"
conda.env: "ibis_3.7"
variables:
AZURECI: 1
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: |
conda config --set always_yes True --set show_channel_urls True
conda config --add channels conda-forge
displayName: 'Set conda configuration'
- script: conda update --all
displayName: 'Update conda'
- script: conda install conda=$(conda.version)
displayName: 'Install an appropriate conda version'
- script: conda create --name $(conda.env) python=$(python.version) numpy pandas pytables ruamel.yaml jinja2 pyarrow multipledispatch pymysql sqlalchemy psycopg2 graphviz click mock plumbum flake8 pytest-xdist
displayName: 'Create conda environment'
- script: conda info
displayName: 'Show conda info'
- script: conda list --name $(conda.env)
displayName: 'Show installed packages'
- script: |
call activate $(conda.env)
python -c "import numpy; import pandas"
displayName: 'Import numpy and pandas'
- script: |
call activate $(conda.env)
flake8
displayName: 'Lint'
#- script: choco install -y mariadb --version=10.3.11
# displayName: 'Install mariadb (mysql) from chocolatey'
# - script: '"C:\\Program Files\\MariaDB 10.3\\bin\\mysql" -u root -e "CREATE OR REPLACE USER ibis@localhost IDENTIFIED BY ''ibis''"'
# displayName: 'Create ibis user and password in MySQL database'
# - script: '"C:\\Program Files\\MariaDB 10.3\\bin\\mysql" -u root -e "GRANT ALL PRIVILEGES ON *.* TO ibis@localhost"'
# displayName: 'Setup privileges for ibis user in MySQL'
- script: choco install -y postgresql10 --params '/Password:postgres'
displayName: 'Install postgres from chocolatey'
- script: |
call activate $(conda.env)
python setup.py develop
displayName: 'Install ibis'
- script: |
call activate $(conda.env)
python ci/datamgr.py download
displayName: 'Download data'
# - script: |
# call activate $(conda.env)
# python ci/datamgr.py mysql
# displayName: 'Load MySQL data'
- script: |
call activate $(conda.env)
python ci/datamgr.py postgres --psql-path="C:/Program Files/PostgreSQL/10/bin/psql.exe"
displayName: 'Load PostgreSQL data'
- script: |
call activate $(conda.env)
python ci/datamgr.py sqlite
displayName: 'Load SQLite data'
- script: |
call activate $(conda.env)
python ci/datamgr.py parquet -i
displayName: 'Load Parquet data'
- script: |
call activate $(conda.env)
pytest --tb=short --junitxml="junit-$(python.version).xml" -n auto -m "not backend and not clickhouse and not impala and not hdfs and not bigquery and not mapd and not mysql" -ra ibis
displayName: 'Run tests'
# publish test results
- task: PublishTestResults@2
displayName: 'Publish test results from pytest JUnitXML'
inputs:
testResultsFiles: junit-$(python.version).xml
testRunTitle: 'Publish test results'
mergeTestResults: False
condition: succeededOrFailed() # pass or fail, but not cancelled
- job: WindowsCondaBuild
pool:
vmImage: 'VS2017-Win2016'
strategy:
maxParallel: 3
matrix:
py36:
python.version: "3.6"
conda.env: "ibis_3.6"
py37:
python.version: "3.7"
conda.env: "ibis_3.7"
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: |
conda config --set always_yes True --set show_channel_urls True
conda config --add channels conda-forge
displayName: 'Set conda configuration'
- script: conda update --all
displayName: 'Update conda'
- script: conda create --name $(conda.env) python=$(python.version) conda-build click jinja2 ruamel.yaml plumbum
displayName: 'Create conda environment'
- script: |
call activate $(conda.env)
python setup.py develop
displayName: 'Install ibis'
- script: |
call activate $(conda.env)
python ci/feedstock.py clone
displayName: 'Clone conda-forge recipe'
- script: |
call activate $(conda.env)
python ci/feedstock.py update
displayName: 'Update conda-forge recipe'
- script: |
call activate $(conda.env)
python ci/feedstock.py build --python=$(python.version)
displayName: 'Build conda package from conda-forge recipe'
- script: |
call activate $(conda.env)
python ci/feedstock.py deploy C:/Miniconda/envs/$(conda.env)/conda-bld conda win-64
displayName: 'Copy conda package to artifact directory'
# publish sdist and wheel and conda package
- task: PublishBuildArtifacts@1
displayName: 'Publish conda package to Azure'
inputs:
pathToPublish: conda
artifactName: conda
condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'False'))