Skip to content

Commit

Permalink
CI: improve Azure Windows jobs, make sure they fail on build error
Browse files Browse the repository at this point in the history
[skip actions] [skip cirrus] [skip circle]
  • Loading branch information
rgommers committed Jul 28, 2023
1 parent 316f5f0 commit bb3d188
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions azure-steps-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,30 @@ steps:
mkdir C:/opt/openblas/openblas_dll
mkdir C:/opt/32/lib/pkgconfig
mkdir C:/opt/64/lib/pkgconfig
# TBD: support 32 bit testing
$target=$(python -c "import tools.openblas_support as obs; plat=obs.get_plat(); ilp64=obs.get_ilp64(); target=f'openblas_{plat}.zip'; obs.download_openblas(target, plat, ilp64);print(target)")
unzip -o -d c:/opt/ $target
echo "##vso[task.setvariable variable=PKG_CONFIG_PATH]c:/opt/64/lib/pkgconfig"
copy C:/opt/64/bin/*.dll C:/opt/openblas/openblas_dll
displayName: 'Download / Install OpenBLAS'

- powershell: |
$ErrorActionPreference = "Stop"
# Note: ensure the `pip install .` command remains the last one here, to
# avoid "green on failure" issues
python -c "from tools import openblas_support; openblas_support.make_init('numpy')"
If ( Test-Path env:NPY_USE_BLAS_ILP64 ) {
python -m pip install . -Csetup-args="--vsenv" -Csetup-args="-Duse-ilp64=true" -Csetup-args="-Dblas-symbol-suffix=64_"
} else {
python -m pip install . -Csetup-args="--vsenv"
}
displayName: 'Build NumPy'

- powershell: |
# copy from c:/opt/openblas/openblas_dll to numpy/.libs to ensure it can
# get loaded when numpy is imported (no RPATH on Windows)
$target = $(python -c "import sysconfig; print(sysconfig.get_path('platlib'))")
mkdir $target/numpy/.libs
copy C:/opt/openblas/openblas_dll/*.dll $target/numpy/.libs
displayName: 'Build NumPy'
displayName: 'Copy OpenBLAS DLL to site-packages'

- script: |
python -m pip install threadpoolctl
Expand Down

0 comments on commit bb3d188

Please sign in to comment.