@@ -29,177 +29,12 @@ stages:
29
29
30
30
- stage : ComprehensiveTests
31
31
jobs :
32
- - job : Linux_Python_38_32bit_full_with_asserts
33
- pool :
34
- vmImage : ' ubuntu-18.04'
35
- steps :
36
- - script : |
37
- docker pull quay.io/pypa/manylinux2010_i686
38
- docker run -v $(pwd):/numpy -e CFLAGS="-msse2 -std=c99 -UNDEBUG" \
39
- -e F77=gfortran-5 -e F90=gfortran-5 quay.io/pypa/manylinux2010_i686 \
40
- /bin/bash -xc "cd numpy && \
41
- /opt/python/cp38-cp38/bin/python -mvenv venv &&\
42
- source venv/bin/activate && \
43
- target=\$(python3 tools/openblas_support.py) && \
44
- cp -r \$target/lib/* /usr/lib && \
45
- cp \$target/include/* /usr/include && \
46
- python3 -m pip install -r test_requirements.txt && \
47
- echo CFLAGS \$CFLAGS && \
48
- python3 -m pip install -v . && \
49
- python3 runtests.py -n --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml && \
50
- python3 tools/openblas_support.py --check_version"
51
- displayName: 'Run 32-bit manylinux2010 Docker Build / Tests'
52
- - task : PublishTestResults@2
53
- condition : succeededOrFailed()
54
- inputs :
55
- testResultsFiles : ' **/test-*.xml'
56
- failTaskOnFailedTests : true
57
- testRunTitle : ' Publish test results for Python 3.8-32 bit full Linux'
58
- - job : macOS
59
- pool :
60
- # NOTE: at time of writing, there is a danger
61
- # that using an invalid vmIMage string for macOS
62
- # image silently redirects to a Windows build on Azure;
63
- # for now, use the only image name officially present in
64
- # the docs even though i.e., numba uses another in their
65
- # azure config for mac os -- Microsoft has indicated
66
- # they will patch this issue
67
- vmImage : macOS-10.14
68
- strategy :
69
- maxParallel : 3
70
- matrix :
71
- Python36 :
72
- PYTHON_VERSION : ' 3.6'
73
- USE_OPENBLAS : ' 1'
74
- Python36-ILP64 :
75
- PYTHON_VERSION : ' 3.6'
76
- NPY_USE_BLAS_ILP64 : ' 1'
77
- USE_OPENBLAS : ' 1'
78
- # Disable this job: the azure images do not create the problematic
79
- # symlink from Accelerate to OpenBLAS. We still have the test
80
- # at import to detect a buggy Accelerate, just cannot easily trigger
81
- # it with azure.
82
- # Accelerate:
83
- # PYTHON_VERSION: '3.6'
84
- # USE_OPENBLAS: '0'
85
-
86
- steps :
87
- # the @0 refers to the (major) version of the *task* on Microsoft's
88
- # end, not the order in the build matrix nor anything to do
89
- # with version of Python selected
90
- - task : UsePythonVersion@0
91
- inputs :
92
- versionSpec : $(PYTHON_VERSION)
93
- addToPath : true
94
- architecture : ' x64'
95
- - script : |
96
- set -xe
97
- [ -n "$USE_XCODE_10" ] && /bin/bash -c "sudo xcode-select -s /Applications/Xcode_10.app/Contents/Developer"
98
- clang --version
99
- displayName: 'report clang version'
100
- # NOTE: might be better if we could avoid installing
101
- # two C compilers, but with homebrew looks like we're
102
- # now stuck getting the full gcc toolchain instead of
103
- # just pulling in gfortran
104
- - script : |
105
- set -xe
106
- # same version of gfortran as the open-libs and numpy-wheel builds
107
- curl -L https://github.com/MacPython/gfortran-install/raw/master/archives/gfortran-4.9.0-Mavericks.dmg -o gfortran.dmg
108
- GFORTRAN_SHA256=$(shasum -a 256 gfortran.dmg)
109
- KNOWN_SHA256="d2d5ca5ba8332d63bbe23a07201c4a0a5d7e09ee56f0298a96775f928c3c4b30 gfortran.dmg"
110
- if [ "$GFORTRAN_SHA256" != "$KNOWN_SHA256" ]; then
111
- echo sha256 mismatch
112
- exit 1
113
- fi
114
- hdiutil attach -mountpoint /Volumes/gfortran gfortran.dmg
115
- sudo installer -pkg /Volumes/gfortran/gfortran.pkg -target /
116
- otool -L /usr/local/gfortran/lib/libgfortran.3.dylib
117
- # Manually symlink gfortran-4.9 to plain gfortran for f2py.
118
- # No longer needed after Feb 13 2020 as gfortran is already present
119
- # and the attempted link errors. Keep this for future reference.
120
- # ln -s /usr/local/bin/gfortran-4.9 /usr/local/bin/gfortran
121
- displayName: 'make libgfortran available on mac os for openblas'
122
- # use the pre-built openblas binary that most closely
123
- # matches our MacOS wheel builds -- currently based
124
- # primarily on file size / name details
125
- - script : |
126
- set -xe
127
- target=$(python tools/openblas_support.py)
128
- ls -lR $target
129
- # manually link to appropriate system paths
130
- cp $target/lib/lib* /usr/local/lib/
131
- cp $target/include/* /usr/local/include/
132
- otool -L /usr/local/lib/libopenblas*
133
- displayName: 'install pre-built openblas'
134
- condition: eq(variables['USE_OPENBLAS'], '1')
135
- - script : python -m pip install --upgrade pip 'setuptools<49.2.0' wheel
136
- displayName : ' Install tools'
137
- - script : |
138
- python -m pip install -r test_requirements.txt
139
- python -m pip install vulture docutils sphinx==2.2.0 numpydoc
140
- displayName: 'Install dependencies; some are optional to avoid test skips'
141
- - script : /bin/bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/ | grep 'unreachable'"
142
- displayName : ' Check for unreachable code paths in Python modules'
143
- # prefer usage of clang over gcc proper
144
- # to match likely scenario on many user mac machines
145
- - script : python setup.py build -j 4 build_src --verbose-cfg install
146
- displayName : ' Build NumPy'
147
- env :
148
- BLAS : None
149
- LAPACK : None
150
- ATLAS : None
151
- CC : /usr/bin/clang
152
- condition : eq(variables['USE_OPENBLAS'], '1')
153
- - script : python setup.py build -j 4 build_ext --inplace install
154
- displayName : ' Build NumPy without OpenBLAS'
155
- env :
156
- BLAS : None
157
- LAPACK : None
158
- ATLAS : None
159
- CC : /usr/bin/clang
160
- condition : eq(variables['USE_OPENBLAS'], '0')
161
- # wait until after dev build of NumPy to pip
162
- # install matplotlib to avoid pip install of older numpy
163
- - script : python -m pip install matplotlib
164
- displayName : ' Install matplotlib before refguide run'
165
- - script : python runtests.py -g --refguide-check
166
- displayName : ' Run Refuide Check'
167
- condition : eq(variables['USE_OPENBLAS'], '1')
168
- - script : python runtests.py -n --mode=full -- -rsx --junitxml=junit/test-results.xml
169
- displayName : ' Run Full NumPy Test Suite'
170
- condition : eq(variables['USE_OPENBLAS'], '1')
171
- - bash : python tools/openblas_support.py --check_version
172
- displayName : ' Verify OpenBLAS version'
173
- condition : eq(variables['USE_OPENBLAS'], '1')
174
- # import doesn't work when in numpy src directory , so do a pip dev install of build lib to test
175
- - script : |
176
- #!/bin/bash -v
177
- set +e
178
- python -c "import numpy as np" > test_output.log 2>&1
179
- check_output_code=$?
180
- cat test_output.log
181
- grep "buggy Accelerate backend" test_output.log
182
- check_message=$?
183
- if [ $check_output_code == 1 ] && [ $check_message == 0 ]; then exit 0; else exit 1;fi
184
- displayName: "Check if numpy import fails with accelerate"
185
- condition: eq(variables['USE_OPENBLAS'], '0')
186
- - task : PublishTestResults@2
187
- condition : succeededOrFailed()
188
- inputs :
189
- testResultsFiles : ' **/test-*.xml'
190
- failTaskOnFailedTests : true
191
- testRunTitle : ' Publish test results for Python 3.6 64-bit full Mac OS'
192
32
- job : Windows
193
33
pool :
194
34
vmImage : ' VS2017-Win2016'
195
35
strategy :
196
36
maxParallel : 6
197
37
matrix :
198
- Python38-32bit-fast :
199
- PYTHON_VERSION : ' 3.8'
200
- PYTHON_ARCH : ' x86'
201
- TEST_MODE : fast
202
- BITS : 32
203
38
Python36-64bit-full :
204
39
PYTHON_VERSION : ' 3.6'
205
40
PYTHON_ARCH : ' x64'
@@ -288,4 +123,3 @@ stages:
288
123
testResultsFiles : ' **/test-*.xml'
289
124
failTaskOnFailedTests : true
290
125
testRunTitle : ' Publish test results for gcc 4.8'
291
-
0 commit comments