Skip to content

Commit

Permalink
Avoid reuse in azure pipelines and split build out (Qiskit#260)
Browse files Browse the repository at this point in the history
* Avoid reuse in azure pipelines job configuration

In the azure pipelines runs for Qiskit#258 the jobs are failing for what looks
like a mismatch with the installed aer python package and what should
have been built. Just to rule that out for runs this commit makes 2
changes. First it creates a conda environment/virtualenv with a unique
name for each run. Secondly it runs git clean to remove any old built
wheels (assuming there are any). Hopefully this will provide more
reliability in future runs.
  • Loading branch information
mtreinish authored and chriseclectic committed Jul 3, 2019
1 parent e73b362 commit 6fcc583
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,25 @@ strategy:
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name qiskit-aer
- script: conda create --yes --quiet --name qiskit-aer-$(Build.BuildNumber)
displayName: Create Anaconda environment
- script: |
call activate qiskit-aer
conda install --yes --quiet --name qiskit-aer python=%PYTHON_VERSION% numpy
call activate qiskit-aer-$(Build.BuildNumber)
conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy
displayName: Install Anaconda packages
- script: |
call activate qiskit-aer
- bash: |
set -e
source activate qiskit-aer-$(Build.BuildNumber)
git clean -fdX
python -m pip install --disable-pip-version-check pip==18
pip install cython
pip install git+https://github.com/Qiskit/qiskit-terra.git
pip install --ignore-installed -r requirements-dev.txt
python setup.py bdist_wheel -- -G "Visual Studio 15 2017 Win64"
pip install --find-links=dist\ qiskit_aer
displayName: 'Install Dependencies and Build Aer'
- bash: |
set -e
source activate qiskit-aer-$(Build.BuildNumber)
pip install dist/qiskit_aer*.whl
python -m unittest discover -s test/terra -v
displayName: 'Install dependencies and Run Tests'
displayName: 'Install Aer and Run Tests'

0 comments on commit 6fcc583

Please sign in to comment.