Skip to content

Commit

Permalink
[CI] Fix win64 CI (dmlc#594)
Browse files Browse the repository at this point in the history
* fix ci

* poke ci

* poke ci
  • Loading branch information
jermainewang authored Jun 1, 2019
1 parent 5492994 commit 350b485
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

dgl_linux_libs = "build/libdgl.so, build/runUnitTests, python/dgl/_ffi/_cy3/core.cpython-35m-x86_64-linux-gnu.so"
// Currently DGL on Windows is not working with Cython yet
dgl_windows_libs = "build\\dgl.dll, build\\runUnitTests.exe"
dgl_win64_libs = "build\\dgl.dll, build\\runUnitTests.exe"

def init_git() {
sh "rm -rf *"
checkout scm
sh "git submodule init"
sh "git submodule update"
sh "ls -lh"
}

def init_git_win64() {
Expand All @@ -33,64 +32,64 @@ def unpack_lib(name, libs) {
def build_dgl_linux(dev) {
init_git()
sh "bash tests/scripts/build_dgl.sh"
pack_lib("dgl-${dev}", dgl_linux_libs)
pack_lib("dgl-${dev}-linux", dgl_linux_libs)
}

def build_dgl_win64(dev) {
/* Assuming that Windows slaves are already configured with MSBuild VS2017,
* CMake and Python/pip/setuptools etc. */
init_git_win64()
bat "CALL tests\\scripts\\build_dgl.bat"
pack_lib("dgl-${dev}", dgl_windows_libs)
pack_lib("dgl-${dev}-win64", dgl_win64_libs)
}

def cpp_unit_test_linux() {
init_git()
unpack_lib("dgl-cpu", dgl_linux_libs)
unpack_lib("dgl-cpu-linux", dgl_linux_libs)
sh "bash tests/scripts/task_cpp_unit_test.sh"
}

def cpp_unit_test_win64() {
init_git_win64()
unpack_lib("dgl-cpu", dgl_windows_libs)
unpack_lib("dgl-cpu-win64", dgl_win64_libs)
bat "CALL tests\\scripts\\task_cpp_unit_test.bat"
}

def unit_test(backend, dev) {
def unit_test_linux(backend, dev) {
init_git()
unpack_lib("dgl-${dev}", dgl_linux_libs)
unpack_lib("dgl-${dev}-linux", dgl_linux_libs)
timeout(time: 2, unit: 'MINUTES') {
sh "bash tests/scripts/task_unit_test.sh ${backend}"
}
}

def unit_test_win64(backend, dev) {
init_git_win64()
unpack_lib("dgl-${dev}", dgl_windows_libs)
unpack_lib("dgl-${dev}-win64", dgl_win64_libs)
timeout(time: 2, unit: 'MINUTES') {
bat "CALL tests\\scripts\\task_unit_test.bat ${backend}"
}
}

def example_test(backend, dev) {
def example_test_linux(backend, dev) {
init_git()
unpack_lib("dgl-${dev}", dgl_linux_libs)
unpack_lib("dgl-${dev}-linux", dgl_linux_libs)
timeout(time: 20, unit: 'MINUTES') {
sh "bash tests/scripts/task_example_test.sh ${dev}"
}
}

def example_test_win64(backend, dev) {
init_git_win64()
unpack_lib("dgl-${dev}", dgl_windows_libs)
unpack_lib("dgl-${dev}-win64", dgl_win64_libs)
timeout(time: 20, unit: 'MINUTES') {
bat "CALL tests\\scripts\\task_example_test.bat ${dev}"
}
}

def tutorial_test(backend) {
def tutorial_test_linux(backend) {
init_git()
unpack_lib("dgl-cpu", dgl_linux_libs)
unpack_lib("dgl-cpu-linux", dgl_linux_libs)
timeout(time: 20, unit: 'MINUTES') {
sh "bash tests/scripts/task_${backend}_tutorial_test.sh"
}
Expand Down Expand Up @@ -156,17 +155,17 @@ pipeline {
stages {
stage("Unit test") {
steps {
unit_test("pytorch", "cpu")
unit_test_linux("pytorch", "cpu")
}
}
stage("Example test") {
steps {
example_test("pytorch", "cpu")
example_test_linux("pytorch", "cpu")
}
}
stage("Tutorial test") {
steps {
tutorial_test("pytorch")
tutorial_test_linux("pytorch")
}
}
}
Expand Down Expand Up @@ -196,13 +195,13 @@ pipeline {
stages {
stage("Unit test") {
steps {
//unit_test("pytorch", "gpu")
//unit_test_linux("pytorch", "gpu")
sh "nvidia-smi"
}
}
stage("Example test") {
steps {
example_test("pytorch", "gpu")
example_test_linux("pytorch", "gpu")
}
}
}
Expand All @@ -212,17 +211,17 @@ pipeline {
stages {
stage("Unit test") {
steps {
unit_test("mxnet", "cpu")
unit_test_linux("mxnet", "cpu")
}
}
//stage("Example test") {
// steps {
// unit_test("pytorch", "cpu")
// unit_test_linux("pytorch", "cpu")
// }
//}
//stage("Tutorial test") {
// steps {
// tutorial_test("mxnet")
// tutorial_test_linux("mxnet")
// }
//}
}
Expand Down

0 comments on commit 350b485

Please sign in to comment.