@@ -25,89 +25,79 @@ jobs:
25
25
${{ insert }} : ${{ parameters.matrix }}
26
26
27
27
steps :
28
- - checkout : self
29
- submodules : true
30
-
31
- - task : UsePythonVersion@0
32
- inputs :
33
- versionSpec : $(MB_PYTHON_VERSION)
34
- displayName : Set python version
35
-
36
- - bash : |
37
- set -e
38
-
39
- SKIP_BUILD="false"
40
- if [ "$BUILD_REASON" == "Schedule" ]; then
41
- BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
42
- if [ "$NIGHTLY_BUILD" != "true" ]; then
43
- SKIP_BUILD="true"
44
- fi
45
- fi
46
- echo "Building scikit-learn@$BUILD_COMMIT"
47
- echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
48
- echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
49
-
50
- # Platform variables used in multibuild scripts
51
- if [ `uname` == 'Darwin' ]; then
52
- echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]osx"
53
- echo "##vso[task.setvariable variable=MACOSX_DEPLOYMENT_TARGET]10.9"
54
- else
55
- echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]linux"
56
- fi
57
-
58
- # Store original Python path to be able to create test_venv pointing
59
- # to same Python version.
60
- PYTHON_EXE=`which python`
61
- echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE"
62
- displayName: Define build env variables
63
-
64
- - bash : |
65
- set -e
66
- pip install virtualenv
67
- BUILD_DEPENDS="$NP_BUILD_DEP $CYTHON_BUILD_DEP $SCIPY_BUILD_DEP"
68
-
69
- source multibuild/common_utils.sh
70
- source multibuild/travis_steps.sh
71
- source extra_functions.sh
72
-
73
- # Setup build dependencies
74
- before_install
75
-
76
- # OpenMP is not present on macOS by default
77
- setup_compiler
78
- clean_code $REPO_DIR $BUILD_COMMIT
79
- build_wheel $REPO_DIR $PLAT
80
- teardown_compiler
81
- displayName: Build wheel
82
- condition: eq(variables['SKIP_BUILD'], 'false')
83
-
84
- - bash : |
85
- set -xe
86
- source multibuild/common_utils.sh
87
- source multibuild/travis_steps.sh
88
- source extra_functions.sh
89
- setup_test_venv
90
- install_run $PLAT
91
- teardown_test_venv
92
- displayName: Install wheel and test
93
- condition: eq(variables['SKIP_BUILD'], 'false')
94
-
95
- - task : PublishTestResults@2
96
- inputs :
97
- testResultsFiles : ' $(TEST_DIR)/$(JUNITXML)'
98
- testRunTitle : ${{ format('{0}-$(Agent.JobName)', parameters.name) }}
99
- displayName : ' Publish Test Results'
100
- condition : eq(variables['SKIP_BUILD'], 'false')
101
-
102
- - bash : |
103
- echo "##vso[task.prependpath]$CONDA/bin"
104
- sudo chown -R $USER $CONDA
105
- displayName: Add conda to PATH
106
- condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
107
-
108
- - bash : conda install -q -y anaconda-client
109
- displayName : Install anaconda-client
110
- condition : and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
28
+ # - checkout: self
29
+ # submodules: true
30
+
31
+ # - task: UsePythonVersion@0
32
+ # inputs:
33
+ # versionSpec: $(MB_PYTHON_VERSION)
34
+ # displayName: Set python version
35
+
36
+ # - bash: |
37
+ # set -e
38
+
39
+ # SKIP_BUILD="false"
40
+ # if [ "$BUILD_REASON" == "Schedule" ]; then
41
+ # BUILD_COMMIT=$NIGHTLY_BUILD_COMMIT
42
+ # if [ "$NIGHTLY_BUILD" != "true" ]; then
43
+ # SKIP_BUILD="true"
44
+ # fi
45
+ # fi
46
+ # echo "Building scikit-learn@$BUILD_COMMIT"
47
+ # echo "##vso[task.setvariable variable=BUILD_COMMIT]$BUILD_COMMIT"
48
+ # echo "##vso[task.setvariable variable=SKIP_BUILD]$SKIP_BUILD"
49
+
50
+ # # Platform variables used in multibuild scripts
51
+ # if [ `uname` == 'Darwin' ]; then
52
+ # echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]osx"
53
+ # echo "##vso[task.setvariable variable=MACOSX_DEPLOYMENT_TARGET]10.9"
54
+ # else
55
+ # echo "##vso[task.setvariable variable=TRAVIS_OS_NAME]linux"
56
+ # fi
57
+
58
+ # # Store original Python path to be able to create test_venv pointing
59
+ # # to same Python version.
60
+ # PYTHON_EXE=`which python`
61
+ # echo "##vso[task.setvariable variable=PYTHON_EXE]$PYTHON_EXE"
62
+ # displayName: Define build env variables
63
+
64
+ # - bash: |
65
+ # set -e
66
+ # pip install virtualenv
67
+ # BUILD_DEPENDS="$NP_BUILD_DEP $CYTHON_BUILD_DEP $SCIPY_BUILD_DEP"
68
+
69
+ # source multibuild/common_utils.sh
70
+ # source multibuild/travis_steps.sh
71
+ # source extra_functions.sh
72
+
73
+ # # Setup build dependencies
74
+ # before_install
75
+
76
+ # # OpenMP is not present on macOS by default
77
+ # setup_compiler
78
+ # clean_code $REPO_DIR $BUILD_COMMIT
79
+ # build_wheel $REPO_DIR $PLAT
80
+ # teardown_compiler
81
+ # displayName: Build wheel
82
+ # condition: eq(variables['SKIP_BUILD'], 'false')
83
+
84
+ # - bash: |
85
+ # set -xe
86
+ # source multibuild/common_utils.sh
87
+ # source multibuild/travis_steps.sh
88
+ # source extra_functions.sh
89
+ # setup_test_venv
90
+ # install_run $PLAT
91
+ # teardown_test_venv
92
+ # displayName: Install wheel and test
93
+ # condition: eq(variables['SKIP_BUILD'], 'false')
94
+
95
+ # - task: PublishTestResults@2
96
+ # inputs:
97
+ # testResultsFiles: "$(TEST_DIR)/$(JUNITXML)"
98
+ # testRunTitle: ${{ format('{0}-$(Agent.JobName)', parameters.name) }}
99
+ # displayName: "Publish Test Results"
100
+ # condition: eq(variables['SKIP_BUILD'], 'false')
111
101
112
102
- bash : |
113
103
set -e
@@ -118,24 +108,29 @@ jobs:
118
108
ANACONDA_ORG="scikit-learn-wheels-staging"
119
109
TOKEN="$SCIKIT_LEARN_STAGING_UPLOAD_TOKEN"
120
110
fi
121
- if [ "$TOKEN" == "" ]; then
122
- echo "##[warning] Could not find anaconda.org upload token in secret variables"
123
- fi
124
111
echo "##vso[task.setvariable variable=TOKEN]$TOKEN"
125
112
echo "##vso[task.setvariable variable=ANACONDA_ORG]$ANACONDA_ORG"
126
113
displayName: Retrieve secret upload token
127
- condition: and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'))
114
+ 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'] )
128
115
env:
129
116
# Secret variables need to mapped to env variables explicitly:
130
117
SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN: $(SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN)
131
118
SCIKIT_LEARN_STAGING_UPLOAD_TOKEN: $(SCIKIT_LEARN_STAGING_UPLOAD_TOKEN)
132
119
120
+ - bash : echo "##vso[task.prependpath]$CONDA/Scripts"
121
+ displayName : Add conda to PATH
122
+ condition : and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'), variables['TOKEN'])
123
+
124
+ - bash : conda install -q -y anaconda-client
125
+ displayName : Install anaconda-client
126
+ condition : and(succeeded(), eq(variables['SKIP_BUILD'], 'false'), ne(variables['Build.Reason'], 'PullRequest'), variables['TOKEN'])
127
+
133
128
- bash : |
134
129
set -e
135
130
# The --force option forces a replacement if the remote file already
136
131
# exists.
137
- ls wheelhouse/ *.whl
138
- anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/ *.whl
132
+ ls scikit-learn/dist/scikit_learn- *.whl
133
+ anaconda -t $TOKEN upload --force -u $ANACONDA_ORG scikit-learn/dist/scikit_learn- *.whl
139
134
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
140
135
displayName: Upload to anaconda.org (only if secret token is retrieved)
141
- condition: ne( variables['TOKEN'], '')
136
+ condition: variables['TOKEN']
0 commit comments