forked from qiskit-community/qiskit-ignis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
96 lines (93 loc) · 3.88 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
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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- master
- stable
jobs:
- job: 'Docs'
pool: {vmImage: 'ubuntu-16.04'}
strategy:
matrix:
Python37:
python.version: '3.7'
steps:
- checkout: self
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- bash: |
set -e
python -m pip install --upgrade pip virtualenv
pip install -U tox
python setup.py build_ext --inplace
displayName: 'Install dependencies'
- bash: |
tox -edocs -- -j auto
displayName: 'Run Docs build'
- task: PublishBuildArtifacts@1
displayName: 'Publish docs'
inputs:
pathtoPublish: 'docs/_build/html'
artifactName: 'html_docs'
- job: 'windows'
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Python35:
python.version: '3.5'
TOXENV: py35
OPENBLAS: https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-5f998ef_gcc7_1_0_win64.zip
Python36:
python.version: '3.6'
TOXENV: py36
Python37:
python.version: '3.7'
TOXENV: py37
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name qiskit-ignis python=%PYTHON_VERSION%
displayName: Create Anaconda environment
- script: |
call activate qiskit-ignis
conda install --yes --quiet --name qiskit-ignis --channel conda-forge python=%PYTHON_VERSION% scs
displayName: Install Anaconda packages
condition: ne(variables['python.version'], '3.5')
- powershell: (new-object System.Net.WebClient).DownloadFile($env:OPENBLAS, 'c:\openblas.zip')
condition: eq(variables['python.version'], '3.5')
displayName: 'Download openblas'
- powershell: Expand-Archive c:\openblas.zip c:\openblas
condition: eq(variables['python.version'], '3.5')
displayName: 'Unzip openblas'
- script: |
call activate qiskit-ignis
conda install --yes --quiet --update-all --name qiskit-ignis python=%PYTHON_VERSION% numpy scipy
displayName: Install Anaconda packages
condition: eq(variables['python.version'], '3.5')
- script: |
call activate qiskit-ignis
set PATH=%PATH%;%BINPATH%;C:\openblas\%64%\bin;
echo %PATH%
dir C:\openblas\%ARCH%\bin
make.exe CC="gcc.exe -m64" USE_LAPACK=1 BLASLDFLAGS="-LC:\openblas\64\bin -lopenblas_5f998ef_gcc7_1_0"
make.exe install
git clone --recursive https://github.com/bodono/scs-python.git
cd scs-python
python setup.py install --scs 'CC="gcc.exe -m64" USE_LAPACK=1 BLASLDFLAGS="-LC:\openblas\64\bin -lopenblas_5f998ef_gcc7_1_0"'
cd ..
condition: eq(variables['python.version'], '3.5')
displayName: 'Install scs from source for python 3.5'
- script: |
call activate qiskit-ignis
conda install --yes --quiet --name qiskit-ignis python=%PYTHON_VERSION% mkl
displayName: 'Install MKL'
- script: |
call activate qiskit-ignis
python -m pip install -c constraints.txt --upgrade pip virtualenv setuptools
pip install -c constraints.txt -U tox
tox --sitepackages -e%TOXENV%
displayName: 'Install dependencies and run tests'