qiskit/.azure/tutorials-linux.yml

56 lines
1.7 KiB
YAML

parameters:
- name: "pythonVersion"
type: string
displayName: "Version of Python to test"
jobs:
- job: "Tutorials"
pool: {vmImage: 'ubuntu-latest'}
variables:
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
QISKIT_CELL_TIMEOUT: 300
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '${{ parameters.pythonVersion }}'
displayName: 'Use Python ${{ parameters.pythonVersion }}'
- bash: |
set -e
git clone https://github.com/Qiskit/qiskit-tutorials --depth=1
python -m pip install --upgrade pip
pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt
pip install -c constraints.txt -e .
pip install "qiskit-ibmq-provider" "qiskit-aer" "z3-solver" "networkx" "matplotlib>=3.3.0" sphinx nbsphinx sphinx_rtd_theme cvxpy -c constraints.txt
sudo apt-get update
sudo apt-get install -y graphviz pandoc
pip check
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- bash: |
set -e
cd qiskit-tutorials
sphinx-build -b html . _build/html
env:
QISKIT_PARALLEL: False
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'qiskit-tutorials/_build/html'
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/html_tutorials.tar.gz'
verbose: true
- task: PublishBuildArtifacts@1
displayName: 'Publish docs'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'html_tutorials'
Parallel: true
ParallelCount: 8