forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-steps-windows.yml
56 lines (54 loc) · 2.48 KB
/
azure-steps-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: python -m pip install -r test_requirements.txt
displayName: 'Install dependencies; some are optional to avoid test skips'
- powershell: |
$pyversion = python -c "import sys; print(sys.version.split()[0])"
Write-Host "Python Version: $pyversion"
$target = "C:\\hostedtoolcache\\windows\\Python\\$pyversion\\$(PYTHON_ARCH)\\lib\\openblas$env:OPENBLAS_SUFFIX.a"
Write-Host "target path: $target"
$openblas = python tools/openblas_support.py
cp $openblas $target
displayName: 'Download / Install OpenBLAS'
- powershell: |
choco install -y mingw --forcex86 --force --version=5.3.0
displayName: 'Install 32-bit mingw for 32-bit builds'
condition: eq(variables['BITS'], 32)
# NOTE: for Windows builds it seems much more tractable to use runtests.py
# vs. manual setup.py and then runtests.py for testing only
- powershell: |
If ($(BITS) -eq 32) {
$env:CFLAGS = "-m32"
$env:LDFLAGS = "-m32"
$env:PATH = "C:\\tools\\mingw32\\bin;" + $env:PATH
refreshenv
}
python -c "from tools import openblas_support; openblas_support.make_init('numpy')"
pip wheel -v -v -v --wheel-dir=dist .
ls dist -r | Foreach-Object {
pip install $_.FullName
}
displayName: 'Build NumPy'
- bash: |
pushd . && cd .. && target=$(python -c "import numpy, os; print(os.path.abspath(os.path.join(os.path.dirname(numpy.__file__), '.libs')))") && popd
pip download -d destination --only-binary --no-deps numpy==1.14
cd destination && unzip numpy*.whl && cp numpy/.libs/*.dll $target
ls $target
displayName: 'Add extraneous & older DLL to numpy/.libs to probe DLL handling robustness'
condition: eq(variables['PYTHON_VERSION'], '3.6')
- script: pushd . && cd .. && python -c "from ctypes import windll; windll.kernel32.SetDefaultDllDirectories(0x00000800); import numpy" && popd
displayName: 'For gh-12667; Windows DLL resolution'
- script: python runtests.py -n --show-build-log --mode=$(TEST_MODE) -- -rsx --junitxml=junit/test-results.xml
displayName: 'Run NumPy Test Suite'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
failTaskOnFailedTests: true
testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows'