From 573a010879583885a0193e30dc0b8c848d80869b Mon Sep 17 00:00:00 2001 From: Gautam Kumar Date: Mon, 9 Oct 2017 18:20:12 -0700 Subject: [PATCH 1/3] Delete workspace before build. (#8195) * Delete workspace before build. * Move 'deleteDir' outside the retry. --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 50398ce99e00..14d1ce411d14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,6 +13,7 @@ err = null // initialize source codes def init_git() { + deleteDir() retry(5) { try { timeout(time: 2, unit: 'MINUTES') { @@ -29,6 +30,7 @@ def init_git() { } def init_git_win() { + deleteDir() retry(5) { try { timeout(time: 2, unit: 'MINUTES') { From 0941f27b02932d7a32ab5a9f8982bdf1969108c4 Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Tue, 10 Oct 2017 00:32:34 +0800 Subject: [PATCH 2/3] Jenkins: fix Jenkinsfile indentation --- Jenkinsfile | 54 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 14d1ce411d14..aef8ae660a99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ def init_git() { timeout(time: 2, unit: 'MINUTES') { checkout scm sh 'git submodule update --init' - sh 'git clean -d -f' + sh 'git clean -d -f' } } catch (exc) { deleteDir() @@ -36,7 +36,7 @@ def init_git_win() { timeout(time: 2, unit: 'MINUTES') { checkout scm bat 'git submodule update --init' - bat 'git clean -d -f' + bat 'git clean -d -f' } } catch (exc) { deleteDir() @@ -407,7 +407,7 @@ try { } } }, - 'Python 2: CPU Win':{ + 'Python 2: CPU Win': { node('mxnetwindows') { ws('workspace/ut-python-cpu') { init_git_win() @@ -421,32 +421,32 @@ try { del /S /Q ${env.WORKSPACE}\\pkg_vc14_cpu\\python\\*.pyc C:\\mxnet\\test_cpu.bat""" } - } - }, - 'Python 3: CPU Win': { - node('mxnetwindows') { + } + }, + 'Python 3: CPU Win': { + node('mxnetwindows') { ws('workspace/ut-python-cpu') { init_git_win() unstash 'vc14_cpu' bat '''rmdir /s/q pkg_vc14_cpu 7z x -y vc14_cpu.7z''' - bat """xcopy C:\\mxnet\\data data /E /I /Y + bat """xcopy C:\\mxnet\\data data /E /I /Y xcopy C:\\mxnet\\model model /E /I /Y call activate py3 set PYTHONPATH=${env.WORKSPACE}\\pkg_vc14_cpu\\python del /S /Q ${env.WORKSPACE}\\pkg_vc14_cpu\\python\\*.pyc C:\\mxnet\\test_cpu.bat""" } - } - }, - 'Python 2: GPU Win':{ - node('mxnetwindows') { - ws('workspace/ut-python-gpu') { - init_git_win() - unstash 'vc14_gpu' - bat '''rmdir /s/q pkg_vc14_gpu + } + }, + 'Python 2: GPU Win': { + node('mxnetwindows') { + ws('workspace/ut-python-gpu') { + init_git_win() + unstash 'vc14_gpu' + bat '''rmdir /s/q pkg_vc14_gpu 7z x -y vc14_gpu.7z''' - bat """xcopy C:\\mxnet\\data data /E /I /Y + bat """xcopy C:\\mxnet\\data data /E /I /Y xcopy C:\\mxnet\\model model /E /I /Y call activate py2 set PYTHONPATH=${env.WORKSPACE}\\pkg_vc14_gpu\\python @@ -454,23 +454,23 @@ try { C:\\mxnet\\test_gpu.bat""" } } - }, - 'Python 3: GPU Win':{ - node('mxnetwindows') { - ws('workspace/ut-python-gpu') { - init_git_win() - unstash 'vc14_gpu' - bat '''rmdir /s/q pkg_vc14_gpu + }, + 'Python 3: GPU Win': { + node('mxnetwindows') { + ws('workspace/ut-python-gpu') { + init_git_win() + unstash 'vc14_gpu' + bat '''rmdir /s/q pkg_vc14_gpu 7z x -y vc14_gpu.7z''' - bat """xcopy C:\\mxnet\\data data /E /I /Y + bat """xcopy C:\\mxnet\\data data /E /I /Y xcopy C:\\mxnet\\model model /E /I /Y call activate py3 set PYTHONPATH=${env.WORKSPACE}\\pkg_vc14_gpu\\python del /S /Q ${env.WORKSPACE}\\pkg_vc14_gpu\\python\\*.pyc C:\\mxnet\\test_gpu.bat""" - } - } + } } + } } stage('Integration Test') { From dd9c72b2a1d3ade6c3656cfa2f90f473819a7dbf Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Tue, 10 Oct 2017 01:41:42 +0800 Subject: [PATCH 3/3] add Julia package as a submodule and enable CPU build --- .gitmodules | 3 +++ Jenkinsfile | 15 +++++++++++++++ julia-package | 1 + tests/ci_build/Dockerfile.cpu | 2 ++ tests/ci_build/install/install_julia.sh | 10 +++++----- tools/license_header.py | 1 + 6 files changed, 27 insertions(+), 5 deletions(-) create mode 160000 julia-package mode change 100644 => 100755 tests/ci_build/install/install_julia.sh diff --git a/.gitmodules b/.gitmodules index 7a76cbaf78d9..eb22b2f0f53b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "cub"] path = cub url = https://github.com/dmlc/cub +[submodule "julia-package"] + path = julia-package + url = https://github.com/dmlc/MXNet.jl.git diff --git a/Jenkinsfile b/Jenkinsfile index aef8ae660a99..fcbf5840d604 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -407,6 +407,21 @@ try { } } }, + 'Julia 0.6: CPU': { + node('mxnetlinux') { + ws('workspace/ut-julia-cpu') { + init_git() + unpack_lib('cpu') + withEnv(['MXNET_HOME=/workspace/ut-julia-cpu']) { + timeout(time: max_timem unit: 'MINUTES') { + sh "${docker_run} cpu julia -e 'Pkg.clone(\"julia-package\", \"MXNet\")'" + sh "${docker_run} cpu julia -e 'Pkg.build(\"MXNet\")'" + sh "${docker_run} cpu julia -e 'Pkg.test(\"MXNet\")'" + } + } + } + } + }, 'Python 2: CPU Win': { node('mxnetwindows') { ws('workspace/ut-python-cpu') { diff --git a/julia-package b/julia-package new file mode 160000 index 000000000000..15def2c2f7f8 --- /dev/null +++ b/julia-package @@ -0,0 +1 @@ +Subproject commit 15def2c2f7f846cbe560286a62be33e641ef3972 diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index c7bb0af0f79c..b0b37712206b 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -10,3 +10,5 @@ COPY install/ubuntu_install_r.sh /install/ RUN /install/ubuntu_install_r.sh COPY install/ubuntu_install_perl.sh /install/ RUN /install/ubuntu_install_perl.sh +COPY install/install_julia.sh /install/ +RUN /install/install_julia.sh diff --git a/tests/ci_build/install/install_julia.sh b/tests/ci_build/install/install_julia.sh old mode 100644 new mode 100755 index 5007c949537a..26aadc98dfe3 --- a/tests/ci_build/install/install_julia.sh +++ b/tests/ci_build/install/install_julia.sh @@ -20,10 +20,10 @@ set -e -wget https://julialang.s3.amazonaws.com/bin/linux/x64/0.5/julia-0.5.0-linux-x86_64.tar.gz -mv julia-0.5.0-linux-x86_64.tar.gz /tmp/ -tar xfvz /tmp/julia-0.5.0-linux-x86_64.tar.gz -rm -f /tmp/julia-0.5.0-linux-x86_64.tar.gz +wget https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.0-linux-x86_64.tar.gz +mv julia-0.6.0-linux-x86_64.tar.gz /tmp/ +tar xfvz /tmp/julia-0.6.0-linux-x86_64.tar.gz +rm -f /tmp/julia-0.6.0-linux-x86_64.tar.gz # tar extracted in current directory -ln -s -f ${PWD}/julia-3c9d75391c/bin/julia /usr/bin/julia +ln -s -f ${PWD}/julia-903644385b/bin/julia /usr/bin/julia diff --git a/tools/license_header.py b/tools/license_header.py index db67000837b0..28d7abc0cc95 100644 --- a/tools/license_header.py +++ b/tools/license_header.py @@ -59,6 +59,7 @@ 'cub/', 'dlpack/', 'dmlc-core/', + 'julia-package/', 'mshadow/', 'nnvm', 'ps-lite',