forked from Qiskit/qiskit-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
62 lines (61 loc) · 1.63 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
trigger:
branches:
include:
- master
- stable/*
pr:
autoCancel: true
branches:
include:
- '*'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.7'
variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- task: Cache@2
inputs:
key: 'pip | "$(Agent.OS)" | "$(python.version)" | "$(Build.BuildNumber)"'
restoreKeys: |
pip | "$(Agent.OS)" | "$(python.version)"
pip | "$(Agent.OS)"
pip
path: $(PIP_CACHE_DIR)
displayName: Cache pip
- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel virtualenv
virtualenv /tmp/docs_build
source /tmp/docs_build/bin/activate
pip install -c constraints.txt -U qiskit jupyter sphinx nbsphinx sphinx_rtd_theme networkx scikit-learn
pip install -c constraints.txt 'matplotlib<3.3'
pip install -c constraints.txt -U qiskit[visualization] cvxpy
pip install -c constraints.txt pyscf
sudo apt-get install -y pandoc graphviz
displayName: 'Install dependencies'
- bash: |
set -e
source /tmp/docs_build/bin/activate
sphinx-build -b html . _build/html
displayName: 'Build Docs'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '_build/html'
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/html_docs.tar.gz'
verbose: true
- task: PublishBuildArtifacts@1
displayName: 'Publish docs'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'html_docs'
Parallel: true
ParallelCount: 8