-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
/
Copy pathazure-pipelines.yml
182 lines (167 loc) · 5.74 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
# Adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
jobs:
# Mac and Linux could potentially use the same template
# except it isn't clear how to use a different build matrix
# for each, so for now they are separate
- template: ci/azure/macos.yml
parameters:
name: macOS
vmImage: xcode9-macos10.13
- template: ci/azure/linux.yml
parameters:
name: Linux
vmImage: ubuntu-16.04
# Windows Python 2.7 needs VC 9.0 installed, and not sure
# how to make that a conditional task, so for now these are
# separate templates as well
- template: ci/azure/windows.yml
parameters:
name: Windows
vmImage: vs2017-win2016
- template: ci/azure/windows-py27.yml
parameters:
name: WindowsPy27
vmImage: vs2017-win2016
- job: 'Checks_and_doc'
pool:
vmImage: ubuntu-16.04
timeoutInMinutes: 90
steps:
- script: |
# XXX not sure why setting $PATH here does not work
# echo '##vso[task.setvariable variable=PATH]$HOME/miniconda3/bin:$PATH'
echo '##vso[task.setvariable variable=CONDA_ENV]pandas-dev'
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
echo '##vso[task.setvariable variable=AZURE]true'
displayName: 'Setting environment variables'
# Do not require a conda environment
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/code_checks.sh patterns
displayName: 'Looking for unwanted patterns'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
sudo apt-get install -y libc6-dev-i386
ci/incremental/install_miniconda.sh
ci/incremental/setup_conda_environment.sh
displayName: 'Set up environment'
# Do not require pandas
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh lint
displayName: 'Linting'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh dependencies
displayName: 'Dependencies consistency'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/incremental/build.sh
displayName: 'Build'
condition: true
# Require pandas
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh code
displayName: 'Checks on imported code'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh doctests
displayName: 'Running doctests'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh docstrings
displayName: 'Docstring validation'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
pytest --capture=no --strict scripts
displayName: 'Testing docstring validaton script'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
doc/make.py html
displayName: 'Building docs'
condition: true
- script: |
if [ "$(Build.SourceBranch)" == "refs/heads/master" ]; then
export NAME="master"
else
export NAME=$(System.PullRequest.PullRequestId)
fi
az extension add --name storage-preview
az storage blob upload-batch --connection-string $CONNECTION_STRING \
--source $SOURCE \
--destination $DESTINATION \
--destination-path $NAME
echo "Documentation uploaded to https://pandas.blob.core.windows.net/docs/$NAME"
displayName: 'Publishing docs (Azure storage)'
condition: true
env:
CONNECTION_STRING: $(AZURE_STORAGE_CONNECTION_STRING)
SOURCE: $(Build.SourcesDirectory)/doc/build/html/
DESTINATION: 'docs'
- script: |
echo "Publishing documentation to GitHub pages is still done in Travis"
exit 0
if [ "$(Build.SourceBranch)" == "refs/heads/master" ]; then
mkdir -p $REPO_DIR
rm -rf $REPO_DIR/*
cp -r doc/build/html/* $REPO_DIR/
cd $REPO_DIR
git config --global user.email "[email protected]"
git config --global user.name "pandas-docs-bot"
git init
touch README
git add README
git commit -m "Initial commit" --allow-empty
git branch gh-pages
git checkout gh-pages
touch .nojekyll
git add --all .
git commit -m "Version" --allow-empty
git remote remove origin
git remote add origin "https://${TOKEN}@github.com/pandas-dev/pandas-docs-travis.git"
git fetch origin
git remote -v
git push origin gh-pages -f
fi
displayName: 'Publishing docs (GitHub pages)'
condition: true
env:
REPO_DIR: $(Build.ArtifactStagingDirectory)/pandas-docs-travis
TOKEN: $(GITHUB_DOCS_TOKEN)
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
git remote add upstream https://github.com/pandas-dev/pandas.git
git fetch upstream
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
cd asv_bench
asv machine --yes
ASV_OUTPUT="$(asv dev)"
if [[ $(echo "$ASV_OUTPUT" | grep "failed") ]]; then
echo "##vso[task.logissue type=error]Benchmarks run with errors"
echo $ASV_OUTPUT
exit 1
else
echo "Benchmarks run without errors"
fi
else
echo "Benchmarks did not run, no changes detected"
fi
displayName: 'Running benchmarks'
condition: true