diff options
author | Rakesh Vasudevan <rakesh.nvasudev@gmail.com> | 2020-03-15 11:14:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-15 20:14:34 +0200 |
commit | cd3b44d5f0915245138d44fdb3ee376601e34716 (patch) | |
tree | 3c926b6c280f97ede79436b43e4a2f7d85c675b5 /azure-pipelines.yml | |
parent | 5b16107a537c0ebd2e4517c02ecfb9a24f54c827 (diff) | |
download | numpy-cd3b44d5f0915245138d44fdb3ee376601e34716.tar.gz |
MAINT: Test during import to detect bugs with Accelerate(MacOS) LAPACK (#15695)
* TST: Test during import to detect bugs with Accelerate(MacOS) LAPACK
fixes #15647
* Pipeline update for Accelerate(MacOS) testing
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r-- | azure-pipelines.yml | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d4944c92..6b1ff4c28 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -67,13 +67,19 @@ stages: # they will patch this issue vmImage: macOS-10.14 strategy: - maxParallel: 2 + maxParallel: 3 matrix: Python36: PYTHON_VERSION: '3.6' + USE_OPENBLAS: '1' Python36-ILP64: PYTHON_VERSION: '3.6' NPY_USE_BLAS_ILP64: '1' + USE_OPENBLAS: '1' + Accelerate: + PYTHON_VERSION: '3.6' + USE_OPENBLAS: '0' + steps: # the @0 refers to the (major) version of the *task* on Microsoft's # end, not the order in the build matrix nor anything to do @@ -106,13 +112,14 @@ stages: # matches our MacOS wheel builds -- currently based # primarily on file size / name details - script: | - python -mpip install urllib3 + python -m pip install urllib3 target=$(python tools/openblas_support.py) ls -lR $target # manually link to appropriate system paths cp $target/lib/* /usr/local/lib/ cp $target/include/* /usr/local/include/ displayName: 'install pre-built openblas' + condition: eq(variables['USE_OPENBLAS'], '1') - script: python -m pip install --upgrade pip setuptools wheel displayName: 'Install tools' - script: | @@ -131,16 +138,40 @@ stages: ATLAS: None ACCELERATE: None CC: /usr/bin/clang + condition: eq(variables['USE_OPENBLAS'], '1') + - script: python setup.py build -j 4 build_ext --inplace install + displayName: 'Build NumPy without OpenBLAS' + env: + BLAS: None + LAPACK: None + ATLAS: None + CC: /usr/bin/clang + condition: eq(variables['USE_OPENBLAS'], '0') # wait until after dev build of NumPy to pip # install matplotlib to avoid pip install of older numpy - script: python -m pip install matplotlib displayName: 'Install matplotlib before refguide run' - script: python runtests.py -g --refguide-check displayName: 'Run Refuide Check' + condition: eq(variables['USE_OPENBLAS'], '1') - script: python runtests.py -n --mode=full -- -rsx --junitxml=junit/test-results.xml displayName: 'Run Full NumPy Test Suite' + condition: eq(variables['USE_OPENBLAS'], '1') - bash: python tools/openblas_support.py --check_version displayName: 'Verify OpenBLAS version' + condition: eq(variables['USE_OPENBLAS'], '1') + # import doesn't work when in numpy src directory , so do a pip dev install of build lib to test + - script: | + #!/bin/bash -v + set +e + python -c "import numpy as np" > test_output.log 2>&1 + check_output_code=$? + cat test_output.log + grep "buggy Accelerate backend" test_output.log + check_message=$? + if [ $check_output_code == 1 ] && [ $check_message == 0 ]; then exit 0; else exit 1;fi + displayName: "Check if numpy import fails with accelerate" + condition: eq(variables['USE_OPENBLAS'], '0') - task: PublishTestResults@2 condition: succeededOrFailed() inputs: |