forked from slaclab/pydm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-build-template.yml
79 lines (69 loc) · 2.06 KB
/
azure-build-template.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
jobs:
- job: 'Build'
pool:
vmImage: 'Ubuntu 18.04'
variables:
PYTHON: 3.7.3
BUILD_DOCS: 1
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Linux - Add conda to PATH'
condition: eq(variables['agent.os'], 'Linux' )
# Linux
- bash: |
# Fix Anaconda permissions
sudo install -d -m 0777 /usr/share/miniconda/
sudo install -d -m 0777 /usr/share/miniconda/envs
displayName: 'Linux - Prepare OS'
condition: eq(variables['agent.os'], 'Linux' )
- bash: |
conda config --set always_yes yes
conda config --set channel_priority strict
conda config --set show_channel_urls yes
conda config --add channels conda-forge
displayName: 'Anaconda - Configure'
- bash: |
conda create --name build-environment python=$(PYTHON) conda-build anaconda-client
displayName: 'Anaconda - Create'
- bash: |
source activate build-environment
conda build conda-recipe --output-folder bld-dir
displayName: 'Anaconda - Build PyDM Package'
- task: PublishBuildArtifacts@1
displayName: 'Publish - Anaconda Package'
inputs:
PathtoPublish: 'bld-dir'
ArtifactName: 'anaconda_package'
- bash: |
conda config --add channels 'file:///$(Build.Repository.LocalPath)/bld-dir'
source activate build-environment
conda install pydm
displayName: 'Anaconda - Configure - Add local bld-dir'
- bash: |
source activate build-environment
pip install -r docs-requirements.txt
pushd docs
make html
popd
displayName: 'Documentation - Build HTML'
condition: |
and(
and(
eq(variables['agent.os'], 'Linux' ),
eq(variables['BUILD_DOCS'], 1)
),
succeeded()
)
- task: PublishBuildArtifacts@1
displayName: 'Publish - Documentation'
inputs:
PathtoPublish: 'docs/build/html/'
ArtifactName: 'docs_html'
condition: |
and(
and(
eq(variables['agent.os'], 'Linux' ),
eq(variables['BUILD_DOCS'], 1)
),
succeeded()
)