8
8
pool :
9
9
vmImage : ${{ parameters.vmImage }}
10
10
variables :
11
- BUILD_COMMIT : " v1.18.2 "
11
+ BUILD_COMMIT : " master "
12
12
NIGHTLY_BUILD_COMMIT : " master"
13
13
JUNITXML : " test-data.xml"
14
14
TEST_DIR : ' $(Agent.WorkFolder)/tmp_for_test'
@@ -36,16 +36,11 @@ jobs:
36
36
displayName: Check that we have the expected version and architecture for Python
37
37
- bash : |
38
38
set -e
39
- SKIP_BUILD="false"
40
39
if [ "$BUILD_REASON" == "Schedule" ]; then
41
40
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
42
- if [ "$NIGHTLY_BUILD" != "true" ]; then
43
- SKIP_BUILD="true"
44
- fi
45
41
fi
46
42
echo "Building numpy@$BUILD_COMMIT"
47
43
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
48
- echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
49
44
# Store original Python path to be able to create test_venv pointing
50
45
# to same Python version.
51
46
PYTHON_EXE=`which python`
@@ -54,11 +49,11 @@ jobs:
54
49
- bash : |
55
50
set -e
56
51
cd numpy
52
+ git fetch origin HEAD
57
53
git checkout $BUILD_COMMIT
58
54
git clean -fxd
59
55
git reset --hard
60
56
displayName: Checkout numpy commit
61
- condition: eq(variables['SKIP_BUILD'], 'false')
62
57
63
58
- powershell : |
64
59
choco install -y mingw --forcex86 --force --version=5.3.0
@@ -68,35 +63,37 @@ jobs:
68
63
refreshenv
69
64
displayName: 'Install 32-bit mingw for 32-bit builds'
70
65
condition: eq(variables['BITS'], 32)
71
- - powershell : |
72
- pip install twine wheel urllib3
66
+ - bash : |
67
+ pushd numpy
68
+ pip install twine wheel urllib3 anaconda
73
69
# a bit overkill, all we really need is cython
74
70
pip install --timeout=60 -r numpy/test_requirements.txt
75
71
76
72
# handle license
77
- cp LICENSE_win32.txt numpy/ LICENSE.txt
73
+ cp ../ LICENSE_win32.txt LICENSE.txt
78
74
79
- # Download and copy static "openblas.a", put it into LIB
80
- $libdir = Join-Path $PSScriptRoot "OPENBLAS_LIB"
81
- mkdir $libdir
82
- $openblas_lib=$( python numpy/tools/openblas_support.py )
83
- echo Copying $openblas_lib to $libdir
84
- cp $openblas_lib $libdir/openblas.a
85
- $env:LIB = $libdir + ";" + $env:LIB
75
+ # handle _distributor_init.py
76
+ PYTHONPATH=tools python -c "import openblas_support; openblas_support.make_init('numpy')"
77
+
78
+ # Download and get the path to "openblas.a". We cannot copy it
79
+ # to $PYTHON_EXE's directory since that is on a different drive which
80
+ # mingw does not like. Instead copy it to a directory and set OPENBLAS
81
+ target=$(python tools/openblas_support.py)
82
+ mkdir -p openblas
83
+ echo Copying $target to openblas
84
+ cp $target openblas
85
+ echo "##vso[task.setvariable variable=OPENBLAS]openblas"
86
86
displayName: Prepare the build
87
- condition: eq(variables['SKIP_BUILD'], 'false')
88
87
89
88
- bash : |
90
89
# Build the wheel
91
90
set -e
92
91
pushd numpy
93
92
python setup.py build
94
93
python setup.py bdist_wheel
95
- ls dist
96
94
twine check dist/*
97
95
popd
98
96
displayName: Build wheel
99
- condition: eq(variables['SKIP_BUILD'], 'false')
100
97
- bash : |
101
98
set -ex
102
99
source extra_functions.sh
@@ -107,15 +104,6 @@ jobs:
107
104
run_tests
108
105
teardown_test_venv
109
106
displayName: Install wheel and test
110
- condition: eq(variables['SKIP_BUILD'], 'false')
111
-
112
- - bash : echo "##vso[task.prependpath]$CONDA/Scripts"
113
- displayName : Add conda to PATH
114
- condition : and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
115
-
116
- - bash : conda install -q -y anaconda-client
117
- displayName : Install anaconda-client
118
- condition : and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
119
107
120
108
- bash : |
121
109
set -e
@@ -132,7 +120,6 @@ jobs:
132
120
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
133
121
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
134
122
displayName: Retrieve secret upload token
135
- condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
136
123
env:
137
124
# Secret variables need to mapped to env variables explicitly:
138
125
NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN)
0 commit comments