Skip to content

Commit

Permalink
[CI] Add more info, per exec ws isolation (apache#4388)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and ZihengJiang committed Nov 20, 2019
1 parent 6040b6f commit 3338af7
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ docker_run = 'docker/bash.sh'
// timeout in minutes
max_time = 120

workspace = "workspace/exec_${env.EXECUTOR_NUMBER}"
def per_exec_ws(folder) {
return "workspace/exec_${env.EXECUTOR_NUMBER}/" + folder
}

// initialize source codes
def init_git() {
// Add more info about job node
sh """
echo "INFO: NODE_NAME=${NODE_NAME} EXECUTOR_NUMBER=${EXECUTOR_NUMBER}"
"""
checkout scm
retry(5) {
timeout(time: 2, unit: 'MINUTES') {
Expand All @@ -88,7 +94,7 @@ def init_git_win() {
stage("Sanity Check") {
timeout(time: max_time, unit: 'MINUTES') {
node('CPU') {
ws("${workspace}/tvm/sanity") {
ws(per_exec_ws("tvm/sanity")) {
init_git()
sh "${docker_run} ${ci_lint} ./tests/scripts/task_lint.sh"
}
Expand Down Expand Up @@ -136,7 +142,7 @@ def unpack_lib(name, libs) {
stage('Build') {
parallel 'BUILD: GPU': {
node('GPUBUILD') {
ws("${workspace}/tvm/build-gpu") {
ws(per_exec_ws("tvm/build-gpu")) {
init_git()
sh """
mkdir -p build
Expand Down Expand Up @@ -184,7 +190,7 @@ stage('Build') {
},
'BUILD: CPU': {
node('CPU') {
ws("${workspace}/tvm/build-cpu") {
ws(per_exec_ws("tvm/build-cpu")) {
init_git()
sh """
mkdir -p build
Expand Down Expand Up @@ -216,7 +222,7 @@ stage('Build') {
},
'BUILD : i386': {
node('CPU') {
ws("${workspace}/tvm/build-i386") {
ws(per_exec_ws("tvm/build-i386")) {
init_git()
sh """
mkdir -p build
Expand All @@ -241,7 +247,7 @@ stage('Build') {
stage('Unit Test') {
parallel 'python3: GPU': {
node('TensorCore') {
ws("${workspace}/tvm/ut-python-gpu") {
ws(per_exec_ws("tvm/ut-python-gpu")) {
init_git()
unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -253,7 +259,7 @@ stage('Unit Test') {
},
'python3: i386': {
node('CPU') {
ws("${workspace}/tvm/ut-python-i386") {
ws(per_exec_ws("tvm/ut-python-i386")) {
init_git()
unpack_lib('i386', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -266,7 +272,7 @@ stage('Unit Test') {
},
'java: GPU': {
node('GPU') {
ws("${workspace}/tvm/ut-java") {
ws(per_exec_ws("tvm/ut-java")) {
init_git()
unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -280,7 +286,7 @@ stage('Unit Test') {
stage('Integration Test') {
parallel 'topi: GPU': {
node('GPU') {
ws("${workspace}/tvm/topi-python-gpu") {
ws(per_exec_ws("tvm/topi-python-gpu")) {
init_git()
unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -291,7 +297,7 @@ stage('Integration Test') {
},
'frontend: GPU': {
node('GPU') {
ws("${workspace}/tvm/frontend-python-gpu") {
ws(per_exec_ws("tvm/frontend-python-gpu")) {
init_git()
unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -302,7 +308,7 @@ stage('Integration Test') {
},
'legacy: GPU': {
node('GPU') {
ws("${workspace}/tvm/legacy-python-gpu") {
ws(per_exec_ws("tvm/legacy-python-gpu")) {
init_git()
unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -313,7 +319,7 @@ stage('Integration Test') {
},
'docs: GPU': {
node('GPU') {
ws("${workspace}/tvm/docs-python-gpu") {
ws(per_exec_ws("tvm/docs-python-gpu")) {
init_git()
unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') {
Expand Down Expand Up @@ -345,7 +351,7 @@ stage('Build packages') {

stage('Deploy') {
node('doc') {
ws("${workspace}/tvm/deploy-docs") {
ws(per_exec_ws("tvm/deploy-docs")) {
if (env.BRANCH_NAME == "master") {
unpack_lib('mydocs', 'docs.tgz')
sh "tar xf docs.tgz -C /var/docs"
Expand Down

0 comments on commit 3338af7

Please sign in to comment.