Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 53f5c47

Browse files
committed
remove NIGHTLY_BUILD, clean up scripts
1 parent 7f0076a commit 53f5c47

File tree

4 files changed

+46
-67
lines changed

4 files changed

+46
-67
lines changed

azure-pipelines.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schedules:
22
- cron: "27 3 */1 * *"
33
# 3:27am UTC everyday
4-
displayName: Nighthly build
4+
displayName: Nightly build
55
branches:
66
include:
77
- master
@@ -30,21 +30,17 @@ jobs:
3030
py_3.7_32:
3131
PYTHON_VERSION: "3.7.x"
3232
PYTHON_ARCH: "x86"
33-
NIGHTLY_BUILD: "true"
3433
BITS: 32
3534
py_3.7_64:
3635
PYTHON_VERSION: "3.7.x"
37-
NIGHTLY_BUILD: "true"
3836
PYTHON_ARCH: 'x64'
3937
BITS: 64
4038
py_3.8_32:
4139
PYTHON_VERSION: "3.8.x"
4240
PYTHON_ARCH: "x86"
43-
NIGHTLY_BUILD: "true"
4441
BITS: 32
4542
py_3.8_64:
4643
PYTHON_VERSION: "3.8.x"
47-
NIGHTLY_BUILD: "true"
4844
PYTHON_ARCH: 'x64'
4945
BITS: 64
5046

@@ -65,24 +61,20 @@ jobs:
6561
py_3.7_32:
6662
MB_PYTHON_VERSION: "3.7"
6763
PLAT: "i686"
68-
NIGHTLY_BUILD: "true"
6964
MB_ML_VER: "2010"
7065
ENV_VARS_PATH: "env_vars_32.sh"
7166
DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}"
7267
py_3.7_64:
7368
MB_PYTHON_VERSION: "3.7"
74-
NIGHTLY_BUILD: "true"
7569
MB_ML_VER: "2010"
7670
py_3.8_32:
7771
MB_PYTHON_VERSION: "3.8"
7872
PLAT: "i686"
79-
NIGHTLY_BUILD: "true"
8073
MB_ML_VER: "2010"
8174
ENV_VARS_PATH: "env_vars_32.sh"
8275
DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}"
8376
py_3.8_64:
8477
MB_PYTHON_VERSION: "3.8"
85-
NIGHTLY_BUILD: "true"
8678
MB_ML_VER: "2010"
8779

8880
- template: azure/posix.yml
@@ -92,12 +84,7 @@ jobs:
9284
matrix:
9385
py_3.6_64:
9486
MB_PYTHON_VERSION: "3.6"
95-
MB_PYTHON_OSX_VER: 10.9
9687
py_3.7_64:
9788
MB_PYTHON_VERSION: "3.7"
98-
NIGHTLY_BUILD: "true"
99-
MB_PYTHON_OSX_VER: 10.9
10089
py_3.8_64:
10190
MB_PYTHON_VERSION: "3.8"
102-
NIGHTLY_BUILD: "true"
103-
MB_PYTHON_OSX_VER: 10.9

azure/posix.yml

