Skip to content

Commit

Permalink
Use conda for macOS jobs
Browse files Browse the repository at this point in the history
The pip installable numpy is causing segfaults on catalina and mojave
environments. To workaround this issue this commit switches to using a
conda install for the macos jobs only.
  • Loading branch information
mtreinish committed Feb 15, 2020
1 parent d5029e3 commit 1f3ba87
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,17 @@ stages:
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- script: conda create --yes --quiet --name qiskit-terra python=$(python.version)
displayName: Create Anaconda environment
- bash: |
set -e
source activate qiskit-terra
conda update --yes -n base conda
conda install --yes --quiet --name qiskit-terra python=$(python.version) numpy
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 .
Expand All @@ -244,6 +253,7 @@ stages:
displayName: 'Install dependencies'
- bash: |
set -e
source activate qiskit-terra
export PYTHONHASHSEED=$(python -S -c "import random; print(random.randint(1, 4294967295))")
echo "PYTHONHASHSEED=$PYTHONHASHSEED"
stestr run
Expand All @@ -262,6 +272,7 @@ stages:
artifactName: 'drop_macos'
- bash: |
set -e
source activate qiskit-terra
pip install -U junitxml
mkdir -p junit
stestr last --subunit | tools/subunit_to_junit.py -o junit/test-results.xml
Expand Down Expand Up @@ -402,8 +413,17 @@ stages:
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- script: conda create --yes --quiet --name qiskit-terra python=$(python.version)
displayName: Create Anaconda environment
- bash: |
set -e
source activate qiskit-terra
conda update --yes -n base conda
conda install --yes --quiet --name qiskit-terra python=$(python.version) numpy
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 .
Expand All @@ -412,6 +432,7 @@ stages:
displayName: 'Install dependencies'
- bash: |
set -e
source activate qiskit-terra
export PYTHONHASHSEED=$(python -S -c "import random; print(random.randint(1, 4294967295))")
echo "PYTHONHASHSEED=$PYTHONHASHSEED"
stestr run --concurrency 2
Expand All @@ -430,6 +451,7 @@ stages:
artifactName: 'drop_macos'
- bash: |
set -e
source activate qiskit-terra
pip install -U junitxml
mkdir -p junit
stestr last --subunit | tools/subunit_to_junit.py -o junit/test-results.xml
Expand Down

0 comments on commit 1f3ba87

Please sign in to comment.