8000 CI: Azure experiment · bashtage/numpy@9ab1e41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9ab1e41

Browse files
committed
CI: Azure experiment
1 parent 3ad444b commit 9ab1e41

File tree

3 files changed

+12
-348
lines changed

3 files changed

+12
-348
lines changed

.travis.yml

Lines changed: 0 additions & 128 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 1 addition & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -12,194 +12,15 @@ pr:
1212
- '*' # must quote since "*" is a YAML reserved character; we want a string
1313

1414
stages:
15-
- stage: InitialTests
16-
jobs:
17-
- job: WindowsFast
18-
pool:
19-
vmImage: 'VS2017-Win2016'
20-
strategy:
21-
matrix:
22-
Python36-64bit-fast:
23-
PYTHON_VERSION: '3.6'
24-
PYTHON_ARCH: 'x64'
25-
TEST_MODE: fast
26-
BITS: 64
27-
steps:
28-
- template: azure-steps-windows.yml
2915

3016
- stage: ComprehensiveTests
3117
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/inc 10000 lude/
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'
19218
- job: Windows
19319
pool:
194-
vmImage: 'VS2017-Win2016'
20+
vmImage: 'windows-latest'
19521
strategy:
19622
maxParallel: 6
19723
matrix:
198-
Python38-32bit-fast:
199-
PYTHON_VERSION: '3.8'
200-
PYTHON_ARCH: 'x86'
201-
TEST_MODE: fast
202-
BITS: 32
20324
Python36-64bit-full:
20425
PYTHON_VERSION: '3.6'
20526
PYTHON_ARCH: 'x64'
@@ -217,45 +38,5 @@ stages:
21738
BITS: 64
21839
NPY_USE_BLAS_ILP64: '1'
21940
OPENBLAS_SUFFIX: '64_'
220-
PyPy36-32bit:
221-
PYTHON_VERSION: 'PyPy3.6'
222-
PYTHON_ARCH: 'x32'
223-
TEST_MODE: fast
224-
BITS: 32
22541
steps:
22642
- template: azure-steps-windows.yml
227-
- job: Linux_PyPy3
228-
pool:
229-
vmIMage: 'ubuntu-18.04'
230-
steps:
231-
- script: source tools/pypy-test.sh
232-
displayName: 'Run PyPy3 Build / Tests'
233-
- task: PublishTestResults@2
234-
condition: succeededOrFailed()
235-
inputs:
236-
testResultsFiles: '**/test-*.xml'
237-
testRunTitle: 'Publish test results for PyPy3'
238-
failTaskOnFailedTests: true
239-
- job: Linux_gcc48
240-
pool:
241-
vmImage: 'ubuntu-18.04'
242-
steps:
243-
- script: |
244-
if ! `gcc-4.8 2>/dev/null`; then
245-
sudo apt install gcc-4.8
246-
fi
247-
displayName: 'add gcc 4.8'
248-
- script: |
249-
# python3 has no setuptools, so install one to get us going
250-
python3 -m pip install --user --upgrade pip 'setuptools<49.2.0'
251-
python3 -m pip install --user -r test_requirements.txt
252-
CPPFLAGS='' CC=gcc-4.8 F77=gfortran-5 F90=gfortran-5 \
253-
python3 runtests.py --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml
254-
displayName: 'Run gcc4.8 Build / Tests'
255-
- task: PublishTestResults@2
256-
condition: succeededOrFailed()
257-
inputs:
258-
testResultsFiles: '**/test-*.xml'
259-
failTaskOnFailedTests: true
260-
testRunTitle: 'Publish test results for gcc 4.8'
261-

azure-steps-windows.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ steps:
7575
ls $target
7676
displayName: 'Add extraneous & older DLL to numpy/.libs to probe DLL handling robustness'
7777
condition: eq(variables['PYTHON_VERSION'], '3.6')
78+
79+
- powershell: |
80+
copy dist\*.whl $(Build.ArtifactStagingDirectory)
81+
7882
- script: pushd . && cd .. && python -c "from ctypes import windll; windll.kernel32.SetDefaultDllDirectories(0x00000800); import numpy" && popd
7983
displayName: 'For gh-12667; Windows DLL resolution'
8084
condition: eq(variables['PYTHON_VERSION'], '3.6')
@@ -88,3 +92,10 @@ steps:
8892
testResultsFiles: '**/test-*.xml'
8993
failTaskOnFailedTests: true
9094
testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows'
95+
96+
- powershell: gci env:* | sort-object name | Format-Table -AutoSize | Out-File $env:BUILD_ARTIFACTSTAGINGDIRECTORY/environment-variables.txt
97+
98+
- task: PublishBuildArtifacts@1
99+
inputs:
100+
pathToPublish: '$(Build.ArtifactStagingDirectory)'
101+
artifactName: experiment

0 commit comments

Comments
 (0)
0