44 matrix :
55 Linux :
66 image.name : ' ubuntu-16.04'
7- Windows :
8- image.name : ' windows-2019'
97 Mac :
108 image.name : ' macOS-10.13'
9+ Windows :
10+ image.name : ' windows-2019'
1111 maxParallel : 3
1212 pool :
1313 vmImage : ' $(image.name)'
1414 steps :
1515 - script : |
16+ sudo apt-get -y update
1617 sudo apt-get -y install g++-multilib
17- displayName: 'Install prereq for linux.'
18- condition: in(variables['image.name'], 'ubuntu-16.04')
18+ /bin/sh ./build.sh -32bit
19+ condition: startsWith(variables['image.name'], 'ubuntu')
20+ displayName: 'Building native code (Linux)'
1921 - script : |
20- chmod +x build.sh
21- ./build.sh -32bit
22- condition: in(variables['image.name'], 'ubuntu-16.04', 'macOS-10.13')
23- displayName: 'Building/moving native code (linux/mac).'
22+ /bin/sh ./build.sh -32bit
23+ condition: startsWith(variables['image.name'], 'macOS')
24+ displayName: 'Building native code (Mac)'
2425 - script : |
25- set PATH=C:\Windows\system32\ ;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
26- build.bat -32bit
27- condition: in (variables['image.name'], 'windows-2019 ')
28- displayName: 'Building/moving native code. (win )'
26+ set PATH=%PATH% ;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
27+ .\ build.bat -32bit
28+ condition: startsWith (variables['image.name'], 'windows')
29+ displayName: 'Building native code (Windows )'
2930 - task : CopyFiles@2
3031 condition : succeeded()
3132 inputs :
3435 targetFolder : ' $(Build.ArtifactStagingDirectory)'
3536 displayName : ' Move binary to staging'
3637 - task : PublishBuildArtifacts@1
38+ condition : succeeded()
3739 inputs :
3840 pathtoPublish : $(Build.ArtifactStagingDirectory)
3941 artifactName : native-$(image.name)
@@ -45,10 +47,10 @@ jobs:
4547 matrix :
4648 Linux :
4749 image.name : ' ubuntu-16.04'
48- Windows :
49- image.name : ' windows-2019'
5050 Mac :
5151 image.name : ' macOS-10.13'
52+ Windows :
53+ image.name : ' windows-2019'
5254 maxParallel : 3
5355 pool :
5456 vmImage : ' $(image.name)'
@@ -59,25 +61,28 @@ jobs:
5961 downloadType : ' specific'
6062 displayName : ' Download build artifacts'
6163 - task : CopyFiles@2
64+ condition : succeeded()
6265 inputs :
6366 sourceFolder : ' $(System.ArtifactsDirectory)'
6467 contents : ' **/lib_ebmcore_*'
6568 targetFolder : ' staging'
6669 flattenFolders : true
6770 displayName : ' Move binary to staging directory'
6871 - script : |
72+ sudo apt-get -y update
6973 sudo apt-get -y install g++-multilib
70- displayName: 'Install prereq for linux.'
71- condition: in(variables['image.name'], 'ubuntu-16.04')
74+ /bin/sh ./tests/core/test_core_api.sh -nobuildcore
75+ condition: startsWith(variables['image.name'], 'ubuntu')
76+ displayName: 'Testing native code (Linux)'
7277 - script : |
7378 /bin/sh ./tests/core/test_core_api.sh -nobuildcore
74- condition: in (variables['image.name'], 'ubuntu-16.04', ' macOS-10.13 ')
75- displayName: 'Testing native code (linux/mac). '
79+ condition: startsWith (variables['image.name'], 'macOS')
80+ displayName: 'Testing native code (Mac) '
7681 - script : |
77- set PATH=C:\Windows\system32\ ;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
82+ set PATH=%PATH% ;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
7883 .\tests\core\test_core_api.bat -nobuildcore
79- condition: in (variables['image.name'], 'windows-2019 ')
80- displayName: 'Testing native code. (win )'
84+ condition: startsWith (variables['image.name'], 'windows')
85+ displayName: 'Testing native code (Windows )'
8186
8287 - job : ' Build_JS_Inline'
8388 pool :
@@ -98,10 +103,11 @@ jobs:
98103 targetFolder : ' $(Build.ArtifactStagingDirectory)'
99104 displayName : ' Move assets to staging'
100105 - task : PublishBuildArtifacts@1
106+ condition : succeeded()
101107 inputs :
102108 pathtoPublish : $(Build.ArtifactStagingDirectory)
103109 artifactName : interpret-inline-bundle
104- displayName : ' Publish interpret inline library'
110+ displayName : ' Publish interpret- inline.js library'
105111
106112- job : ' Build_Package'
107113 dependsOn : ['Build_Native', 'Build_JS_Inline']
@@ -114,25 +120,29 @@ jobs:
114120 downloadType : ' specific'
115121 displayName : ' Download build artifacts'
116122 - task : UsePythonVersion@0
123+ condition : succeeded()
117124 inputs :
118125 versionSpec : ' 3.6'
119126 architecture : ' x64'
120127 - script : python -m pip install --upgrade pip setuptools wheel
128+ condition : succeeded()
121129 displayName : ' Install tools'
122130 - task : CopyFiles@2
131+ condition : succeeded()
123132 inputs :
124133 sourceFolder : ' $(System.ArtifactsDirectory)'
125- contents : ' **/lib_ebmcore_*'
134+ contents : ' **/lib_ebmcore_*_x64* '
126135 targetFolder : ' python/interpret-core/interpret/lib'
127136 flattenFolders : true
128137 displayName : ' Move binary to Python layer'
129138 - task : CopyFiles@2
139+ condition : succeeded()
130140 inputs :
131141 sourceFolder : ' $(System.ArtifactsDirectory)'
132142 contents : ' **/interpret-inline.js'
133143 targetFolder : ' python/interpret-core/interpret/lib'
134144 flattenFolders : true
135- displayName : ' Move Interpret inline to Python layer'
145+ displayName : ' Move interpret- inline.js to Python layer'
136146 - script : python setup.py bdist_wheel -d ../../staging
137147 condition : succeeded()
138148 workingDirectory : ' python/interpret-core'
@@ -149,6 +159,7 @@ jobs:
149159 targetFolder : ' $(Build.ArtifactStagingDirectory)/wheel'
150160 displayName : ' Move wheel for Build Artifact'
151161 - task : PublishBuildArtifacts@1
162+ condition : succeeded()
152163 inputs :
153164 pathtoPublish : ' $(Build.ArtifactStagingDirectory)/wheel'
154165 artifactName : ' wheel'
@@ -176,9 +187,9 @@ jobs:
176187 WindowsPython37 :
177188 python.version : ' 3.7'
178189 image.name : ' windows-2019'
179- # MacPython35:
180- # python.version: '3.5'
181- # image.name: 'macOS-10.13'
190+ MacPython35 :
191+ python.version : ' 3.5'
192+ image.name : ' macOS-10.13'
182193 MacPython36 :
183194 python.version : ' 3.6'
184195 image.name : ' macOS-10.13'
@@ -195,57 +206,53 @@ jobs:
195206 downloadType : ' specific'
196207 displayName : ' Download build artifacts'
197208 - task : CopyFiles@2
209+ condition : succeeded()
198210 inputs :
199211 sourceFolder : ' $(System.ArtifactsDirectory)'
200212 contents : ' **/lib_ebmcore_*'
201213 targetFolder : ' python/interpret-core/interpret/lib'
202214 flattenFolders : true
203215 displayName : ' Move binary to Python layer'
204216 - task : CopyFiles@2
217+ condition : succeeded()
205218 inputs :
206219 sourceFolder : ' $(System.ArtifactsDirectory)'
207220 contents : ' **/interpret-inline.js'
208221 targetFolder : ' python/interpret-core/interpret/lib'
209222 flattenFolders : true
210223 displayName : ' Move Interpret inline to Python layer'
211224 - task : UsePythonVersion@0
225+ condition : succeeded()
212226 inputs :
213227 versionSpec : ' $(python.version)'
214228 architecture : ' x64'
215229 - script : python -m pip install --upgrade pip setuptools wheel
230+ condition : succeeded()
216231 displayName : ' Install tools'
217- - script : |
218- python -m pip install numpy scipy
232+ - script : python -m pip install numpy scipy
233+ condition : succeeded()
219234 workingDirectory : python/interpret-core
220235 displayName : ' Install numpy/scipy first for mis-specified pip packages.'
221236 - script : |
222237 mkdir -p ~/.matplotlib
223238 echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc
224- condition: in (variables['image.name'], 'macOS-10.13 ')
239+ condition: startsWith (variables['image.name'], 'macOS')
225240 displayName: 'Matplotlib patch for mac.'
226- - script : |
227- python -m pip install -r dev-requirements.txt
228- workingDirectory: python/interpret-core
229- displayName: 'Install requirements (Windows)'
230- condition: in(variables['image.name'], 'windows-2019')
231- - script : |
232- export LIBRARY_PATH=$LIBRARY_PATH:/opt/hostedtoolcache/Python/3.6.9/x64/lib
233- export LIBRARY_PATH=$LIBRARY_PATH:/opt/hostedtoolcache/Python/3.7.4/x64/lib
234- python -m pip install -r dev-requirements.txt
241+ - script : python -m pip install -r dev-requirements.txt
242+ condition : succeeded()
235243 workingDirectory : python/interpret-core
236- displayName: 'Install requirements (Non-Windows)'
237- condition: in(variables['image.name'], 'ubuntu-16.04', 'macOS-10.13')
244+ displayName : ' Install requirements (Linux/Mac/Windows)'
238245 - script : |
239246 set PATH=%PATH%;%GeckoWebDriver%
240247 python -m pytest -vv -n auto --runslow --runselenium --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
241248 workingDirectory: python/interpret-core
242- condition: in (variables['image.name'], 'windows-2019 ')
249+ condition: startsWith (variables['image.name'], 'windows')
243250 displayName: 'Run pytest (Windows)'
244251 - script : |
245252 python -m pytest -vv -n auto --runslow --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
246253 workingDirectory: python/interpret-core
247- condition: in( variables['image.name'], 'ubuntu-16.04' , 'macOS-10.13' )
248- displayName: 'Run pytest (Non-Windows )'
254+ condition: or(startsWith( variables['image.name'], 'ubuntu'), startsWith(variables['image.name'] , 'macOS') )
255+ displayName: 'Run pytest (Linux/Mac )'
249256 - task : PublishTestResults@2
250257 condition : succeededOrFailed()
251258 inputs :
@@ -257,13 +264,11 @@ jobs:
257264 codeCoverageTool : Cobertura
258265 summaryFileLocation : ' $(System.DefaultWorkingDirectory)/**/coverage.xml'
259266 reportDirectory : ' $(System.DefaultWorkingDirectory)/**/htmlcov'
260- condition : in (variables['image.name'], 'windows-2019 ')
267+ condition : startsWith (variables['image.name'], 'windows')
261268 displayName : ' Publish test coverage results'
262269
263270- job : ' Publish_Package'
264- dependsOn :
265- - ' Test'
266- - ' Test_Native'
271+ dependsOn : ['Test_Native', 'Test']
267272 pool :
268273 vmImage : ' ubuntu-16.04'
269274 steps :
0 commit comments