-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathazure-pipelines-win.yml
More file actions
executable file
·95 lines (85 loc) · 3.23 KB
/
azure-pipelines-win.yml
File metadata and controls
executable file
·95 lines (85 loc) · 3.23 KB
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
# 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: windows-2022
strategy:
matrix:
win_64_python3.10.____cpython:
CONFIG: win_64_python3.10.____cpython
UPLOAD_PACKAGES: 'True'
win_64_python3.11.____cpython:
CONFIG: win_64_python3.11.____cpython
UPLOAD_PACKAGES: 'True'
win_64_python3.8.____cpython:
CONFIG: win_64_python3.8.____cpython
UPLOAD_PACKAGES: 'True'
win_64_python3.9.____cpython:
CONFIG: win_64_python3.9.____cpython
UPLOAD_PACKAGES: 'True'
timeoutInMinutes: 360
variables:
CONDA_BLD_PATH: D:\\bld\\
UPLOAD_TEMP: D:\\tmp
steps:
- task: PythonScript@0
displayName: 'Download Miniforge'
inputs:
scriptSource: inline
script: |
import urllib.request
url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe'
path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe"
urllib.request.urlretrieve(url, path)
- script: |
start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge
displayName: Install Miniforge
- powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts"
displayName: Add conda to PATH
- script: |
call activate base
mamba.exe install "python=3.10" conda-build conda pip boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes
displayName: Install conda-build
- script: set PYTHONUNBUFFERED=1
displayName: Set PYTHONUNBUFFERED
# Configure the VM
- script: |
call activate base
setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml
displayName: conda-forge CI setup
# Configure the VM.
- script: |
set "CI=azure"
call activate base
run_conda_forge_build_setup
displayName: conda-forge build setup
- script: |
call activate base
if EXIST LICENSE.txt (
copy LICENSE.txt "recipe\\recipe-scripts-license.txt"
)
conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables
displayName: Build recipe
env:
PYTHONUNBUFFERED: 1
- script: |
set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%"
call activate base
validate_recipe_outputs "%FEEDSTOCK_NAME%"
displayName: Validate Recipe Outputs
- script: |
set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%"
set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%"
set "TEMP=$(UPLOAD_TEMP)"
if not exist "%TEMP%\" md "%TEMP%"
set "TMP=%TEMP%"
call activate base
upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml
displayName: Upload package
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN)
STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN)
condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest')))