-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathazure-pipelines-win.yml
More file actions
executable file
·114 lines (102 loc) · 4.2 KB
/
Copy pathazure-pipelines-win.yml
File metadata and controls
executable file
·114 lines (102 loc) · 4.2 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# 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-2019
strategy:
matrix:
win_64_build_typedebugchannel_targetsconda-forge_mainopenssl1.1.1:
CONFIG: win_64_build_typedebugchannel_targetsconda-forge_mainopenssl1.1.1
UPLOAD_PACKAGES: 'True'
SHORT_CONFIG: win_64_build_typedebugchannel_targe_h2b86c86fd2
win_64_build_typedebugchannel_targetsconda-forge_mainopenssl3:
CONFIG: win_64_build_typedebugchannel_targetsconda-forge_mainopenssl3
UPLOAD_PACKAGES: 'True'
SHORT_CONFIG: win_64_build_typedebugchannel_targe_h64a7865dd2
timeoutInMinutes: 360
variables:
CONDA_BLD_PATH: D:\\bld\\
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.9" conda-build conda pip boa conda-forge-ci-setup=3 "py-lief<0.12" -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 CI=azure
set CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt)
set FEEDSTOCK_NAME=$(build.Repository.Name)
set ARTIFACT_STAGING_DIR=$(Build.ArtifactStagingDirectory)
set CONDA_BLD_DIR=$(CONDA_BLD_PATH)
set BLD_ARTIFACT_PREFIX=conda_artifacts
if "%AGENT_JOBSTATUS%" == "Failed" (
set ENV_ARTIFACT_PREFIX=conda_envs
)
call ".scripts\create_conda_build_artifacts.bat"
displayName: Prepare conda build artifacts
condition: succeededOrFailed()
- task: PublishPipelineArtifact@1
displayName: Store conda build artifacts
condition: not(eq(variables.BLD_ARTIFACT_PATH, ''))
inputs:
targetPath: $(BLD_ARTIFACT_PATH)
artifactName: $(BLD_ARTIFACT_NAME)
- task: PublishPipelineArtifact@1
displayName: Store conda build environment artifacts
condition: not(eq(variables.ENV_ARTIFACT_PATH, ''))
inputs:
targetPath: $(ENV_ARTIFACT_PATH)
artifactName: $(ENV_ARTIFACT_NAME)
- 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:*/=%"
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')))