/
azure-pipelines-win.yml
executable file
·113 lines (90 loc) · 3.55 KB
/
azure-pipelines-win.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
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.
# -*- mode: yaml -*-
jobs:
- job: win
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 240
strategy:
maxParallel: 4
matrix:
win_c_compilervs2008cxx_compilervs2008python2.7:
CONFIG: win_c_compilervs2008cxx_compilervs2008python2.7
CONDA_BLD_PATH: D:\\bld\\
UPLOAD_PACKAGES: False
win_c_compilervs2015cxx_compilervs2015python3.5:
CONFIG: win_c_compilervs2015cxx_compilervs2015python3.5
CONDA_BLD_PATH: D:\\bld\\
UPLOAD_PACKAGES: False
win_c_compilervs2015cxx_compilervs2015python3.6:
CONFIG: win_c_compilervs2015cxx_compilervs2015python3.6
CONDA_BLD_PATH: D:\\bld\\
UPLOAD_PACKAGES: False
win_c_compilervs2015cxx_compilervs2015python3.7:
CONFIG: win_c_compilervs2015cxx_compilervs2015python3.7
CONDA_BLD_PATH: D:\\bld\\
UPLOAD_PACKAGES: False
steps:
# TODO: Fast finish on azure pipelines?
- script: |
ECHO ON
- script: |
choco install vcpython27 -fdv -y --debug
condition: contains(variables['CONFIG'], 'vs2008')
displayName: Install vcpython27.msi (if needed)
# Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.)
# - script: rmdir C:\cygwin /s /q
# continueOnError: true
- 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 + '\..')
condition: contains(variables['CONFIG'], 'vs2008')
displayName: Patch vs2008 (if needed)
- task: CondaEnvironment@1
inputs:
packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional
installOptions: "-c conda-forge"
updateConda: false
displayName: Install conda-build and activate environment
- script: set PYTHONUNBUFFERED=1
# Configure the VM
- script: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml
# Configure the VM.
- script: |
run_conda_forge_build_setup
displayName: conda-forge build setup
- script: |
rmdir C:\strawberry /s /q
continueOnError: true
displayName: remove strawberryperl
# Special cased version setting some more things!
- script: |
conda.exe build recipe -m .ci_support\%CONFIG%.yaml
displayName: Build recipe (vs2008)
env:
VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin"
PYTHONUNBUFFERED: 1
condition: contains(variables['CONFIG'], 'vs2008')
- script: |
conda.exe build recipe -m .ci_support\%CONFIG%.yaml
displayName: Build recipe
env:
PYTHONUNBUFFERED: 1
condition: not(contains(variables['CONFIG'], 'vs2008'))
- script: |
upload_package .\ .\recipe .ci_support\%CONFIG%.yaml
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
condition: not(eq(variables['UPLOAD_PACKAGES'], 'False'))