@@ -14,49 +14,41 @@ steps: |
14 | 14 | displayName: 'Install dependencies; some are optional to avoid test skips' |
15 | 15 |
|
16 | 16 | - powershell: | |
17 | | - # rtools 42+ does not support 32 bits builds. |
18 | | - choco install --confirm --no-progress --allow-downgrade rtools --version=4.0.0.20220206 |
19 | | - echo "##vso[task.setvariable variable=RTOOLS40_HOME]c:\rtools40" |
20 | | - displayName: 'Install rtools' |
| 17 | + # Note that rtools 42+ does not support 32 bits builds. We dropped testing |
| 18 | + # those, but if there's a need to go back on that, use version 4.0.0.20220206 |
| 19 | + choco install --confirm --no-progress --side-by-side rtools --version=4.3.5550 |
| 20 | + choco install unzip -y |
| 21 | + choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite |
| 22 | + echo "##vso[task.setvariable variable=RTOOLS43_HOME]c:\rtools43" |
| 23 | + displayName: 'Install utilities' |
21 | 24 |
|
22 | 25 | - powershell: | |
23 | 26 | $ErrorActionPreference = "Stop" |
24 | | - # Download and get the path to "openblas". We cannot copy it |
25 | | - # to $PYTHON_EXE's directory since that is on a different drive which |
26 | | - # mingw does not like. Instead copy it to a directory and set OPENBLAS, |
27 | | - # since OPENBLAS will be picked up by the openblas discovery |
28 | | - $target = $(python tools/openblas_support.py) |
29 | | - mkdir openblas |
30 | | - echo "Copying $target to openblas/" |
31 | | - cp -r $target/* openblas/ |
32 | | - $env:OPENBLAS = $target |
| 27 | + mkdir C:/opt/openblas/openblas_dll |
| 28 | + mkdir C:/opt/32/lib/pkgconfig |
| 29 | + mkdir C:/opt/64/lib/pkgconfig |
| 30 | + # TBD: support 32 bit testing |
| 31 | + $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)") |
| 32 | + unzip -o -d c:/opt/ $target |
| 33 | + echo "##vso[task.setvariable variable=PKG_CONFIG_PATH]c:/opt/64/lib/pkgconfig" |
| 34 | + copy C:/opt/64/bin/*.dll C:/opt/openblas/openblas_dll |
33 | 35 | displayName: 'Download / Install OpenBLAS' |
34 | 36 |
|
35 | | -# NOTE: for Windows builds it seems much more tractable to use runtests.py |
36 | | -# vs. manual setup.py and then runtests.py for testing only |
37 | | - |
38 | 37 | - powershell: | |
39 | | - ls openblas |
40 | | - If ($(BITS) -eq 32) { |
41 | | - $env:CFLAGS = "-m32" |
42 | | - $env:LDFLAGS = "-m32" |
43 | | - $env:PATH = "$env:RTOOLS40_HOME\\mingw32\\bin;$env:PATH" |
44 | | - } |
45 | | - Else |
46 | | - { |
47 | | - $env:PATH = "$env:RTOOLS40_HOME\\mingw64\\bin;$env:PATH" |
48 | | - } |
49 | 38 | If ( Test-Path env:NPY_USE_BLAS_ILP64 ) { |
50 | | - $env:OPENBLAS64_ = "openblas" |
| 39 | + $env:OPENBLAS64_="openblas" |
| 40 | + # This does not work, the flags are passed together and not separately |
| 41 | + $env:CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64" |
| 42 | + $env:CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64" |
51 | 43 | } else { |
52 | 44 | $env:OPENBLAS = "openblas" |
53 | 45 | } |
54 | 46 | python -c "from tools import openblas_support; openblas_support.make_init('numpy')" |
55 | | - python -m pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist . |
56 | | -
|
57 | | - ls dist -r | Foreach-Object { |
58 | | - python -m pip install $_.FullName |
59 | | - } |
| 47 | + python -m pip install . --config-settings=setup-args="--vsenv" |
| 48 | + # copy from c:/opt/openblas/openblas_dll to numpy/.libs |
| 49 | + $target = $(python -c "import sysconfig; print(sysconfig.get_path('platlib'))") |
| 50 | + mkdir $target/numpy/.libs |
| 51 | + copy C:/opt/openblas/openblas_dll/*.dll $target/numpy/.libs |
60 | 52 | displayName: 'Build NumPy' |
61 | 53 |
|
62 | 54 | - script: | |
@@ -65,16 +57,14 @@ steps: |
65 | 57 | displayName: 'Check OpenBLAS version' |
66 | 58 |
|
67 | 59 | - powershell: | |
68 | | - If ($(BITS) -eq 32) { |
69 | | - $env:CFLAGS = "-m32" |
70 | | - $env:LDFLAGS = "-m32" |
71 | | - $env:PATH = "$env:RTOOLS40_HOME\\mingw32\\bin;$env:PATH" |
72 | | - } |
73 | | - Else |
74 | | - { |
75 | | - $env:PATH = "$env:RTOOLS40_HOME\\mingw64\\bin;$env:PATH" |
| 60 | + cd tools # avoid root dir to not pick up source tree |
| 61 | + # Get a gfortran onto the path for f2py tests |
| 62 | + $env:PATH = "$env:RTOOLS43_HOME\\x86_64-w64-mingw32.static.posix\\bin;$env:PATH" |
| 63 | + If ( $env:TEST_MODE -eq "full" ) { |
| 64 | + pytest --pyargs numpy -rsx --junitxml=junit/test-results.xml |
| 65 | + } else { |
| 66 | + pytest --pyargs numpy -m "not slow" -rsx --junitxml=junit/test-results.xml |
76 | 67 | } |
77 | | - python runtests.py -n --show-build-log --mode=$(TEST_MODE) -- -rsx --junitxml=junit/test-results.xml |
78 | 68 | displayName: 'Run NumPy Test Suite' |
79 | 69 |
|
80 | 70 | - task: PublishTestResults@2 |
|