From 73290e0472d9da24f1dde77b364a7cacc99a89ae Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Tue, 14 Apr 2020 09:55:26 +0300 Subject: [PATCH 01/11] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..aa91291 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,19 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo Add other tasks to build, test, and deploy your project. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script' From 8c3c8cd1c6f09dd4822c1c32b7501710d51cc8f3 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 11:11:32 +0300 Subject: [PATCH 02/11] copy and edit pandas azure setup --- .appveyor.yml => .appveyor.yml.back | 0 .travis.yml => .travis.yml.back | 0 azure-pipelines.yml | 86 ++++++++++++++++--- azure/posix.yml | 128 ++++++++++++++++++++++++++++ azure/windows.yml | 122 ++++++++++++++++++++++++++ multibuild | 2 +- 6 files changed, 324 insertions(+), 14 deletions(-) rename .appveyor.yml => .appveyor.yml.back (100%) rename .travis.yml => .travis.yml.back (100%) create mode 100644 azure/posix.yml create mode 100644 azure/windows.yml diff --git a/.appveyor.yml b/.appveyor.yml.back similarity index 100% rename from .appveyor.yml rename to .appveyor.yml.back diff --git a/.travis.yml b/.travis.yml.back similarity index 100% rename from .travis.yml rename to .travis.yml.back diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aa91291..35a5640 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,19 +1,79 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml +schedules: +- cron: "27 3 */1 * *" + # 3:27am UTC everyday + displayName: Nighthly build + branches: + include: + - master + always: true trigger: - master -pool: - vmImage: 'ubuntu-latest' +pr: +- master -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' +jobs: + - template: azure/windows.yml + parameters: + name: windows + vmImage: vs2017-win2016 + matrix: + py_3.6_32: + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "x86" + py_3.6_64: + PYTHON_VERSION: "3.6.x" + py_3.7_32: + PYTHON_VERSION: "3.7.x" + PYTHON_ARCH: "x86" + NIGHTLY_BUILD: "true" + py_3.7_64: + PYTHON_VERSION: "3.7.x" + NIGHTLY_BUILD: "true" + py_3.8_32: + PYTHON_VERSION: "3.8.x" + PYTHON_ARCH: "x86" + NIGHTLY_BUILD: "true" + py_3.8_64: + PYTHON_VERSION: "3.8.x" + NIGHTLY_BUILD: "true" -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' + - template: azure/posix.yml + parameters: + name: linux + vmImage: ubuntu-16.04 + matrix: + py_3.6_32: + MB_PYTHON_VERSION: "3.6" + PLAT: "i686" + py_3.6_64: + MB_PYTHON_VERSION: "3.6" + py_3.7_32: + MB_PYTHON_VERSION: "3.7" + PLAT: "i686" + NIGHTLY_BUILD: "true" + py_3.7_64: + MB_PYTHON_VERSION: "3.7" + NIGHTLY_BUILD: "true" + py_3.8_32: + MB_PYTHON_VERSION: "3.8" + PLAT: "i686" + NIGHTLY_BUILD: "true" + py_3.8_64: + MB_PYTHON_VERSION: "3.8" + NIGHTLY_BUILD: "true" + + - template: azure/posix.yml + parameters: + name: macOS + vmImage: macOS-10.14 + matrix: + py_3.6_64: + MB_PYTHON_VERSION: "3.6" + py_3.7_64: + MB_PYTHON_VERSION: "3.7" + NIGHTLY_BUILD: "true" + py_3.8_64: + MB_PYTHON_VERSION: "3.8" + NIGHTLY_BUILD: "true" diff --git a/azure/posix.yml b/azure/posix.yml new file mode 100644 index 0000000..eb33a78 --- /dev/null +++ b/azure/posix.yml @@ -0,0 +1,128 @@ +parameters: + name: "" + vmImage: "" + matrix: [] + +jobs: + - job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + variables: + REPO_DIR: "numpy" + BUILD_COMMIT: "v1.18.2" + PLAT: "x86_64" + CYTHON_BUILD_DEP: "cython==0.29.16" + NIGHTLY_BUILD_COMMIT: "master" + NIGHTLY_BUILD: "false" + TEST_DEPENDS: "pytest hypothesis cffi pytz" + JUNITXML: "test-data.xml" + TEST_DIR: "tmp_for_test" + strategy: + matrix: + ${{ insert }}: ${{ parameters.matrix }} + + steps: + - checkout: self + submodules: true + + - task: UsePythonVersion@0 + inputs: + versionSpec: $(MB_PYTHON_VERSION) + displayName: Set python version + + - bash: | + set -e + + SKIP_BUILD="false" + if [ "$BUILD_REASON" == "Schedule" ]; then + BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT + if [ "$NIGHTLY_BUILD" != "true" ]; then + SKIP_BUILD="true" + fi + fi + echo "Building numpy@$BUILD_COMMIT" + echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" + echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD" + + # Platform variables used in multibuild scripts + if [ `uname` == 'Darwin' ]; then + echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]osx" + echo "##vso[task.setvariable variable=MACOSX_DEPLOYMENT_TARGET]10.9" + else + echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]linux" + fi + + # Store original Python path to be able to create test_venv pointing + # to same Python version. + PYTHON_EXE=`which python` + echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE" + displayName: Define build env variables + + - bash: | + set -e + pip install virtualenv wheel + BUILD_DEPENDS="$CYTHON_BUILD_DEP" + + source multibuild/common_utils.sh + source multibuild/travis_steps.sh + source extra_functions.sh + + # Setup build dependencies + before_install + + clean_code $REPO_DIR $BUILD_COMMIT + build_wheel $REPO_DIR $PLAT + displayName: Build wheel + condition: eq(variables['SKIP_BUILD'], 'false') + + - bash: | + set -xe + source multibuild/common_utils.sh + source multibuild/travis_steps.sh + source extra_functions.sh + setup_test_venv + install_run $PLAT + teardown_test_venv + displayName: Install wheel and test + condition: eq(variables['SKIP_BUILD'], 'false') + + - bash: | + echo "##vso[task.prependpath]$CONDA/bin" + sudo chown -R $USER $CONDA + displayName: Add conda to PATH + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) + + - bash: conda install -q -y anaconda-client + displayName: Install anaconda-client + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) + + - bash: | + set -e + if [ "$BUILD_REASON" == "Schedule" ]; then + ANACONDA_ORG="scipy-wheels-nightly" + TOKEN="$NUMPY_NIGHTLY_UPLOAD_TOKEN" + else + ANACONDA_ORG="multibuild-wheels-staging" + TOKEN="$NUMPY_STAGING_UPLOAD_TOKEN" + fi + if [ "$TOKEN" == "" ]; then + echo "##[warning] Could not find anaconda.org upload token in secret variables" + fi + echo "##vso[task.setvariable variable=TOKEN]$TOKEN" + echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG" + displayName: Retrieve secret upload token + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) + env: + # Secret variables need to mapped to env variables explicitly: + NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) + NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_STAGING_UPLOAD_TOKEN) + + - bash: | + set -e + # The --force option forces a replacement if the remote file already + # exists. + ls wheelhouse/*.whl + anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl + echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" + displayName: Upload to anaconda.org (only if secret token is retrieved) + condition: ne(variables['TOKEN'], '') diff --git a/azure/windows.yml b/azure/windows.yml new file mode 100644 index 0000000..a103ebb --- /dev/null +++ b/azure/windows.yml @@ -0,0 +1,122 @@ +parameters: + name: "" + vmImage: "" + matrix: [] + +jobs: + - job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + variables: + BUILD_COMMIT: "v1.18.2" + NIGHTLY_BUILD_COMMIT: "master" + NIGHTLY_BUILD: "false" + PYTHON_ARCH: "x64" + JUNITXML: "test-data.xml" + TEST_DIR: '$(Agent.WorkFolder)/tmp_for_test' + strategy: + matrix: + ${{ insert }}: ${{ parameters.matrix }} + steps: + - checkout: self + submodules: true + + - task: UsePythonVersion@0 + inputs: + versionSpec: $(PYTHON_VERSION) + architecture: $(PYTHON_ARCH) + displayName: Set python version + + - bash: | + set -e + echo PYTHON $PYTHON_VERSION $PYTHON_ARCH + echo Build Reason: $BUILD_REASON + python --version + python -c "import struct; print(struct.calcsize('P') * 8)" + pip --version + displayName: Check that we have the expected version and architecture for Python + - bash: | + set -e + SKIP_BUILD="false" + if [ "$BUILD_REASON" == "Schedule" ]; then + BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT + if [ "$NIGHTLY_BUILD" != "true" ]; then + SKIP_BUILD="true" + fi + fi + echo "Building numpy@$BUILD_COMMIT" + echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" + echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD" + # Store original Python path to be able to create test_venv pointing + # to same Python version. + PYTHON_EXE=`which python` + echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE" + displayName: Define build env variables + - bash: | + set -e + cd numpy + git checkout $BUILD_COMMIT + git clean -fxd + git reset --hard + displayName: Checkout numpy commit + condition: eq(variables['SKIP_BUILD'], 'false') + - bash: | + set -e + pip install --timeout=60 -r test_requirements.txt + pip install twine wheel + pushd numpy + python setup.py build + python setup.py bdist_wheel + ls dist + twine check dist/* + popd + displayName: Build wheel + condition: eq(variables['SKIP_BUILD'], 'false') + - bash: | + set -e + source extra_functions.sh + source config.sh + setup_test_venv + pip install numpy/dist/numpy-*.whl + python run_tests.py -mfull + teardown_test_venv + displayName: Install wheel and test + condition: eq(variables['SKIP_BUILD'], 'false') + + - bash: echo "##vso[task.prependpath]$CONDA/Scripts" + displayName: Add conda to PATH + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) + + - bash: conda install -q -y anaconda-client + displayName: Install anaconda-client + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) + + - bash: | + set -e + if [ "$BUILD_REASON" == "Schedule" ]; then + ANACONDA_ORG="scipy-wheels-nightly" + TOKEN="$NUMPY_NIGHTLY_UPLOAD_TOKEN" + else + ANACONDA_ORG="multibuild-wheels-staging" + TOKEN="$NUMPY_STAGING_UPLOAD_TOKEN" + fi + if [ "$TOKEN" == "" ]; then + echo "##[warning] Could not find anaconda.org upload token in secret variables" + fi + echo "##vso[task.setvariable variable=TOKEN]$TOKEN" + echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG" + displayName: Retrieve secret upload token + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) + env: + # Secret variables need to mapped to env variables explicitly: + NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) + NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_STAGING_UPLOAD_TOKEN) + - bash: | + set -e + # The --force option forces a replacement if the remote file already + # exists. + ls numpy/dist/numpy-*.whl + anaconda -t $TOKEN upload --force -u $ANACONDA_ORG numpy/dist/numpy-*.whl + echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" + displayName: Upload to anaconda.org (only if secret token is retrieved) + condition: ne(variables['TOKEN'], '') diff --git a/multibuild b/multibuild index 3bd75ee..da36cd5 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 3bd75eee8fa98ee70e29d59f4ec5a15291362cc2 +Subproject commit da36cd5408e03cad504217de4a21bb8f19f2fb2f From b1e672a82d0c2aa7b45aee9db8299abffbcfc227 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 11:30:23 +0300 Subject: [PATCH 03/11] add missing file, adapte config.sh to windows-bash --- azure/windows.yml | 2 +- config.sh | 3 ++- extra_functions.sh | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 extra_functions.sh diff --git a/azure/windows.yml b/azure/windows.yml index a103ebb..f7eae36 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -78,7 +78,7 @@ jobs: source config.sh setup_test_venv pip install numpy/dist/numpy-*.whl - python run_tests.py -mfull + run_tests teardown_test_venv displayName: Install wheel and test condition: eq(variables['SKIP_BUILD'], 'false') diff --git a/config.sh b/config.sh index e515500..4de7661 100644 --- a/config.sh +++ b/config.sh @@ -1,6 +1,7 @@ # Define custom utilities # Test for OSX with [ -n "$IS_OSX" ] # See env_vars.sh for extra environment variables +if [ $(uname) == "Linux" ]; then IS_LINUX=1; fi source gfortran-install/gfortran_utils.sh function build_wheel { @@ -36,7 +37,7 @@ function get_test_cmd { function run_tests { # Runs tests on installed distribution from an empty directory - if [ -z "$IS_OSX" ]; then + if [ -n "$IS_LINUX" ]; then apt-get -y update && apt-get install -y gfortran fi python -c "$(get_test_cmd)" diff --git a/extra_functions.sh b/extra_functions.sh new file mode 100644 index 0000000..6e5f1b6 --- /dev/null +++ b/extra_functions.sh @@ -0,0 +1,29 @@ +function setup_test_venv { + # Create a new empty venv dedicated to testing for non-Linux platforms. On + # Linux the tests are run in a Docker container. + if [ $(uname) != "Linux" ]; then + deactivate || echo "" + $PYTHON_EXE -m venv test_venv + if [ $(uname) == "Darwin" ]; then + source test_venv/bin/activate + else + source test_venv/Scripts/activate + fi + # Note: the idiom "python -m pip install ..." is necessary to upgrade + # pip itself on Windows. Otherwise one would get a permission error on + # pip.exe. + python -m pip install --upgrade pip wheel + if [ "$TEST_DEPENDS" != "" ]; then + pip install $TEST_DEPENDS + fi + fi +} + +function teardown_test_venv { + if [ $(uname) != "Linux" ]; then + deactivate || echo "" + if [ $(uname) == "Darwin" ]; then + source venv/bin/activate + fi + fi +} From 3cf8f1e176803ff26ec2018f9c88b65fdd253e70 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 12:32:18 +0300 Subject: [PATCH 04/11] use manylinux2010, fix order of commands on windows --- azure-pipelines.yml | 15 +++++++++++++++ azure/windows.yml | 4 ++-- env_vars_32.sh | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 35a5640..c6a5c5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -47,22 +47,34 @@ jobs: py_3.6_32: MB_PYTHON_VERSION: "3.6" PLAT: "i686" + MB_ML_VER: "2010" + ENV_VARS_PATH: "env_vars_32.sh" + DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}" py_3.6_64: MB_PYTHON_VERSION: "3.6" + MB_ML_VER: "2010" py_3.7_32: MB_PYTHON_VERSION: "3.7" PLAT: "i686" NIGHTLY_BUILD: "true" + MB_ML_VER: "2010" + ENV_VARS_PATH: "env_vars_32.sh" + DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}" py_3.7_64: MB_PYTHON_VERSION: "3.7" NIGHTLY_BUILD: "true" + MB_ML_VER: "2010" py_3.8_32: MB_PYTHON_VERSION: "3.8" PLAT: "i686" NIGHTLY_BUILD: "true" + MB_ML_VER: "2010" + ENV_VARS_PATH: "env_vars_32.sh" + DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}" py_3.8_64: MB_PYTHON_VERSION: "3.8" NIGHTLY_BUILD: "true" + MB_ML_VER: "2010" - template: azure/posix.yml parameters: @@ -71,9 +83,12 @@ jobs: matrix: py_3.6_64: MB_PYTHON_VERSION: "3.6" + MB_PYTHON_OSX_VER: 10.9 py_3.7_64: MB_PYTHON_VERSION: "3.7" NIGHTLY_BUILD: "true" + MB_PYTHON_OSX_VER: 10.9 py_3.8_64: MB_PYTHON_VERSION: "3.8" NIGHTLY_BUILD: "true" + MB_PYTHON_OSX_VER: 10.9 diff --git a/azure/windows.yml b/azure/windows.yml index f7eae36..44b6bbf 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -62,9 +62,9 @@ jobs: condition: eq(variables['SKIP_BUILD'], 'false') - bash: | set -e - pip install --timeout=60 -r test_requirements.txt - pip install twine wheel pushd numpy + pip install twine wheel + pip install --timeout=60 -r test_requirements.txt python setup.py build python setup.py bdist_wheel ls dist diff --git a/env_vars_32.sh b/env_vars_32.sh index 46b1aaa..8c1969b 100644 --- a/env_vars_32.sh +++ b/env_vars_32.sh @@ -1,6 +1,7 @@ # Environment variables for 32-bit build. # The important difference from the 64-bit build is `-msse2` to # compile sse loops for ufuncs. +set -x OPENBLAS_VERSION="v0.3.7" MACOSX_DEPLOYMENT_TARGET=10.9 CFLAGS="-msse2 -std=c99 -fno-strict-aliasing" From b73a40b8b3d8f5d2d3b0dcc7d0b7ea6c53c8e883 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 12:49:32 +0300 Subject: [PATCH 05/11] add debugging, fix for no deactivate --- config.sh | 1 + extra_functions.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.sh b/config.sh index 4de7661..bf3f622 100644 --- a/config.sh +++ b/config.sh @@ -23,6 +23,7 @@ function build_libs { # the un-tar root directory, then the files are copied into /usr/local. # Could utilize a site.cfg instead to prevent the copy. python -mpip install urllib3 + python -c"import platform; print('platform.uname().machine', platform.uname().machine)" basedir=$(python numpy/tools/openblas_support.py) $use_sudo cp -r $basedir/lib/* /usr/local/lib $use_sudo cp $basedir/include/* /usr/local/include diff --git a/extra_functions.sh b/extra_functions.sh index 6e5f1b6..e86f7e0 100644 --- a/extra_functions.sh +++ b/extra_functions.sh @@ -2,7 +2,7 @@ function setup_test_venv { # Create a new empty venv dedicated to testing for non-Linux platforms. On # Linux the tests are run in a Docker container. if [ $(uname) != "Linux" ]; then - deactivate || echo "" + if type -t deactivate ; then deactivate; fi $PYTHON_EXE -m venv test_venv if [ $(uname) == "Darwin" ]; then source test_venv/bin/activate @@ -21,7 +21,7 @@ function setup_test_venv { function teardown_test_venv { if [ $(uname) != "Linux" ]; then - deactivate || echo "" + if type -t deactivate ; then deactivate; fi if [ $(uname) == "Darwin" ]; then source venv/bin/activate fi From 585ffa182be340d01592b464a581381264fb03a1 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 13:06:55 +0300 Subject: [PATCH 06/11] update numpy subrepo, add test requirements on win32 --- azure/posix.yml | 2 +- azure/windows.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/azure/posix.yml b/azure/posix.yml index eb33a78..08a540f 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -9,7 +9,7 @@ jobs: vmImage: ${{ parameters.vmImage }} variables: REPO_DIR: "numpy" - BUILD_COMMIT: "v1.18.2" + BUILD_COMMIT: "master" PLAT: "x86_64" CYTHON_BUILD_DEP: "cython==0.29.16" NIGHTLY_BUILD_COMMIT: "master" diff --git a/azure/windows.yml b/azure/windows.yml index 44b6bbf..ef1b2b5 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -73,10 +73,11 @@ jobs: displayName: Build wheel condition: eq(variables['SKIP_BUILD'], 'false') - bash: | - set -e + set -ex source extra_functions.sh source config.sh setup_test_venv + pip install -r test_requirements.txt pip install numpy/dist/numpy-*.whl run_tests teardown_test_venv From be276d2180cabf53b022fc2347527ee3a311b54a Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 14:28:29 +0300 Subject: [PATCH 07/11] handle LICENSE, and for win32 openblas --- azure/posix.yml | 1 + azure/windows.yml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/azure/posix.yml b/azure/posix.yml index 08a540f..e0c4054 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -71,6 +71,7 @@ jobs: before_install clean_code $REPO_DIR $BUILD_COMMIT + ./patch_code.sh $REPO_DIR build_wheel $REPO_DIR $PLAT displayName: Build wheel condition: eq(variables['SKIP_BUILD'], 'false') diff --git a/azure/windows.yml b/azure/windows.yml index ef1b2b5..68b4cb0 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -63,8 +63,20 @@ jobs: - bash: | set -e pushd numpy - pip install twine wheel + pip install twine wheel urllib3 + # a bit overkill, all we really need is cython pip install --timeout=60 -r test_requirements.txt + + # handle license + cp ../LICENSE_win32.txt LICENSE.txt + + # Download and install static "openblas.a" to PYTHON/lib + PYTHON_DIR=$(python -c"import sys, os; print(os.path.dirname(sys.executable))") + LIB=$(python tools/openblas_support.py) + echo Copying $LIB to $PYTHON_DIR/lib + cp $LIB $PYTHON_DIR/lib/openblas.a + + # Build the wheel python setup.py build python setup.py bdist_wheel ls dist @@ -77,7 +89,7 @@ jobs: source extra_functions.sh source config.sh setup_test_venv - pip install -r test_requirements.txt + pip install -r numpy/test_requirements.txt pip install numpy/dist/numpy-*.whl run_tests teardown_test_venv From 6cb45191f337b9b1de8ea5b00d7ce500d2d6104c Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 15:05:05 +0300 Subject: [PATCH 08/11] fix for missing PIP_CMD in multibuild on macOS --- extra_functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extra_functions.sh b/extra_functions.sh index e86f7e0..c1d3f9e 100644 --- a/extra_functions.sh +++ b/extra_functions.sh @@ -27,3 +27,5 @@ function teardown_test_venv { fi fi } +# Work around bug in multibuild +if [ ! -o PIP_CMD ]; then PIP_CMD="$PYTHON_EXE -mpip"; fi From 3b74aa4d93cd609e70a4020faa3c57eafcd4b45a Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 14 Apr 2020 15:38:27 +0300 Subject: [PATCH 09/11] reuse numpy azure configuration for windows, cleanups --- .appveyor.yml | 10 +++++++ azure-pipelines.yml | 26 ++++++++--------- azure/posix.yml | 26 ++++++----------- azure/windows.yml | 68 ++++++++++++++++++++++++++------------------- config.sh | 6 ++-- extra_functions.sh | 5 +++- 6 files changed, 76 insertions(+), 65 deletions(-) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..b95086c --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,10 @@ +image: Ubuntu + +install: +- echo done + +test_script: +- echo done + +build: off + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c6a5c5d..7568410 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ schedules: - cron: "27 3 */1 * *" # 3:27am UTC everyday - displayName: Nighthly build + displayName: Nightly build branches: include: - master @@ -22,27 +22,32 @@ jobs: py_3.6_32: PYTHON_VERSION: "3.6.x" PYTHON_ARCH: "x86" + BITS: 32 py_3.6_64: PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: 'x64' + BITS: 64 py_3.7_32: PYTHON_VERSION: "3.7.x" PYTHON_ARCH: "x86" - NIGHTLY_BUILD: "true" + BITS: 32 py_3.7_64: PYTHON_VERSION: "3.7.x" - NIGHTLY_BUILD: "true" + PYTHON_ARCH: 'x64' + BITS: 64 py_3.8_32: PYTHON_VERSION: "3.8.x" PYTHON_ARCH: "x86" - NIGHTLY_BUILD: "true" + BITS: 32 py_3.8_64: PYTHON_VERSION: "3.8.x" - NIGHTLY_BUILD: "true" + PYTHON_ARCH: 'x64' + BITS: 64 - template: azure/posix.yml parameters: name: linux - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 matrix: py_3.6_32: MB_PYTHON_VERSION: "3.6" @@ -56,24 +61,20 @@ jobs: py_3.7_32: MB_PYTHON_VERSION: "3.7" PLAT: "i686" - NIGHTLY_BUILD: "true" MB_ML_VER: "2010" ENV_VARS_PATH: "env_vars_32.sh" DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}" py_3.7_64: MB_PYTHON_VERSION: "3.7" - NIGHTLY_BUILD: "true" MB_ML_VER: "2010" py_3.8_32: MB_PYTHON_VERSION: "3.8" PLAT: "i686" - NIGHTLY_BUILD: "true" MB_ML_VER: "2010" ENV_VARS_PATH: "env_vars_32.sh" DOCKER_TEST_IMAGE: "multibuild/xenial_{PLAT}" py_3.8_64: MB_PYTHON_VERSION: "3.8" - NIGHTLY_BUILD: "true" MB_ML_VER: "2010" - template: azure/posix.yml @@ -83,12 +84,7 @@ jobs: matrix: py_3.6_64: MB_PYTHON_VERSION: "3.6" - MB_PYTHON_OSX_VER: 10.9 py_3.7_64: MB_PYTHON_VERSION: "3.7" - NIGHTLY_BUILD: "true" - MB_PYTHON_OSX_VER: 10.9 py_3.8_64: MB_PYTHON_VERSION: "3.8" - NIGHTLY_BUILD: "true" - MB_PYTHON_OSX_VER: 10.9 diff --git a/azure/posix.yml b/azure/posix.yml index e0c4054..01d8253 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -9,11 +9,10 @@ jobs: vmImage: ${{ parameters.vmImage }} variables: REPO_DIR: "numpy" - BUILD_COMMIT: "master" + BUILD_COMMIT: 'v1.18.3' PLAT: "x86_64" CYTHON_BUILD_DEP: "cython==0.29.16" NIGHTLY_BUILD_COMMIT: "master" - NIGHTLY_BUILD: "false" TEST_DEPENDS: "pytest hypothesis cffi pytz" JUNITXML: "test-data.xml" TEST_DIR: "tmp_for_test" @@ -33,16 +32,11 @@ jobs: - bash: | set -e - SKIP_BUILD="false" if [ "$BUILD_REASON" == "Schedule" ]; then BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT - if [ "$NIGHTLY_BUILD" != "true" ]; then - SKIP_BUILD="true" - fi fi echo "Building numpy@$BUILD_COMMIT" echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" - echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD" # Platform variables used in multibuild scripts if [ `uname` == 'Darwin' ]; then @@ -60,6 +54,7 @@ jobs: - bash: | set -e + echo $BUILD_COMMIT pip install virtualenv wheel BUILD_DEPENDS="$CYTHON_BUILD_DEP" @@ -74,10 +69,9 @@ jobs: ./patch_code.sh $REPO_DIR build_wheel $REPO_DIR $PLAT displayName: Build wheel - condition: eq(variables['SKIP_BUILD'], 'false') - bash: | - set -xe + set -e source multibuild/common_utils.sh source multibuild/travis_steps.sh source extra_functions.sh @@ -85,26 +79,23 @@ jobs: install_run $PLAT teardown_test_venv displayName: Install wheel and test - condition: eq(variables['SKIP_BUILD'], 'false') - bash: | echo "##vso[task.prependpath]$CONDA/bin" sudo chown -R $USER $CONDA displayName: Add conda to PATH - condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) - bash: conda install -q -y anaconda-client displayName: Install anaconda-client - condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) - bash: | set -e if [ "$BUILD_REASON" == "Schedule" ]; then ANACONDA_ORG="scipy-wheels-nightly" - TOKEN="$NUMPY_NIGHTLY_UPLOAD_TOKEN" + TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN" else ANACONDA_ORG="multibuild-wheels-staging" - TOKEN="$NUMPY_STAGING_UPLOAD_TOKEN" + TOKEN="$MAPPED_NUMPY_STAGING_UPLOAD_TOKEN" fi if [ "$TOKEN" == "" ]; then echo "##[warning] Could not find anaconda.org upload token in secret variables" @@ -112,17 +103,16 @@ jobs: echo "##vso[task.setvariable variable=TOKEN]$TOKEN" echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG" displayName: Retrieve secret upload token - condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) env: # Secret variables need to mapped to env variables explicitly: - NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) - NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_STAGING_UPLOAD_TOKEN) + MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) + MAPPED_NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_STAGING_UPLOAD_TOKEN) - bash: | set -e # The --force option forces a replacement if the remote file already # exists. - ls wheelhouse/*.whl + echo uploading wheelhouse/*.whl anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) diff --git a/azure/windows.yml b/azure/windows.yml index 68b4cb0..4ffee1b 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -8,10 +8,8 @@ jobs: pool: vmImage: ${{ parameters.vmImage }} variables: - BUILD_COMMIT: "v1.18.2" + BUILD_COMMIT: "v1.18.3" NIGHTLY_BUILD_COMMIT: "master" - NIGHTLY_BUILD: "false" - PYTHON_ARCH: "x64" JUNITXML: "test-data.xml" TEST_DIR: '$(Agent.WorkFolder)/tmp_for_test' strategy: @@ -24,6 +22,7 @@ jobs: - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) + addToPath: true architecture: $(PYTHON_ARCH) displayName: Set python version @@ -37,16 +36,11 @@ jobs: displayName: Check that we have the expected version and architecture for Python - bash: | set -e - SKIP_BUILD="false" if [ "$BUILD_REASON" == "Schedule" ]; then BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT - if [ "$NIGHTLY_BUILD" != "true" ]; then - SKIP_BUILD="true" - fi fi echo "Building numpy@$BUILD_COMMIT" echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" - echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD" # Store original Python path to be able to create test_venv pointing # to same Python version. PYTHON_EXE=`which python` @@ -55,13 +49,18 @@ jobs: - bash: | set -e cd numpy + git fetch origin HEAD git checkout $BUILD_COMMIT git clean -fxd git reset --hard displayName: Checkout numpy commit - condition: eq(variables['SKIP_BUILD'], 'false') + + - 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) - bash: | - set -e + set -xe pushd numpy pip install twine wheel urllib3 # a bit overkill, all we really need is cython @@ -70,48 +69,61 @@ jobs: # handle license cp ../LICENSE_win32.txt LICENSE.txt - # Download and install static "openblas.a" to PYTHON/lib - PYTHON_DIR=$(python -c"import sys, os; print(os.path.dirname(sys.executable))") - LIB=$(python tools/openblas_support.py) - echo Copying $LIB to $PYTHON_DIR/lib - cp $LIB $PYTHON_DIR/lib/openblas.a + # handle _distributor_init.py + PYTHONPATH=tools python -c "import openblas_support; openblas_support.make_init('numpy')" + + # Download and get the path to "openblas.a". We cannot copy it + # to $PYTHON_EXE's directory since that is on a different drive which + # mingw does not like. Instead copy it to a directory and set OPENBLAS + target=$(python tools/openblas_support.py) + mkdir -p openblas + echo Copying $target to openblas + cp $target openblas + echo "##vso[task.setvariable variable=OPENBLAS]openblas" + displayName: Prepare the build + - powershell: | + If ($(BITS) -eq 32) { + $env:CFLAGS = "-m32" + $env:LDFLAGS = "-m32" + $env:PATH = "C:\\tools\\mingw32\\bin;" + $env:PATH + refreshenv + } # Build the wheel + pushd numpy python setup.py build python setup.py bdist_wheel - ls dist twine check dist/* popd displayName: Build wheel - condition: eq(variables['SKIP_BUILD'], 'false') - bash: | set -ex source extra_functions.sh source config.sh setup_test_venv - pip install -r numpy/test_requirements.txt - pip install numpy/dist/numpy-*.whl + python -m pip install -r numpy/test_requirements.txt + python -m pip install numpy/dist/numpy-*.whl + mkdir -p for_test + pushd for_test run_tests + popd teardown_test_venv displayName: Install wheel and test - condition: eq(variables['SKIP_BUILD'], 'false') - bash: echo "##vso[task.prependpath]$CONDA/Scripts" displayName: Add conda to PATH - condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) - bash: conda install -q -y anaconda-client displayName: Install anaconda-client - condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) - bash: | set -e if [ "$BUILD_REASON" == "Schedule" ]; then ANACONDA_ORG="scipy-wheels-nightly" - TOKEN="$NUMPY_NIGHTLY_UPLOAD_TOKEN" + TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN" else ANACONDA_ORG="multibuild-wheels-staging" - TOKEN="$NUMPY_STAGING_UPLOAD_TOKEN" + TOKEN="$MAPPED_NUMPY_STAGING_UPLOAD_TOKEN" fi if [ "$TOKEN" == "" ]; then echo "##[warning] Could not find anaconda.org upload token in secret variables" @@ -119,16 +131,16 @@ jobs: echo "##vso[task.setvariable variable=TOKEN]$TOKEN" echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG" displayName: Retrieve secret upload token - condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest')) env: # Secret variables need to mapped to env variables explicitly: - NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) - NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_STAGING_UPLOAD_TOKEN) + MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN: $(NUMPY_NIGHTLY_UPLOAD_TOKEN) + MAPPED_NUMPY_STAGING_UPLOAD_TOKEN: $(NUMPY_STAGING_UPLOAD_TOKEN) + - bash: | set -e # The --force option forces a replacement if the remote file already # exists. - ls numpy/dist/numpy-*.whl + echo uploading numpy/dist/numpy-*.whl anaconda -t $TOKEN upload --force -u $ANACONDA_ORG numpy/dist/numpy-*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) diff --git a/config.sh b/config.sh index bf3f622..bc65dfe 100644 --- a/config.sh +++ b/config.sh @@ -41,10 +41,10 @@ function run_tests { if [ -n "$IS_LINUX" ]; then apt-get -y update && apt-get install -y gfortran fi - python -c "$(get_test_cmd)" + $PYTHON_EXE -c "$(get_test_cmd)" # Check bundled license file - python ../check_license.py + $PYTHON_EXE ../check_license.py # Show BLAS / LAPACK used. Since this uses a wheel we cannot use # tools/openblas_config.py; tools is not part of what is shipped - python -c 'import numpy; numpy.show_config()' + $PYTHON_EXE -c 'import numpy; numpy.show_config()' } diff --git a/extra_functions.sh b/extra_functions.sh index c1d3f9e..1a58c66 100644 --- a/extra_functions.sh +++ b/extra_functions.sh @@ -7,11 +7,14 @@ function setup_test_venv { if [ $(uname) == "Darwin" ]; then source test_venv/bin/activate else + mkdir -p test_venv/libs source test_venv/Scripts/activate fi # Note: the idiom "python -m pip install ..." is necessary to upgrade # pip itself on Windows. Otherwise one would get a permission error on # pip.exe. + PYTHON_EXE=python + PIP_CMD="$PYTHON_EXE -m pip" python -m pip install --upgrade pip wheel if [ "$TEST_DEPENDS" != "" ]; then pip install $TEST_DEPENDS @@ -28,4 +31,4 @@ function teardown_test_venv { fi } # Work around bug in multibuild -if [ ! -o PIP_CMD ]; then PIP_CMD="$PYTHON_EXE -mpip"; fi +if [ ! -o PIP_CMD ]; then PIP_CMD="$PYTHON_EXE -m pip"; fi From 8c67a249bee20b6f8f88c30c59bdf061397e025e Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 21 Apr 2020 13:27:46 +0300 Subject: [PATCH 10/11] trigger as if scheduled build --- azure/posix.yml | 5 +++-- azure/windows.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure/posix.yml b/azure/posix.yml index 01d8253..f006097 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -32,7 +32,7 @@ jobs: - bash: | set -e - if [ "$BUILD_REASON" == "Schedule" ]; then + if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT fi echo "Building numpy@$BUILD_COMMIT" @@ -90,7 +90,7 @@ jobs: - bash: | set -e - if [ "$BUILD_REASON" == "Schedule" ]; then + if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then ANACONDA_ORG="scipy-wheels-nightly" TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN" else @@ -113,6 +113,7 @@ jobs: # The --force option forces a replacement if the remote file already # exists. echo uploading wheelhouse/*.whl + echo TOKEN starts with ${TOKEN:0:3} anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) diff --git a/azure/windows.yml b/azure/windows.yml index 4ffee1b..3793257 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -36,7 +36,7 @@ jobs: displayName: Check that we have the expected version and architecture for Python - bash: | set -e - if [ "$BUILD_REASON" == "Schedule" ]; then + if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT fi echo "Building numpy@$BUILD_COMMIT" @@ -118,7 +118,7 @@ jobs: - bash: | set -e - if [ "$BUILD_REASON" == "Schedule" ]; then + if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then ANACONDA_ORG="scipy-wheels-nightly" TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN" else @@ -141,6 +141,7 @@ jobs: # The --force option forces a replacement if the remote file already # exists. echo uploading numpy/dist/numpy-*.whl + echo TOKEN starts with ${TOKEN:0:3} anaconda -t $TOKEN upload --force -u $ANACONDA_ORG numpy/dist/numpy-*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) From bdbadcbe35bc414af9c829908546f7f6ba8f11a2 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 21 Apr 2020 22:48:56 +0300 Subject: [PATCH 11/11] revert last commit: uploads to scipy-wheels-nightly work. Make them weekly --- azure-pipelines.yml | 6 +++--- azure/posix.yml | 5 ++--- azure/windows.yml | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7568410..be7193c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ schedules: -- cron: "27 3 */1 * *" - # 3:27am UTC everyday - displayName: Nightly build +- cron: "27 3 * * 0" + # 3:27am UTC every Sunday + displayName: Weekly build branches: include: - master diff --git a/azure/posix.yml b/azure/posix.yml index f006097..01d8253 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -32,7 +32,7 @@ jobs: - bash: | set -e - if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then + if [ "$BUILD_REASON" == "Schedule" ]; then BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT fi echo "Building numpy@$BUILD_COMMIT" @@ -90,7 +90,7 @@ jobs: - bash: | set -e - if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then + if [ "$BUILD_REASON" == "Schedule" ]; then ANACONDA_ORG="scipy-wheels-nightly" TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN" else @@ -113,7 +113,6 @@ jobs: # The --force option forces a replacement if the remote file already # exists. echo uploading wheelhouse/*.whl - echo TOKEN starts with ${TOKEN:0:3} anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) diff --git a/azure/windows.yml b/azure/windows.yml index 3793257..4ffee1b 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -36,7 +36,7 @@ jobs: displayName: Check that we have the expected version and architecture for Python - bash: | set -e - if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then + if [ "$BUILD_REASON" == "Schedule" ]; then BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT fi echo "Building numpy@$BUILD_COMMIT" @@ -118,7 +118,7 @@ jobs: - bash: | set -e - if [ 1 -o "$BUILD_REASON" == "Schedule" ]; then + if [ "$BUILD_REASON" == "Schedule" ]; then ANACONDA_ORG="scipy-wheels-nightly" TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN" else @@ -141,7 +141,6 @@ jobs: # The --force option forces a replacement if the remote file already # exists. echo uploading numpy/dist/numpy-*.whl - echo TOKEN starts with ${TOKEN:0:3} anaconda -t $TOKEN upload --force -u $ANACONDA_ORG numpy/dist/numpy-*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved)