forked from conda/conda-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
executable file
·340 lines (306 loc) · 12.7 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
pr:
autoCancel: true
branches:
include:
- master
jobs:
- job: 'Linux'
pool:
vmImage: ubuntu-16.04
strategy:
maxParallel: 10
matrix:
# py37-canary:
# PYTHON_VERSION: '3.7'
# CONDA_VERSION: 'release'
py37-release:
PYTHON_VERSION: '3.7'
CONDA_VERSION: 'release'
# py38-canary:
# PYTHON_VERSION: '3.8'
# CONDA_VERSION: 'release'
py38-release:
PYTHON_VERSION: '3.8'
CONDA_VERSION: 'release'
py39-release:
PYTHON_VERSION: '3.9'
CONDA_VERSION: 'canary'
timeoutInMinutes: 480
steps:
- script: |
set -e -u
sudo apt update
sudo apt install attr -y
source ci/azurepipelines/activate_conda "/usr/share/miniconda/bin/python"
conda info
ps -ef | grep $$
conda list
grep '^#' "${CONDA_PREFIX}/conda-meta/history"
conda install python=$PYTHON_VERSION -y
mkdir -p /usr/share/miniconda/locks
mkdir -p /usr/share/miniconda/bin
chmod a-w /usr/share/miniconda/locks
if [ "$CONDA_VERSION" = "release" ]; then
conda update -y conda
else
conda install -y -c conda-canary conda
fi
conda config --set always_yes yes
conda config --set auto_update_conda False
conda info
source ci/azurepipelines/install_conda_build_test_deps
pip install --no-deps .
conda info -a
source ci/azurepipelines/setup_pytest_replay
displayName: Preparing test environment
- script: |
set -e -u
source ci/azurepipelines/activate_conda "/usr/share/miniconda/bin/python"
conda install conda-verify -y
py.test --color=yes -vv -n 0 --basetemp /tmp/cb_serial --cov conda_build --cov-report xml -m "serial" tests --test-run-title="Linux-SerialTests-$CONDA_VERSION-Py$PYTHON_VERSION" "${PYTEST_REPLAY_OPTIONS[@]+"${PYTEST_REPLAY_OPTIONS[@]}"}"
displayName: 'Serial Tests'
- script: |
set -e -u
source ci/azurepipelines/activate_conda "/usr/share/miniconda/bin/python"
conda remove conda-verify -y
echo "safety_checks: disabled" >> ~/.condarc
echo "local_repodata_ttl: 1800" >> ~/.condarc
mkdir -p ~/.conda
conda create -n blarg1 -yq python=2.7
conda create -n blarg3 -yq python=3.7
conda create -n blarg4 -yq python nomkl numpy pandas svn
source ci/azurepipelines/activate_conda "/usr/share/miniconda/bin/python"
py.test --color=yes -vv -n auto --basetemp /tmp/cb --cov conda_build --cov-append --cov-report xml -m "not serial" tests --test-run-title="Linux-ParallelTests-$CONDA_VERSION-Python$PYTHON_VERSION" "${PYTEST_REPLAY_OPTIONS[@]+"${PYTEST_REPLAY_OPTIONS[@]}"}"
displayName: 'Parallel Tests'
- publish: $(Build.ArtifactStagingDirectory)/pytest-replay
artifact: 'Linux-$(CONDA_VERSION)-Py$(PYTHON_VERSION)'
condition: always()
- job: 'macOS'
pool:
vmImage: 'macOS-10.14'
strategy:
maxParallel: 10
matrix:
#py37-canary:
# PYTHON_VERSION: '3.7'
# CONDA_VERSION: 'canary'
# INSTALL_XCODE: '0'
py37-release:
PYTHON_VERSION: '3.7'
CONDA_VERSION: 'release'
INSTALL_XCODE: '0'
py38-release:
PYTHON_VERSION: '3.8'
CONDA_VERSION: 'release'
INSTALL_XCODE: '0'
py39-release:
PYTHON_VERSION: '3.9'
CONDA_VERSION: 'release'
INSTALL_XCODE: '0'
timeoutInMinutes: 480
steps:
# TODO: Fast finish on azure pipelines?
- script: |
echo "Fast Finish"
- script: |
echo "Removing homebrew from Azure to avoid conflicts."
set -e -u
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
chmod +x ~/uninstall_homebrew
~/uninstall_homebrew -f -q
rm ~/uninstall_homebrew
displayName: Remove homebrew
- script: |
echo "Installing Miniconda"
set -x -e -u
curl -o $(Build.StagingDirectory)/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
chmod +x $(Build.StagingDirectory)/miniconda.sh
$(Build.StagingDirectory)/miniconda.sh -b -p $(Build.StagingDirectory)/miniconda
source ci/azurepipelines/activate_conda "$(Build.StagingDirectory)/miniconda/bin/python"
echo "Setting up Conda environment"
displayName: 'Install miniconda'
- script: |
echo "Setup CF macOS bits and select Xcode"
set -x -e -u
source ci/azurepipelines/activate_conda "$(Build.StagingDirectory)/miniconda/bin/python"
echo "PWD is $PWD"
find $PWD
source ci/azurepipelines/run_conda_forge_build_setup_osx
displayName: 'Setup CF macOS bits and select Xcode'
- script: |
set -e -u
source ci/azurepipelines/activate_conda "$(Build.StagingDirectory)/miniconda/bin/python"
conda info
conda list
grep '^#' "${CONDA_PREFIX}/conda-meta/history"
conda install python=$PYTHON_VERSION -y
mkdir -p $(Build.StagingDirectory)/miniconda/locks
mkdir -p $(Build.StagingDirectory)/miniconda/bin
chmod -w $(Build.StagingDirectory)/miniconda/locks
if [ "$CONDA_VERSION" = "release" ]; then
conda update -y conda;
else
conda install -y -c conda-canary conda;
fi
conda config --set always_yes yes
conda config --set auto_update_conda False
conda info
source ci/azurepipelines/install_conda_build_test_deps
pip install --no-deps .
conda info -a
conda list --show-channel-urls
source ci/azurepipelines/setup_pytest_replay
displayName: Preparing test environment
- script: |
set -e -u
source ci/azurepipelines/activate_conda "$(Build.StagingDirectory)/miniconda/bin/python"
conda install conda-verify -y
py.test --color=yes -v -n 0 --basetemp /tmp/cb_serial --cov conda_build --cov-report xml -m "serial" tests --test-run-title="macOS-SerialTests-$CONDA_VERSION-Python$PYTHON_VERSION" "${PYTEST_REPLAY_OPTIONS[@]+"${PYTEST_REPLAY_OPTIONS[@]}"}"
displayName: 'Serial Tests'
- script: |
set -e -u
source ci/azurepipelines/activate_conda "$(Build.StagingDirectory)/miniconda/bin/python"
conda remove conda-verify -y
echo "safety_checks: disabled" >> ~/.condarc
echo "local_repodata_ttl: 1800" >> ~/.condarc
mkdir -p ~/.conda
conda create -n blarg1 -yq python=2.7
conda create -n blarg3 -yq python=3.7
conda create -n blarg4 -yq python nomkl numpy pandas svn
py.test --color=yes -v -n auto --basetemp /tmp/cb --cov conda_build --cov-append --cov-report xml -m "not serial" tests --test-run-title="macOS-ParallelTests-$CONDA_VERSION-Python$PYTHON_VERSION" "${PYTEST_REPLAY_OPTIONS[@]+"${PYTEST_REPLAY_OPTIONS[@]}"}"
displayName: 'Parallel Tests'
- publish: $(Build.ArtifactStagingDirectory)/pytest-replay
artifact: 'macOS-$(CONDA_VERSION)-Py$(PYTHON_VERSION)'
condition: always()
- job: 'Windows'
pool:
vmImage: "vs2017-win2016"
strategy:
maxParallel: 10
matrix:
py37-release:
PYTHON_VERSION: '3.7'
CONDA_VERSION: 'release'
#py37-canary:
# PYTHON_VERSION: '3.7'
# CONDA_VERSION: 'canary'
py38-release:
PYTHON_VERSION: '3.8'
CONDA_VERSION: 'release'
#py38-canary:
# PYTHON_VERSION: '3.8'
# CONDA_VERSION: 'canary'
py39-release:
PYTHON_VERSION: '3.9'
CONDA_VERSION: 'release'
timeoutInMinutes: 480
steps:
- checkout: self
persistCredentials: true
- task: UsePythonVersion@0
inputs:
versionSpec: '$(PYTHON_VERSION)'
# SHA256 checksum (070474db76a2e625513a5835df4595df9324d820f9cc97eab2a596dcbc2f5cbf) is identical for
# https://web.archive.org/web/20210106040224/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
# and
# https://github.com/GeoNode/geonode-win-installer/raw/ffb76c7cbf1d6b4970c6c25f79c3c7682a3aa035/VCForPython27.msi
- powershell: |
$wc = New-Object net.webclient
$wc.Downloadfile("https://github.com/GeoNode/geonode-win-installer/raw/ffb76c7cbf1d6b4970c6c25f79c3c7682a3aa035/VCForPython27.msi", "VCForPython27.msi")
Start-Process "VCForPython27.msi" /qn -Wait
displayName: Install vcpython27.msi
- script: |
rmdir C:\Strawberry /s /q
choco install wget
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
start /wait "" Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /S /D=%UserProfile%\Miniconda3
"%UserProfile%\Miniconda3\condabin\conda.bat" init
conda info -a
displayName: Install miniconda
- powershell: |
Set-PSDebug -Trace 1
$batchcontent = @"
ECHO ON
SET vcpython=C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0
DIR "%vcpython%"
CALL "%vcpython%\vcvarsall.bat" %*
"@
$batchDir = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC"
$batchPath = "$batchDir" + "\vcvarsall.bat"
New-Item -Path $batchPath -ItemType "file" -Force
Set-Content -Value $batchcontent -Path $batchPath
Get-ChildItem -Path $batchDir
Get-ChildItem -Path ($batchDir + '\..')
set LIB
displayName: Patch vs2008
- script: |
echo on
set PATH
doskey conda="call %UserProfile%\Miniconda3\condabin\conda.bat" $*
doskey /macros
call "%UserProfile%\Miniconda3\condabin\conda.bat" init
set PATH
displayName: conda init
- script: |
echo on
set PATH
call %UserProfile%\Miniconda3\condabin\activate.bat base||exit 1
set PATH
call conda install python="%PYTHON_VERSION%" -y||exit 1
if "%CONDA_VERSION%" == "canary" (call conda update -c conda-canary conda||exit 1) else (call conda update -q conda||exit 1)
call conda config --set always_yes yes
call conda config --set auto_update_conda no
call conda info
python -c "import sys; print(sys.version)"
python -c "import sys; print(sys.executable)"
python -c "import sys; print(sys.prefix)"
call conda update -q --all||exit 1
call conda install -q pip python-libarchive-c pytest git pytest-cov jinja2 m2-patch flake8 mock requests contextlib2 chardet glob2 perl pyflakes pycrypto posix m2-git anaconda-client numpy beautifulsoup4 pytest-xdist pytest-mock filelock pkginfo psutil pytz tqdm conda-package-handling pytest-azurepipelines||exit 1
call conda install pytest-replay pytest-rerunfailures -y||exit 1
echo safety_checks: disabled >> %UserProfile%\.condarc
echo local_repodata_ttl: 1800 >> %UserProfile%\.condarc
call conda install -q py-lief||exit 1
python --version
python -c "import struct; print(struct.calcsize('P') * 8)"
pip install --no-deps .
conda-build --version
pushd .. && git clone https://github.com/conda/conda_build_test_recipe && popd
mkdir %UserProfile%\cbtmp_serial
mkdir %UserProfile%\cbtmp
for /d %%F in (%UserProfile%\cbtmp_serial\*) do rd /s /q "%%F"
for /d %%F in (%UserProfile%\cbtmp\*) do rd /s /q "%%F"
call conda create -n blarg -yq --download-only python=2.7||exit 1
call conda create -n blarg -yq --download-only python=3.8||exit 1
call conda create -n blarg -yq --download-only python cmake||exit 1
mkdir $(Build.ArtifactStagingDirectory)\\pytest-replay
set "PYTEST_REPLAY_OPTIONS=--replay-record-dir=$(Build.ArtifactStagingDirectory)\\pytest-replay --replay-base-name=Win-%CONDA_VERSION%-Py%PYTHON_VERSION%"
echo "##vso[task.setvariable variable=PYTEST_REPLAY_OPTIONS]%PYTEST_REPLAY_OPTIONS%"
displayName: 'Configuration'
- script: |
echo on
set PATH
call %UserProfile%\Miniconda3\condabin\activate.bat base||exit 1
set PATH
call conda install -y conda-verify||exit 1
set PERL=
set LUA=
set R=
py.test --color=yes -v --cov conda_build --cov-report xml tests --basetemp %UserProfile%\cbtmp_serial -n 0 -m "serial" --test-run-title="Win-SerialTests-%CONDA_VERSION%-Python%PYTHON_VERSION%" %PYTEST_REPLAY_OPTIONS%
displayName: 'Serial Tests'
- script: |
echo on
set PATH
call %UserProfile%\Miniconda3\condabin\activate.bat base||exit 1
set PATH
call conda remove -y conda-verify||exit 1
set PERL=
set LUA=
set R=
py.test --color=yes -v --cov conda_build --cov-report xml --cov-append tests --basetemp %UserProfile%\cbtmp -n auto -m "not serial" --test-run-title="Win-ParallelTests-%CONDA_VERSION%-Python%PYTHON_VERSION%" %PYTEST_REPLAY_OPTIONS%
env:
VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin"
LIB:
displayName: 'Parallel Tests'
- publish: $(Build.ArtifactStagingDirectory)/pytest-replay
artifact: 'Win-$(CONDA_VERSION)-Python$(PYTHON_VERSION)'
condition: always()