+7-16
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ jobs:
99
vmImage: ${{ parameters.vmImage }}
1010
variables:
1111
REPO_DIR: "numpy"
12-
BUILD_COMMIT: "master"
12+
BUILD_COMMIT: 'master'
1313
PLAT: "x86_64"
1414
CYTHON_BUILD_DEP: "cython==0.29.16"
1515
NIGHTLY_BUILD_COMMIT: "master"
16-
NIGHTLY_BUILD: "false"
1716
TEST_DEPENDS: "pytest hypothesis cffi pytz"
1817
JUNITXML: "test-data.xml"
1918
TEST_DIR: "tmp_for_test"
@@ -33,16 +32,11 @@ jobs:
3332
- bash: |
3433
set -e
3534
36-
SKIP_BUILD="false"
3735
if [ "$BUILD_REASON" == "Schedule" ]; then
3836
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
39-
if [ "$NIGHTLY_BUILD" != "true" ]; then
40-
SKIP_BUILD="true"
41-
fi
4237
fi
4338
echo "Building numpy@$BUILD_COMMIT"
4439
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
45-
echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
4640
4741
# Platform variables used in multibuild scripts
4842
if [ `uname` == 'Darwin' ]; then
@@ -60,6 +54,7 @@ jobs:
6054
6155
- bash: |
6256
set -e
57+
echo $BUILD_COMMIT
6358
pip install virtualenv wheel
6459
BUILD_DEPENDS="$CYTHON_BUILD_DEP"
6560
@@ -74,28 +69,24 @@ jobs:
7469
./patch_code.sh $REPO_DIR
7570
build_wheel $REPO_DIR $PLAT
7671
displayName: Build wheel
77-
condition: eq(variables['SKIP_BUILD'], 'false')
7872
7973
- bash: |
80-
set -xe
74+
set -e
8175
source multibuild/common_utils.sh
8276
source multibuild/travis_steps.sh
8377
source extra_functions.sh
8478
setup_test_venv
8579
install_run $PLAT
8680
teardown_test_venv
8781
displayName: Install wheel and test
88-
condition: eq(variables['SKIP_BUILD'], 'false')
8982
9083
- bash: |
84+
set -e
9185
echo "##vso[task.prependpath]$CONDA/bin"
9286
sudo chown -R $USER $CONDA
93-
displayName: Add conda to PATH
94-
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
95-
96-
- bash: conda install -q -y anaconda-client
87+
conda install -q -y anaconda-client
88+
echo $PATH
9789
displayName: Install anaconda-client
98-
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
9990
10091
- bash: |
10192
set -e
@@ -112,7 +103,6 @@ jobs:
112103
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
113104
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
114105
displayName: Retrieve secret upload token
115-
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
116106
env:
117107
# Secret variables need to mapped to env variables explicitly:
118108
NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN)
@@ -123,6 +113,7 @@ jobs:
123113
# The --force option forces a replacement if the remote file already
124114
# exists.
125115
ls wheelhouse/*.whl
116+
echo $PATH
126117
anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl
127118
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
128119
displayName: Upload to anaconda.org (only if secret token is retrieved)

azure/windows.yml

+34-36
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
pool:
99
vmImage: ${{ parameters.vmImage }}
1010
variables:
11-
BUILD_COMMIT: "v1.18.2"
11+
BUILD_COMMIT: "master"
1212
NIGHTLY_BUILD_COMMIT: "master"
1313
JUNITXML: "test-data.xml"
1414
TEST_DIR: '$(Agent.WorkFolder)/tmp_for_test'
@@ -36,16 +36,11 @@ jobs:
3636
displayName: Check that we have the expected version and architecture for Python
3737
- bash: |
3838
set -e
39-
SKIP_BUILD="false"
4039
if [ "$BUILD_REASON" == "Schedule" ]; then
4140
BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
42-
if [ "$NIGHTLY_BUILD" != "true" ]; then
43-
SKIP_BUILD="true"
44-
fi
4541
fi
4642
echo "Building numpy@$BUILD_COMMIT"
4743
echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
48-
echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
4944
# Store original Python path to be able to create test_venv pointing
5045
# to same Python version.
5146
PYTHON_EXE=`which python`
@@ -54,68 +49,72 @@ jobs:
5449
- bash: |
5550
set -e
5651
cd numpy
52+
git fetch origin HEAD
5753
git checkout $BUILD_COMMIT
5854
git clean -fxd
5955
git reset --hard
6056
displayName: Checkout numpy commit
61-
condition: eq(variables['SKIP_BUILD'], 'false')
6257
6358
- powershell: |
6459
choco install -y mingw --forcex86 --force --version=5.3.0
65-
$env:CFLAGS = "-m32"
66-
$env:LDFLAGS = "-m32"
67-
$env:PATH = "C:\\tools\\mingw32\\bin;" + $env:PATH
68-
refreshenv
6960
displayName: 'Install 32-bit mingw for 32-bit builds'
7061
condition: eq(variables['BITS'], 32)
71-
- powershell: |
62+
- bash: |
63+
set -xe
64+
pushd numpy
7265
pip install twine wheel urllib3
7366
# a bit overkill, all we really need is cython
74-
pip install --timeout=60 -r numpy/test_requirements.txt
67+
pip install --timeout=60 -r test_requirements.txt
7568
7669
# handle license
77-
cp LICENSE_win32.txt numpy/LICENSE.txt
70+
cp ../LICENSE_win32.txt LICENSE.txt
7871
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
72+
# handle _distributor_init.py
73+
PYTHONPATH=tools python -c "import openblas_support; openblas_support.make_init('numpy')"
74+
75+
# Download and get the path to "openblas.a". We cannot copy it
76+
# to $PYTHON_EXE's directory since that is on a different drive which
77+
# mingw does not like. Instead copy it to a directory and set OPENBLAS
78+
target=$(python tools/openblas_support.py)
79+
mkdir -p openblas
80+
echo Copying $target to openblas
81+
cp $target openblas
82+
echo "##vso[task.setvariable variable=OPENBLAS]openblas"
8683
displayName: Prepare the build
87-
condition: eq(variables['SKIP_BUILD'], 'false')
8884
89-
- bash: |
85+
- powershell: |
86+
If ($(BITS) -eq 32) {
87+
$env:CFLAGS = "-m32"
88+
$env:LDFLAGS = "-m32"
89+
$env:PATH = "C:\\tools\\mingw32\\bin;" + $env:PATH
90+
refreshenv
91+
}
9092
# Build the wheel
91-
set -e
9293
pushd numpy
9394
python setup.py build
9495
python setup.py bdist_wheel
95-
ls dist
9696
twine check dist/*
9797
popd
9898
displayName: Build wheel
99-
condition: eq(variables['SKIP_BUILD'], 'false')
10099
- bash: |
101100
set -ex
102101
source extra_functions.sh
103102
source config.sh
104103
setup_test_venv
105-
pip install -r numpy/test_requirements.txt
106-
pip install numpy/dist/numpy-*.whl
104+
python -m pip install -r numpy/test_requirements.txt
105+
python -m pip install numpy/dist/numpy-*.whl
106+
mkdir -p for_test
107+
pushd for_test
107108
run_tests
109+
popd
108110
teardown_test_venv
109111
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'))
115112
116-
- bash: conda install -q -y anaconda-client
113+
- bash: |
114+
set -ex
115+
echo "##vso[task.prependpath]$CONDA/Scripts"
116+
conda install -q -y anaconda-client
117117
displayName: Install anaconda-client
118-
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
119118
120119
- bash: |
121120
set -e
@@ -132,7 +131,6 @@ jobs:
132131
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
133132
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
134133
displayName: Retrieve secret upload token
135-
condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
136134
env:
137135
# Secret variables need to mapped to env variables explicitly:
138136
NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN)

extra_functions.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ function setup_test_venv {
77
if [ $(uname) == "Darwin" ]; then
88
source test_venv/bin/activate
99
else
10+
mkdir -p test_venv/libs
1011
source test_venv/Scripts/activate
1112
fi
1213
# Note: the idiom "python -m pip install ..." is necessary to upgrade
1314
# pip itself on Windows. Otherwise one would get a permission error on
1415
# pip.exe.
16+
PYTHON_EXE=python
17+
PIP_CMD="$PYTHON_EXE -m pip"
1518
python -m pip install --upgrade pip wheel
1619
if [ "$TEST_DEPENDS" != "" ]; then
1720
pip install $TEST_DEPENDS
@@ -28,4 +31,4 @@ function teardown_test_venv {
2831
fi
2932
}
3033
# Work around bug in multibuild
31-
if [ ! -o PIP_CMD ]; then PIP_CMD="$PYTHON_EXE -mpip"; fi
34+
if [ ! -o PIP_CMD ]; then PIP_CMD="$PYTHON_EXE -m pip"; fi

0 commit comments

Comments
 (0)