Unverified Commit 350b4851 authored by Minjie Wang's avatar Minjie Wang Committed by GitHub
Browse files

[CI] Fix win64 CI (#594)

* fix ci

* poke ci

* poke ci
parent 54929942
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
dgl_linux_libs = "build/libdgl.so, build/runUnitTests, python/dgl/_ffi/_cy3/core.cpython-35m-x86_64-linux-gnu.so" 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 // 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() { def init_git() {
sh "rm -rf *" sh "rm -rf *"
checkout scm checkout scm
sh "git submodule init" sh "git submodule init"
sh "git submodule update" sh "git submodule update"
sh "ls -lh"
} }
def init_git_win64() { def init_git_win64() {
...@@ -33,7 +32,7 @@ def unpack_lib(name, libs) { ...@@ -33,7 +32,7 @@ def unpack_lib(name, libs) {
def build_dgl_linux(dev) { def build_dgl_linux(dev) {
init_git() init_git()
sh "bash tests/scripts/build_dgl.sh" 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) { def build_dgl_win64(dev) {
...@@ -41,24 +40,24 @@ def build_dgl_win64(dev) { ...@@ -41,24 +40,24 @@ def build_dgl_win64(dev) {
* CMake and Python/pip/setuptools etc. */ * CMake and Python/pip/setuptools etc. */
init_git_win64() init_git_win64()
bat "CALL tests\\scripts\\build_dgl.bat" 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() { def cpp_unit_test_linux() {
init_git() 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" sh "bash tests/scripts/task_cpp_unit_test.sh"
} }
def cpp_unit_test_win64() { def cpp_unit_test_win64() {
init_git_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" bat "CALL tests\\scripts\\task_cpp_unit_test.bat"
} }
def unit_test(backend, dev) { def unit_test_linux(backend, dev) {
init_git() init_git()
unpack_lib("dgl-${dev}", dgl_linux_libs) unpack_lib("dgl-${dev}-linux", dgl_linux_libs)
timeout(time: 2, unit: 'MINUTES') { timeout(time: 2, unit: 'MINUTES') {
sh "bash tests/scripts/task_unit_test.sh ${backend}" sh "bash tests/scripts/task_unit_test.sh ${backend}"
} }
...@@ -66,15 +65,15 @@ def unit_test(backend, dev) { ...@@ -66,15 +65,15 @@ def unit_test(backend, dev) {
def unit_test_win64(backend, dev) { def unit_test_win64(backend, dev) {
init_git_win64() init_git_win64()
unpack_lib("dgl-${dev}", dgl_windows_libs) unpack_lib("dgl-${dev}-win64", dgl_win64_libs)
timeout(time: 2, unit: 'MINUTES') { timeout(time: 2, unit: 'MINUTES') {
bat "CALL tests\\scripts\\task_unit_test.bat ${backend}" bat "CALL tests\\scripts\\task_unit_test.bat ${backend}"
} }
} }
def example_test(backend, dev) { def example_test_linux(backend, dev) {
init_git() init_git()
unpack_lib("dgl-${dev}", dgl_linux_libs) unpack_lib("dgl-${dev}-linux", dgl_linux_libs)
timeout(time: 20, unit: 'MINUTES') { timeout(time: 20, unit: 'MINUTES') {
sh "bash tests/scripts/task_example_test.sh ${dev}" sh "bash tests/scripts/task_example_test.sh ${dev}"
} }
...@@ -82,15 +81,15 @@ def example_test(backend, dev) { ...@@ -82,15 +81,15 @@ def example_test(backend, dev) {
def example_test_win64(backend, dev) { def example_test_win64(backend, dev) {
init_git_win64() init_git_win64()
unpack_lib("dgl-${dev}", dgl_windows_libs) unpack_lib("dgl-${dev}-win64", dgl_win64_libs)
timeout(time: 20, unit: 'MINUTES') { timeout(time: 20, unit: 'MINUTES') {
bat "CALL tests\\scripts\\task_example_test.bat ${dev}" bat "CALL tests\\scripts\\task_example_test.bat ${dev}"
} }
} }
def tutorial_test(backend) { def tutorial_test_linux(backend) {
init_git() init_git()
unpack_lib("dgl-cpu", dgl_linux_libs) unpack_lib("dgl-cpu-linux", dgl_linux_libs)
timeout(time: 20, unit: 'MINUTES') { timeout(time: 20, unit: 'MINUTES') {
sh "bash tests/scripts/task_${backend}_tutorial_test.sh" sh "bash tests/scripts/task_${backend}_tutorial_test.sh"
} }
...@@ -156,17 +155,17 @@ pipeline { ...@@ -156,17 +155,17 @@ pipeline {
stages { stages {
stage("Unit test") { stage("Unit test") {
steps { steps {
unit_test("pytorch", "cpu") unit_test_linux("pytorch", "cpu")
} }
} }
stage("Example test") { stage("Example test") {
steps { steps {
example_test("pytorch", "cpu") example_test_linux("pytorch", "cpu")
} }
} }
stage("Tutorial test") { stage("Tutorial test") {
steps { steps {
tutorial_test("pytorch") tutorial_test_linux("pytorch")
} }
} }
} }
...@@ -196,13 +195,13 @@ pipeline { ...@@ -196,13 +195,13 @@ pipeline {
stages { stages {
stage("Unit test") { stage("Unit test") {
steps { steps {
//unit_test("pytorch", "gpu") //unit_test_linux("pytorch", "gpu")
sh "nvidia-smi" sh "nvidia-smi"
} }
} }
stage("Example test") { stage("Example test") {
steps { steps {
example_test("pytorch", "gpu") example_test_linux("pytorch", "gpu")
} }
} }
} }
...@@ -212,17 +211,17 @@ pipeline { ...@@ -212,17 +211,17 @@ pipeline {
stages { stages {
stage("Unit test") { stage("Unit test") {
steps { steps {
unit_test("mxnet", "cpu") unit_test_linux("mxnet", "cpu")
} }
} }
//stage("Example test") { //stage("Example test") {
// steps { // steps {
// unit_test("pytorch", "cpu") // unit_test_linux("pytorch", "cpu")
// } // }
//} //}
//stage("Tutorial test") { //stage("Tutorial test") {
// steps { // steps {
// tutorial_test("mxnet") // tutorial_test_linux("mxnet")
// } // }
//} //}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment