From bb3d188d21459c99126828b99d1985b550e2d279 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 28 Jul 2023 18:07:50 +0200 Subject: [PATCH] CI: improve Azure Windows jobs, make sure they fail on build error [skip actions] [skip cirrus] [skip circle] --- azure-steps-windows.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/azure-steps-windows.yml b/azure-steps-windows.yml index 89ee9a4ec5de..766da3353d28 100644 --- a/azure-steps-windows.yml +++ b/azure-steps-windows.yml @@ -28,7 +28,6 @@ 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" @@ -36,19 +35,23 @@ steps: 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