Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Cherry-picks changes from #14336 to fix window ci pipeline (#14469)
Browse files Browse the repository at this point in the history
  • Loading branch information
perdasilva authored and lanking520 committed Mar 19, 2019
1 parent 87eb1ad commit 1fed192
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 29 deletions.
18 changes: 9 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ core_logic: {
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-cpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0']) {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_CPU'
powershell 'py -3 ci/build_windows.py -f WIN_CPU'
stash includes: 'windows_package.7z', name: 'windows_package_cpu'
}
}
Expand All @@ -331,10 +331,10 @@ core_logic: {
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-gpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0']) {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_GPU'
stash includes: 'windows_package.7z', name: 'windows_package_gpu'
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'py -3 ci/build_windows.py -f WIN_GPU'
stash includes: 'windows_package.7z', name: 'windows_package_gpu'
}
}
}
Expand All @@ -344,9 +344,9 @@ core_logic: {
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-gpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0','BUILD_NAME=vc14_gpu_mkldnn']) {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_GPU_MKLDNN'
powershell 'py -3 ci/build_windows.py -f WIN_GPU_MKLDNN'
stash includes: 'windows_package.7z', name: 'windows_package_gpu_mkldnn'
}
}
Expand Down Expand Up @@ -935,4 +935,4 @@ failure_handler: {
emailext body: 'Build for MXNet branch ${BRANCH_NAME} has broken. Please view the build at ${BUILD_URL}', replyTo: '${EMAIL}', subject: '[BUILD FAILED] Branch ${BRANCH_NAME} build ${BUILD_NUMBER}', to: '${EMAIL}'
}
}
)
)
6 changes: 3 additions & 3 deletions ci/build_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ def main():
if system == 'Windows':
logging.info("Detected Windows platform")
if 'OpenBLAS_HOME' not in os.environ:
os.environ["OpenBLAS_HOME"] = "C:\\mxnet\\openblas"
os.environ["OpenBLAS_HOME"] = "C:\\Program Files\\OpenBLAS-v0.2.19"
if 'OpenCV_DIR' not in os.environ:
os.environ["OpenCV_DIR"] = "C:\\mxnet\\opencv_vc14"
os.environ["OpenCV_DIR"] = "C:\\Program Files\\OpenCV-v3.4.1\\build"
if 'CUDA_PATH' not in os.environ:
os.environ["CUDA_PATH"] = "C:\\CUDA\\v8.0"
os.environ["CUDA_PATH"] = "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2"
windows_build(args)

elif system == 'Linux' or system == 'Darwin':
Expand Down
8 changes: 5 additions & 3 deletions ci/windows/test_py2_cpu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py2\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python27\Scripts\pip install -r tests\requirements.txt
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-xunit --xunit-file nosetests_train.xml tests\python\train
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
if (! $?) { Throw ("Error running train tests") }
12 changes: 7 additions & 5 deletions ci/windows/test_py2_gpu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py2\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python27\Scripts\pip install -r tests\requirements.txt
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py2\python.exe -m nose -v tests\python\train
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error tests\python\train
if (! $?) { Throw ("Error running tests") }
8 changes: 5 additions & 3 deletions ci/windows/test_py3_cpu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py3\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python37\Scripts\pip install -r tests\requirements.txt
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-xunit --xunit-file nosetests_train.xml tests\python\train
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
if (! $?) { Throw ("Error running train tests") }
12 changes: 7 additions & 5 deletions ci/windows/test_py3_gpu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py3\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python37\Scripts\pip install -r tests\requirements.txt
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-xunit --xunit-file nosetests_train.xml tests\python\train
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
if (! $?) { Throw ("Error running tests") }
2 changes: 1 addition & 1 deletion tests/python/gpu/test_operator_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1923,4 +1923,4 @@ def test_context_num_gpus():

if __name__ == '__main__':
import nose
nose.runmodule()
nose.runmodule()
4 changes: 4 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Requirements for tests, those are installed before running on the virtualenv
mock
nose
nose-timer
ipython
numpy
scipy

0 comments on commit 1fed192

Please sign in to comment.