From 931a19dcef6e06b844e2d4ec4e6593dedcaddbc0 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 13:05:13 -0500 Subject: [PATCH 01/21] TST Builds source dist and tests --- azure-pipelines.yml | 153 +++++++++++++++++++++--------------------- azure/posix-sdist.yml | 74 ++++++++++++++++++++ 2 files changed, 151 insertions(+), 76 deletions(-) create mode 100644 azure/posix-sdist.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ea3a01e2..0ba8f222 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,81 +8,82 @@ schedules: always: true jobs: - - template: azure/windows.yml - parameters: - name: windows - vmImage: vs2017-win2016 - matrix: - py_3.6_32: - PYTHON_VERSION: "3.6.x" - PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.12.1" - py_3.6_64: - PYTHON_VERSION: "3.6.x" - NP_BUILD_DEP: "1.12.1" - py_3.7_32: - PYTHON_VERSION: "3.7.x" - PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.14.5" - NIGHTLY_BUILD: "true" - py_3.7_64: - PYTHON_VERSION: "3.7.x" - NP_BUILD_DEP: "1.14.5" - NIGHTLY_BUILD: "true" - py_3.8_32: - PYTHON_VERSION: "3.8.x" - PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.17.3" - SCIPY_BUILD_DEP: "1.4.1" - NIGHTLY_BUILD: "true" - py_3.8_64: - PYTHON_VERSION: "3.8.x" - NP_BUILD_DEP: "1.17.3" - SCIPY_BUILD_DEP: "1.4.1" - NIGHTLY_BUILD: "true" + - template: azure/posix-sdist.yml + # - template: azure/windows.yml + # parameters: + # name: windows + # vmImage: vs2017-win2016 + # matrix: + # py_3.6_32: + # PYTHON_VERSION: "3.6.x" + # PYTHON_ARCH: "x86" + # NP_BUILD_DEP: "1.12.1" + # py_3.6_64: + # PYTHON_VERSION: "3.6.x" + # NP_BUILD_DEP: "1.12.1" + # py_3.7_32: + # PYTHON_VERSION: "3.7.x" + # PYTHON_ARCH: "x86" + # NP_BUILD_DEP: "1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.7_64: + # PYTHON_VERSION: "3.7.x" + # NP_BUILD_DEP: "1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.8_32: + # PYTHON_VERSION: "3.8.x" + # PYTHON_ARCH: "x86" + # NP_BUILD_DEP: "1.17.3" + # SCIPY_BUILD_DEP: "1.4.1" + # NIGHTLY_BUILD: "true" + # py_3.8_64: + # PYTHON_VERSION: "3.8.x" + # NP_BUILD_DEP: "1.17.3" + # SCIPY_BUILD_DEP: "1.4.1" + # NIGHTLY_BUILD: "true" - - 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" - NP_BUILD_DEP: "numpy==1.14.5" - NIGHTLY_BUILD: "true" - py_3.7_64: - MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" - NIGHTLY_BUILD: "true" - py_3.8_32: - MB_PYTHON_VERSION: "3.8" - PLAT: "i686" - NP_BUILD_DEP: "numpy==1.17.3" - NIGHTLY_BUILD: "true" - py_3.8_64: - MB_PYTHON_VERSION: "3.8" - NP_BUILD_DEP: "numpy==1.17.3" - NIGHTLY_BUILD: "true" + # - 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" + # NP_BUILD_DEP: "numpy==1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.7_64: + # MB_PYTHON_VERSION: "3.7" + # NP_BUILD_DEP: "numpy==1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.8_32: + # MB_PYTHON_VERSION: "3.8" + # PLAT: "i686" + # NP_BUILD_DEP: "numpy==1.17.3" + # NIGHTLY_BUILD: "true" + # py_3.8_64: + # MB_PYTHON_VERSION: "3.8" + # NP_BUILD_DEP: "numpy==1.17.3" + # NIGHTLY_BUILD: "true" - - template: azure/posix.yml - parameters: - name: macOS - vmImage: macOS-10.14 - matrix: - py_3.6_64: - MB_PYTHON_VERSION: "3.6" - NP_BUILD_DEP: "numpy==1.13.3" - py_3.7_64: - MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" - NIGHTLY_BUILD: "true" - py_3.8_64: - MB_PYTHON_VERSION: "3.8" - NP_BUILD_DEP: "numpy==1.17.3" - NIGHTLY_BUILD: "true" + # - template: azure/posix.yml + # parameters: + # name: macOS + # vmImage: macOS-10.14 + # matrix: + # py_3.6_64: + # MB_PYTHON_VERSION: "3.6" + # NP_BUILD_DEP: "numpy==1.13.3" + # py_3.7_64: + # MB_PYTHON_VERSION: "3.7" + # NP_BUILD_DEP: "numpy==1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.8_64: + # MB_PYTHON_VERSION: "3.8" + # NP_BUILD_DEP: "numpy==1.17.3" + # NIGHTLY_BUILD: "true" diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml new file mode 100644 index 00000000..4cfa0851 --- /dev/null +++ b/azure/posix-sdist.yml @@ -0,0 +1,74 @@ +jobs: + - job: Linux Source Distrubution + pool: + vmImage: ubuntu-16.04 + variables: + BUILD_COMMIT: "0.22.2.post1" + NIGHTLY_BUILD_COMMIT: "master" + NIGHTLY_BUILD: "true" + JUNITXML: "test-data.xml" + TEST_DIR: "tmp_for_test" + TEST_VENV: "test_env" + MB_PYTHON_VERSION: "3.8" + 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 scikit-learn@$BUILD_COMMIT" + echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" + echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD" + displayName: Define build env variables + + - bash: | + set -e + + python -m pip install -U pip + python -m venv build_env + source build_env/bin/activate + python -m pip install numpy scipy Cython + + cd scikit-learn + git checkout $BUILD_COMMIT + python setup.py sdist + displayName: Create build venv with build dependices and build source dist + + - bash: | + set -e + + python -m venv $TEST_ENV + source $TEST_ENV/bin/activate + + # Uses pep 517 + pip install scikit-learn/dist/*.tar.gz + displayName: Create test venv and install + + - bash: | + set -e + source $TEST_ENV/bin/activate + + mkdir $TEST_DIR + cd $TEST_DIR + + python -m pip install pytest + pytest -l --junitxml=$JUNITXML --pyargs sklearn + displayName: Install scikit-learn using source dist + + - task: PublishTestResults@2 + inputs: + testResultsFiles: "$(TEST_DIR)/$(JUNITXML)" + testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux Source') }} + displayName: "Publish Test Results" + condition: eq(variables['SKIP_BUILD'], 'false') From f81d356ed3313d844db0ede33315d80eb7edd960 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 13:08:40 -0500 Subject: [PATCH 02/21] TST Fixes job name --- azure/posix-sdist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 4cfa0851..ceb1d91f 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -1,5 +1,5 @@ jobs: - - job: Linux Source Distrubution + - job: Linux_Source_Dist pool: vmImage: ubuntu-16.04 variables: @@ -69,6 +69,6 @@ jobs: - task: PublishTestResults@2 inputs: testResultsFiles: "$(TEST_DIR)/$(JUNITXML)" - testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux Source') }} + testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux_Source_Dist') }} displayName: "Publish Test Results" condition: eq(variables['SKIP_BUILD'], 'false') From 951e67d542f2eb63f67b9a5b1859a4a19f306acd Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 13:46:07 -0500 Subject: [PATCH 03/21] BUG Fix --- azure/posix-sdist.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index ceb1d91f..d59b6844 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -48,8 +48,8 @@ jobs: - bash: | set -e - python -m venv $TEST_ENV - source $TEST_ENV/bin/activate + python -m venv $TEST_VENV + source $TEST_VENV/bin/activate # Uses pep 517 pip install scikit-learn/dist/*.tar.gz @@ -57,7 +57,7 @@ jobs: - bash: | set -e - source $TEST_ENV/bin/activate + source $TEST_VENV/bin/activate mkdir $TEST_DIR cd $TEST_DIR From a50c6741c8dc2b1e2f2415284d1e8753acb7edb8 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 14:00:05 -0500 Subject: [PATCH 04/21] BUG Fix --- azure/posix-sdist.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index d59b6844..1bacd156 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -35,7 +35,6 @@ jobs: - bash: | set -e - python -m pip install -U pip python -m venv build_env source build_env/bin/activate python -m pip install numpy scipy Cython @@ -48,8 +47,17 @@ jobs: - bash: | set -e + source build_env/bin/activate + python -m pip install twine + + twine check scikit-learn/dist/* + displayName: Twine check + - bash: | + set -e + python -m venv $TEST_VENV source $TEST_VENV/bin/activate + python -m pip install -U pip # Uses pep 517 pip install scikit-learn/dist/*.tar.gz From 02e4adfa28b3c7e69861db952bb7765ebc692518 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 14:23:23 -0500 Subject: [PATCH 05/21] BUG Fix --- azure/posix-sdist.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 1bacd156..ae9baa70 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -57,8 +57,14 @@ jobs: python -m venv $TEST_VENV source $TEST_VENV/bin/activate + python --version python -m pip install -U pip + # For now only master and >=0.23 contains project.toml + if [ "$BUILD_COMMIT" != "$NIGHTLY_BUILD_COMMIT" ]; then + python -m pip install Cython + fi + # Uses pep 517 pip install scikit-learn/dist/*.tar.gz displayName: Create test venv and install From 9159b08f3aeee284907dc69bfe29686d70906e68 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 14:37:02 -0500 Subject: [PATCH 06/21] TST Test using master --- azure-pipelines.yml | 2 -- azure/posix-sdist.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0ba8f222..d85a8a98 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -41,7 +41,6 @@ jobs: # NP_BUILD_DEP: "1.17.3" # SCIPY_BUILD_DEP: "1.4.1" # NIGHTLY_BUILD: "true" - # - template: azure/posix.yml # parameters: # name: linux @@ -70,7 +69,6 @@ jobs: # MB_PYTHON_VERSION: "3.8" # NP_BUILD_DEP: "numpy==1.17.3" # NIGHTLY_BUILD: "true" - # - template: azure/posix.yml # parameters: # name: macOS diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index ae9baa70..12c4d087 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -26,6 +26,7 @@ jobs: SKIP_BUILD="true" fi fi + BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT echo "Building scikit-learn@$BUILD_COMMIT" echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" @@ -86,3 +87,44 @@ jobs: testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux_Source_Dist') }} displayName: "Publish Test Results" 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="$SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN" + else + ANACONDA_ORG="scikit-learn-wheels-staging" + TOKEN="$SCIKIT_LEARN_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: + SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN: $(SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN) + SCIKIT_LEARN_STAGING_UPLOAD_TOKEN: $(SCIKIT_LEARN_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'], '') From 3a8ae2f1e32cbc608d987bfe9f2cf32dce8b0a99 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 14:47:34 -0500 Subject: [PATCH 07/21] BLD Uses global build commit variable --- azure-pipelines.yml | 3 +++ azure/posix-sdist.yml | 5 ++--- azure/posix.yml | 1 - azure/windows.yml | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d85a8a98..ded40aa6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,6 +7,9 @@ schedules: - master always: true +variables: + BUILD_COMMIT: "0.22.2.post1" + jobs: - template: azure/posix-sdist.yml # - template: azure/windows.yml diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 12c4d087..edf09871 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -26,7 +26,6 @@ jobs: SKIP_BUILD="true" fi fi - BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT echo "Building scikit-learn@$BUILD_COMMIT" echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT" @@ -68,7 +67,7 @@ jobs: # Uses pep 517 pip install scikit-learn/dist/*.tar.gz - displayName: Create test venv and install + displayName: Create test venv and install using source dist - bash: | set -e @@ -79,7 +78,7 @@ jobs: python -m pip install pytest pytest -l --junitxml=$JUNITXML --pyargs sklearn - displayName: Install scikit-learn using source dist + displayName: Runs tests - task: PublishTestResults@2 inputs: diff --git a/azure/posix.yml b/azure/posix.yml index 97e6b2ba..8b921b07 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -9,7 +9,6 @@ jobs: vmImage: ${{ parameters.vmImage }} variables: REPO_DIR: "scikit-learn" - BUILD_COMMIT: "0.22.2.post1" PLAT: "x86_64" NP_BUILD_DEP: "numpy==1.11.0" CYTHON_BUILD_DEP: "cython==0.29.14" diff --git a/azure/windows.yml b/azure/windows.yml index f52639f6..8fc33ac5 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -8,7 +8,6 @@ jobs: pool: vmImage: ${{ parameters.vmImage }} variables: - BUILD_COMMIT: "0.22.2.post1" SKLEARN_SKIP_NETWORK_TESTS: "1" NP_BUILD_DEP: "1.11.0" CYTHON_BUILD_DEP: "0.29.14" From 352845721e4f89f4844c181964e3d747a84a9674 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 14:53:25 -0500 Subject: [PATCH 08/21] BUG Fixes anconda upload path --- azure/posix-sdist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index edf09871..b097eae1 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -122,8 +122,8 @@ jobs: 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 + ls scikit-learn/dist/*.tar.gz + anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/*.tar.gz 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'], '') From 680733ff1f10044dceed67f6473e546ed4b3630d Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 15:05:24 -0500 Subject: [PATCH 09/21] BLD Revert changes --- azure-pipelines.yml | 152 +++++++++++++++++++++--------------------- azure/posix-sdist.yml | 1 - 2 files changed, 76 insertions(+), 77 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ded40aa6..cc21f049 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,79 +12,79 @@ variables: jobs: - template: azure/posix-sdist.yml - # - template: azure/windows.yml - # parameters: - # name: windows - # vmImage: vs2017-win2016 - # matrix: - # py_3.6_32: - # PYTHON_VERSION: "3.6.x" - # PYTHON_ARCH: "x86" - # NP_BUILD_DEP: "1.12.1" - # py_3.6_64: - # PYTHON_VERSION: "3.6.x" - # NP_BUILD_DEP: "1.12.1" - # py_3.7_32: - # PYTHON_VERSION: "3.7.x" - # PYTHON_ARCH: "x86" - # NP_BUILD_DEP: "1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.7_64: - # PYTHON_VERSION: "3.7.x" - # NP_BUILD_DEP: "1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.8_32: - # PYTHON_VERSION: "3.8.x" - # PYTHON_ARCH: "x86" - # NP_BUILD_DEP: "1.17.3" - # SCIPY_BUILD_DEP: "1.4.1" - # NIGHTLY_BUILD: "true" - # py_3.8_64: - # PYTHON_VERSION: "3.8.x" - # NP_BUILD_DEP: "1.17.3" - # SCIPY_BUILD_DEP: "1.4.1" - # NIGHTLY_BUILD: "true" - # - 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" - # NP_BUILD_DEP: "numpy==1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.7_64: - # MB_PYTHON_VERSION: "3.7" - # NP_BUILD_DEP: "numpy==1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.8_32: - # MB_PYTHON_VERSION: "3.8" - # PLAT: "i686" - # NP_BUILD_DEP: "numpy==1.17.3" - # NIGHTLY_BUILD: "true" - # py_3.8_64: - # MB_PYTHON_VERSION: "3.8" - # NP_BUILD_DEP: "numpy==1.17.3" - # NIGHTLY_BUILD: "true" - # - template: azure/posix.yml - # parameters: - # name: macOS - # vmImage: macOS-10.14 - # matrix: - # py_3.6_64: - # MB_PYTHON_VERSION: "3.6" - # NP_BUILD_DEP: "numpy==1.13.3" - # py_3.7_64: - # MB_PYTHON_VERSION: "3.7" - # NP_BUILD_DEP: "numpy==1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.8_64: - # MB_PYTHON_VERSION: "3.8" - # NP_BUILD_DEP: "numpy==1.17.3" - # NIGHTLY_BUILD: "true" + - template: azure/windows.yml + parameters: + name: windows + vmImage: vs2017-win2016 + matrix: + py_3.6_32: + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "x86" + NP_BUILD_DEP: "1.12.1" + py_3.6_64: + PYTHON_VERSION: "3.6.x" + NP_BUILD_DEP: "1.12.1" + py_3.7_32: + PYTHON_VERSION: "3.7.x" + PYTHON_ARCH: "x86" + NP_BUILD_DEP: "1.14.5" + NIGHTLY_BUILD: "true" + py_3.7_64: + PYTHON_VERSION: "3.7.x" + NP_BUILD_DEP: "1.14.5" + NIGHTLY_BUILD: "true" + py_3.8_32: + PYTHON_VERSION: "3.8.x" + PYTHON_ARCH: "x86" + NP_BUILD_DEP: "1.17.3" + SCIPY_BUILD_DEP: "1.4.1" + NIGHTLY_BUILD: "true" + py_3.8_64: + PYTHON_VERSION: "3.8.x" + NP_BUILD_DEP: "1.17.3" + SCIPY_BUILD_DEP: "1.4.1" + NIGHTLY_BUILD: "true" + - 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" + NP_BUILD_DEP: "numpy==1.14.5" + NIGHTLY_BUILD: "true" + py_3.7_64: + MB_PYTHON_VERSION: "3.7" + NP_BUILD_DEP: "numpy==1.14.5" + NIGHTLY_BUILD: "true" + py_3.8_32: + MB_PYTHON_VERSION: "3.8" + PLAT: "i686" + NP_BUILD_DEP: "numpy==1.17.3" + NIGHTLY_BUILD: "true" + py_3.8_64: + MB_PYTHON_VERSION: "3.8" + NP_BUILD_DEP: "numpy==1.17.3" + NIGHTLY_BUILD: "true" + - template: azure/posix.yml + parameters: + name: macOS + vmImage: macOS-10.14 + matrix: + py_3.6_64: + MB_PYTHON_VERSION: "3.6" + NP_BUILD_DEP: "numpy==1.13.3" + py_3.7_64: + MB_PYTHON_VERSION: "3.7" + NP_BUILD_DEP: "numpy==1.14.5" + NIGHTLY_BUILD: "true" + py_3.8_64: + MB_PYTHON_VERSION: "3.8" + NP_BUILD_DEP: "numpy==1.17.3" + NIGHTLY_BUILD: "true" diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index b097eae1..7a917260 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -3,7 +3,6 @@ jobs: pool: vmImage: ubuntu-16.04 variables: - BUILD_COMMIT: "0.22.2.post1" NIGHTLY_BUILD_COMMIT: "master" NIGHTLY_BUILD: "true" JUNITXML: "test-data.xml" From 1ce00aa5dc92bc907f78346985819e008a4acfae Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 15:14:23 -0500 Subject: [PATCH 10/21] REV Less diffs --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cc21f049..ae276c34 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,6 +44,7 @@ jobs: NP_BUILD_DEP: "1.17.3" SCIPY_BUILD_DEP: "1.4.1" NIGHTLY_BUILD: "true" + - template: azure/posix.yml parameters: name: linux @@ -72,6 +73,7 @@ jobs: MB_PYTHON_VERSION: "3.8" NP_BUILD_DEP: "numpy==1.17.3" NIGHTLY_BUILD: "true" + - template: azure/posix.yml parameters: name: macOS From f67b11ce7c4c616acf2e6a843c03a4242dc22c3f Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 15:19:24 -0500 Subject: [PATCH 11/21] ENH Uses regex --- azure/posix-sdist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 7a917260..b1df01c7 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -59,8 +59,8 @@ jobs: python --version python -m pip install -U pip - # For now only master and >=0.23 contains project.toml - if [ "$BUILD_COMMIT" != "$NIGHTLY_BUILD_COMMIT" ]; then + # pyproject.toml will be released with >=0.23 + if [[ "$BUILD_COMMIT" =~ "^0.22" ]]; then python -m pip install Cython fi From 7fd811bbc48f97816d88d265ea207d7297db1250 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 19:00:59 -0500 Subject: [PATCH 12/21] BLD Do not upload with pull request --- azure/posix-sdist.yml | 2 +- azure/posix.yml | 2 +- azure/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index b1df01c7..cd5e00df 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -125,4 +125,4 @@ jobs: anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/*.tar.gz 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'], '') + condition: and(ne(variables['TOKEN'], ''), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/azure/posix.yml b/azure/posix.yml index 8b921b07..19b9aeea 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -137,4 +137,4 @@ jobs: 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'], '') + condition: and(ne(variables['TOKEN'], ''), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/azure/windows.yml b/azure/windows.yml index 8fc33ac5..e054f3cf 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -144,4 +144,4 @@ jobs: anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/scikit_learn-*.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'], '') + condition: and(ne(variables['TOKEN'], ''), ne(variables['Build.Reason'], 'PullRequest')) From 19152ca4c5a1ecd77435a6cd090063a3e6419550 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 19:06:34 -0500 Subject: [PATCH 13/21] BLD Fixes commit regex --- azure/posix-sdist.yml | 4 ++-- azure/posix.yml | 2 +- azure/windows.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index cd5e00df..c5c59daa 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -60,7 +60,7 @@ jobs: python -m pip install -U pip # pyproject.toml will be released with >=0.23 - if [[ "$BUILD_COMMIT" =~ "^0.22" ]]; then + if [[ "$BUILD_COMMIT" =~ ^0.22* ]]; then python -m pip install Cython fi @@ -125,4 +125,4 @@ jobs: anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/*.tar.gz echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) - condition: and(ne(variables['TOKEN'], ''), ne(variables['Build.Reason'], 'PullRequest')) + condition: ne(variables['TOKEN'], '') diff --git a/azure/posix.yml b/azure/posix.yml index 19b9aeea..8b921b07 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -137,4 +137,4 @@ jobs: 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: and(ne(variables['TOKEN'], ''), ne(variables['Build.Reason'], 'PullRequest')) + condition: ne(variables['TOKEN'], '') diff --git a/azure/windows.yml b/azure/windows.yml index e054f3cf..8fc33ac5 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -144,4 +144,4 @@ jobs: anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/scikit_learn-*.whl echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple" displayName: Upload to anaconda.org (only if secret token is retrieved) - condition: and(ne(variables['TOKEN'], ''), ne(variables['Build.Reason'], 'PullRequest')) + condition: ne(variables['TOKEN'], '') From df5d7980b393097bd17c660ca43660dd7f3f1079 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 19:58:00 -0500 Subject: [PATCH 14/21] TST Checks token --- azure-pipelines.yml | 152 +++++++++++++++++++++--------------------- azure/posix-sdist.yml | 1 + 2 files changed, 77 insertions(+), 76 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ae276c34..46408981 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,81 +12,81 @@ variables: jobs: - template: azure/posix-sdist.yml - - template: azure/windows.yml - parameters: - name: windows - vmImage: vs2017-win2016 - matrix: - py_3.6_32: - PYTHON_VERSION: "3.6.x" - PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.12.1" - py_3.6_64: - PYTHON_VERSION: "3.6.x" - NP_BUILD_DEP: "1.12.1" - py_3.7_32: - PYTHON_VERSION: "3.7.x" - PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.14.5" - NIGHTLY_BUILD: "true" - py_3.7_64: - PYTHON_VERSION: "3.7.x" - NP_BUILD_DEP: "1.14.5" - NIGHTLY_BUILD: "true" - py_3.8_32: - PYTHON_VERSION: "3.8.x" - PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.17.3" - SCIPY_BUILD_DEP: "1.4.1" - NIGHTLY_BUILD: "true" - py_3.8_64: - PYTHON_VERSION: "3.8.x" - NP_BUILD_DEP: "1.17.3" - SCIPY_BUILD_DEP: "1.4.1" - NIGHTLY_BUILD: "true" + # - template: azure/windows.yml + # parameters: + # name: windows + # vmImage: vs2017-win2016 + # matrix: + # py_3.6_32: + # PYTHON_VERSION: "3.6.x" + # PYTHON_ARCH: "x86" + # NP_BUILD_DEP: "1.12.1" + # py_3.6_64: + # PYTHON_VERSION: "3.6.x" + # NP_BUILD_DEP: "1.12.1" + # py_3.7_32: + # PYTHON_VERSION: "3.7.x" + # PYTHON_ARCH: "x86" + # NP_BUILD_DEP: "1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.7_64: + # PYTHON_VERSION: "3.7.x" + # NP_BUILD_DEP: "1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.8_32: + # PYTHON_VERSION: "3.8.x" + # PYTHON_ARCH: "x86" + # NP_BUILD_DEP: "1.17.3" + # SCIPY_BUILD_DEP: "1.4.1" + # NIGHTLY_BUILD: "true" + # py_3.8_64: + # PYTHON_VERSION: "3.8.x" + # NP_BUILD_DEP: "1.17.3" + # SCIPY_BUILD_DEP: "1.4.1" + # NIGHTLY_BUILD: "true" - - 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" - NP_BUILD_DEP: "numpy==1.14.5" - NIGHTLY_BUILD: "true" - py_3.7_64: - MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" - NIGHTLY_BUILD: "true" - py_3.8_32: - MB_PYTHON_VERSION: "3.8" - PLAT: "i686" - NP_BUILD_DEP: "numpy==1.17.3" - NIGHTLY_BUILD: "true" - py_3.8_64: - MB_PYTHON_VERSION: "3.8" - NP_BUILD_DEP: "numpy==1.17.3" - NIGHTLY_BUILD: "true" + # - 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" + # NP_BUILD_DEP: "numpy==1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.7_64: + # MB_PYTHON_VERSION: "3.7" + # NP_BUILD_DEP: "numpy==1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.8_32: + # MB_PYTHON_VERSION: "3.8" + # PLAT: "i686" + # NP_BUILD_DEP: "numpy==1.17.3" + # NIGHTLY_BUILD: "true" + # py_3.8_64: + # MB_PYTHON_VERSION: "3.8" + # NP_BUILD_DEP: "numpy==1.17.3" + # NIGHTLY_BUILD: "true" - - template: azure/posix.yml - parameters: - name: macOS - vmImage: macOS-10.14 - matrix: - py_3.6_64: - MB_PYTHON_VERSION: "3.6" - NP_BUILD_DEP: "numpy==1.13.3" - py_3.7_64: - MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" - NIGHTLY_BUILD: "true" - py_3.8_64: - MB_PYTHON_VERSION: "3.8" - NP_BUILD_DEP: "numpy==1.17.3" - NIGHTLY_BUILD: "true" + # - template: azure/posix.yml + # parameters: + # name: macOS + # vmImage: macOS-10.14 + # matrix: + # py_3.6_64: + # MB_PYTHON_VERSION: "3.6" + # NP_BUILD_DEP: "numpy==1.13.3" + # py_3.7_64: + # MB_PYTHON_VERSION: "3.7" + # NP_BUILD_DEP: "numpy==1.14.5" + # NIGHTLY_BUILD: "true" + # py_3.8_64: + # MB_PYTHON_VERSION: "3.8" + # NP_BUILD_DEP: "numpy==1.17.3" + # NIGHTLY_BUILD: "true" diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index c5c59daa..54a2b8e1 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -105,6 +105,7 @@ jobs: ANACONDA_ORG="scikit-learn-wheels-staging" TOKEN="$SCIKIT_LEARN_STAGING_UPLOAD_TOKEN" fi + echo "token: $TOKEN" if [ "$TOKEN" == "" ]; then echo "##[warning] Could not find anaconda.org upload token in secret variables" fi From d158698e1f958420cbd55082c2e301491a65151d Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 20:05:34 -0500 Subject: [PATCH 15/21] TST Checks token --- azure/posix-sdist.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 54a2b8e1..f8d66577 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -76,15 +76,15 @@ jobs: cd $TEST_DIR python -m pip install pytest - pytest -l --junitxml=$JUNITXML --pyargs sklearn + # pytest -l --junitxml=$JUNITXML --pyargs sklearn displayName: Runs tests - - task: PublishTestResults@2 - inputs: - testResultsFiles: "$(TEST_DIR)/$(JUNITXML)" - testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux_Source_Dist') }} - displayName: "Publish Test Results" - condition: eq(variables['SKIP_BUILD'], 'false') + # - task: PublishTestResults@2 + # inputs: + # testResultsFiles: "$(TEST_DIR)/$(JUNITXML)" + # testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux_Source_Dist') }} + # displayName: "Publish Test Results" + # condition: eq(variables['SKIP_BUILD'], 'false') - bash: | echo "##vso[task.prependpath]$CONDA/bin" From 591b0c930bb49e40b7131250409a648fcec1a0b6 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sat, 7 Mar 2020 20:14:54 -0500 Subject: [PATCH 16/21] REV Less diffs --- azure-pipelines.yml | 152 +++++++++++++++++++++--------------------- azure/posix-sdist.yml | 13 ++-- 2 files changed, 82 insertions(+), 83 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 46408981..ae276c34 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,81 +12,81 @@ variables: jobs: - template: azure/posix-sdist.yml - # - template: azure/windows.yml - # parameters: - # name: windows - # vmImage: vs2017-win2016 - # matrix: - # py_3.6_32: - # PYTHON_VERSION: "3.6.x" - # PYTHON_ARCH: "x86" - # NP_BUILD_DEP: "1.12.1" - # py_3.6_64: - # PYTHON_VERSION: "3.6.x" - # NP_BUILD_DEP: "1.12.1" - # py_3.7_32: - # PYTHON_VERSION: "3.7.x" - # PYTHON_ARCH: "x86" - # NP_BUILD_DEP: "1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.7_64: - # PYTHON_VERSION: "3.7.x" - # NP_BUILD_DEP: "1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.8_32: - # PYTHON_VERSION: "3.8.x" - # PYTHON_ARCH: "x86" - # NP_BUILD_DEP: "1.17.3" - # SCIPY_BUILD_DEP: "1.4.1" - # NIGHTLY_BUILD: "true" - # py_3.8_64: - # PYTHON_VERSION: "3.8.x" - # NP_BUILD_DEP: "1.17.3" - # SCIPY_BUILD_DEP: "1.4.1" - # NIGHTLY_BUILD: "true" + - template: azure/windows.yml + parameters: + name: windows + vmImage: vs2017-win2016 + matrix: + py_3.6_32: + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "x86" + NP_BUILD_DEP: "1.12.1" + py_3.6_64: + PYTHON_VERSION: "3.6.x" + NP_BUILD_DEP: "1.12.1" + py_3.7_32: + PYTHON_VERSION: "3.7.x" + PYTHON_ARCH: "x86" + NP_BUILD_DEP: "1.14.5" + NIGHTLY_BUILD: "true" + py_3.7_64: + PYTHON_VERSION: "3.7.x" + NP_BUILD_DEP: "1.14.5" + NIGHTLY_BUILD: "true" + py_3.8_32: + PYTHON_VERSION: "3.8.x" + PYTHON_ARCH: "x86" + NP_BUILD_DEP: "1.17.3" + SCIPY_BUILD_DEP: "1.4.1" + NIGHTLY_BUILD: "true" + py_3.8_64: + PYTHON_VERSION: "3.8.x" + NP_BUILD_DEP: "1.17.3" + SCIPY_BUILD_DEP: "1.4.1" + NIGHTLY_BUILD: "true" - # - 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" - # NP_BUILD_DEP: "numpy==1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.7_64: - # MB_PYTHON_VERSION: "3.7" - # NP_BUILD_DEP: "numpy==1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.8_32: - # MB_PYTHON_VERSION: "3.8" - # PLAT: "i686" - # NP_BUILD_DEP: "numpy==1.17.3" - # NIGHTLY_BUILD: "true" - # py_3.8_64: - # MB_PYTHON_VERSION: "3.8" - # NP_BUILD_DEP: "numpy==1.17.3" - # NIGHTLY_BUILD: "true" + - 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" + NP_BUILD_DEP: "numpy==1.14.5" + NIGHTLY_BUILD: "true" + py_3.7_64: + MB_PYTHON_VERSION: "3.7" + NP_BUILD_DEP: "numpy==1.14.5" + NIGHTLY_BUILD: "true" + py_3.8_32: + MB_PYTHON_VERSION: "3.8" + PLAT: "i686" + NP_BUILD_DEP: "numpy==1.17.3" + NIGHTLY_BUILD: "true" + py_3.8_64: + MB_PYTHON_VERSION: "3.8" + NP_BUILD_DEP: "numpy==1.17.3" + NIGHTLY_BUILD: "true" - # - template: azure/posix.yml - # parameters: - # name: macOS - # vmImage: macOS-10.14 - # matrix: - # py_3.6_64: - # MB_PYTHON_VERSION: "3.6" - # NP_BUILD_DEP: "numpy==1.13.3" - # py_3.7_64: - # MB_PYTHON_VERSION: "3.7" - # NP_BUILD_DEP: "numpy==1.14.5" - # NIGHTLY_BUILD: "true" - # py_3.8_64: - # MB_PYTHON_VERSION: "3.8" - # NP_BUILD_DEP: "numpy==1.17.3" - # NIGHTLY_BUILD: "true" + - template: azure/posix.yml + parameters: + name: macOS + vmImage: macOS-10.14 + matrix: + py_3.6_64: + MB_PYTHON_VERSION: "3.6" + NP_BUILD_DEP: "numpy==1.13.3" + py_3.7_64: + MB_PYTHON_VERSION: "3.7" + NP_BUILD_DEP: "numpy==1.14.5" + NIGHTLY_BUILD: "true" + py_3.8_64: + MB_PYTHON_VERSION: "3.8" + NP_BUILD_DEP: "numpy==1.17.3" + NIGHTLY_BUILD: "true" diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index f8d66577..3a9e0ab8 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -79,12 +79,12 @@ jobs: # pytest -l --junitxml=$JUNITXML --pyargs sklearn displayName: Runs tests - # - task: PublishTestResults@2 - # inputs: - # testResultsFiles: "$(TEST_DIR)/$(JUNITXML)" - # testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux_Source_Dist') }} - # displayName: "Publish Test Results" - # condition: eq(variables['SKIP_BUILD'], 'false') + - task: PublishTestResults@2 + inputs: + testResultsFiles: "$(TEST_DIR)/$(JUNITXML)" + testRunTitle: ${{ format('{0}-$(Agent.JobName)', 'Linux_Source_Dist') }} + displayName: "Publish Test Results" + condition: eq(variables['SKIP_BUILD'], 'false') - bash: | echo "##vso[task.prependpath]$CONDA/bin" @@ -105,7 +105,6 @@ jobs: ANACONDA_ORG="scikit-learn-wheels-staging" TOKEN="$SCIKIT_LEARN_STAGING_UPLOAD_TOKEN" fi - echo "token: $TOKEN" if [ "$TOKEN" == "" ]; then echo "##[warning] Could not find anaconda.org upload token in secret variables" fi From 1b59296a288d53966374ec7fc5707608bdb97b40 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Sun, 8 Mar 2020 00:23:18 -0500 Subject: [PATCH 17/21] ENH Run tests --- azure/posix-sdist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 3a9e0ab8..c5c59daa 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -76,7 +76,7 @@ jobs: cd $TEST_DIR python -m pip install pytest - # pytest -l --junitxml=$JUNITXML --pyargs sklearn + pytest -l --junitxml=$JUNITXML --pyargs sklearn displayName: Runs tests - task: PublishTestResults@2 From c6e7e71e7ee509671a6cab5b3df18937edc62375 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Mon, 9 Mar 2020 11:05:18 -0400 Subject: [PATCH 18/21] DOC Adds comment about setup.py --- azure/posix-sdist.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index c5c59daa..08609be9 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -36,6 +36,8 @@ jobs: python -m venv build_env source build_env/bin/activate + + # Need because setup.py enforces these to be installed python -m pip install numpy scipy Cython cd scikit-learn From 8be66cd073c71b6f8344b90200e13c829c59b5e2 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Mon, 27 Apr 2020 09:18:01 -0400 Subject: [PATCH 19/21] CLN Address comments --- azure/posix-sdist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 08609be9..0590f3cd 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -127,4 +127,4 @@ jobs: anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/*.tar.gz 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'], '') + condition: variables['TOKEN'] From c5e53174221d396a318c341ff9709531fd34a272 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Mon, 27 Apr 2020 12:33:08 -0400 Subject: [PATCH 20/21] ENH More like posix.yml --- azure/posix-sdist.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure/posix-sdist.yml b/azure/posix-sdist.yml index 0590f3cd..9300fddd 100644 --- a/azure/posix-sdist.yml +++ b/azure/posix-sdist.yml @@ -88,16 +88,6 @@ jobs: displayName: "Publish Test Results" 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 @@ -113,12 +103,22 @@ 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')) + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'), variables['SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN'], variables['SCIKIT_LEARN_STAGING_UPLOAD_TOKEN']) env: # Secret variables need to mapped to env variables explicitly: SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN: $(SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN) SCIKIT_LEARN_STAGING_UPLOAD_TOKEN: $(SCIKIT_LEARN_STAGING_UPLOAD_TOKEN) + - 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'), variables['TOKEN']) + + - bash: conda install -q -y anaconda-client + displayName: Install anaconda-client + condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'), variables['TOKEN']) + - bash: | set -e # The --force option forces a replacement if the remote file already From 8a93a6daee4c3b88eccc313e157b35b31bca56e5 Mon Sep 17 00:00:00 2001 From: Thomas J Fan Date: Mon, 11 May 2020 16:59:55 -0400 Subject: [PATCH 21/21] BLD Fixes version --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2ff338ce..fec0c5e5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,7 +8,7 @@ schedules: always: true variables: - BUILD_COMMIT: "0.22.2.post1" + BUILD_COMMIT: "0.23.0rc1" MANYLINUX_URL: "https://pypi.python.org/simple" jobs: