You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/16 12:48:04 UTC

[GitHub] [tvm] mikepapadim opened a new pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

mikepapadim opened a new pull request #9031:
URL: https://github.com/apache/tvm/pull/9031


   This is an updated version for #8992 and fixes #8673.
   
   With this PR when changes affect files in `docs/` then only the following stages will run:
   * Sanity Check 
   * BUILD: GPU
   * docs: GPU
   
   This fix suppose to speed up the process on augmenting the current documentation, 
   
   @areusch @comaniac @jroesch 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r712813036



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        docs = sh (returnStatus: true, script: '''
+        ./tests/scripts/git_check_tree.sh

Review comment:
       This is fixed now.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711556315



##########
File path: Jenkinsfile
##########
@@ -42,41 +42,42 @@
 // Hashtag in the source to build current CI docker builds
 //
 //
+import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
-ci_lint = "tlcpack/ci-lint:v0.67"
-ci_gpu = "tlcpack/ci-gpu:v0.77"
-ci_cpu = "tlcpack/ci-cpu:v0.77"
-ci_wasm = "tlcpack/ci-wasm:v0.71"
-ci_i386 = "tlcpack/ci-i386:v0.73"
-ci_qemu = "tlcpack/ci-qemu:v0.08"
-ci_arm = "tlcpack/ci-arm:v0.06"
+ci_lint = 'tlcpack/ci-lint:v0.67'

Review comment:
       I passed the Jenkisfile through a Groovy formatter, but +1 I reverted the changes to keep the diff down.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711557041



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        docs = sh (returnStatus: true, script: '''
+        ./tests/scripts/git_check_tree.sh

Review comment:
       Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711256865



##########
File path: Jenkinsfile
##########
@@ -201,192 +205,240 @@ def unpack_lib(name, libs) {
 }
 
 stage('Build') {
-  parallel 'BUILD: GPU': {
-    node('GPUBUILD') {
-      ws(per_exec_ws("tvm/build-gpu")) {
-        init_git()
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
-        make(ci_gpu, 'build', '-j2')
-        pack_lib('gpu', tvm_multilib)
-        // compiler test
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
-        make(ci_gpu, 'build2', '-j2')
+    parallel 'BUILD: GPU': {
+      node('GPUBUILD') {
+        ws(per_exec_ws('tvm/build-gpu')) {
+          init_git()
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
+          make(ci_gpu, 'build', '-j2')
+          pack_lib('gpu', tvm_multilib)
+          // compiler test
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
+          make(ci_gpu, 'build2', '-j2')
+        }
       }
-    }
   },
   'BUILD: CPU': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-cpu")) {
-        init_git()
-        sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
-        make(ci_cpu, 'build', '-j2')
-        pack_lib('cpu', tvm_multilib_tsim)
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
-          // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
-          // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
-          junit "build/pytest-results/*.xml"
+    if (docs == 1) {

Review comment:
       No worries. I just want to make sure this is the currently best solution. Let's just keep as it is.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-923349212


   @comaniac could you take a look at this one again?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-925095695


   blocked again by #9013 . @mikepapadim you could retrigger and hope we get a different node for docs: GPU run or wait for that one to get fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-933611130


   thanks @mikepapadim !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-933555639


   > @mikepapadim Please fix the conflict.
   
   Just got through CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711223304



##########
File path: tests/scripts/git_check_tree.sh
##########
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+

Review comment:
       add set -eux

##########
File path: Jenkinsfile
##########
@@ -201,192 +205,240 @@ def unpack_lib(name, libs) {
 }
 
 stage('Build') {
-  parallel 'BUILD: GPU': {
-    node('GPUBUILD') {
-      ws(per_exec_ws("tvm/build-gpu")) {
-        init_git()
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
-        make(ci_gpu, 'build', '-j2')
-        pack_lib('gpu', tvm_multilib)
-        // compiler test
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
-        make(ci_gpu, 'build2', '-j2')
+    parallel 'BUILD: GPU': {
+      node('GPUBUILD') {
+        ws(per_exec_ws('tvm/build-gpu')) {
+          init_git()
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
+          make(ci_gpu, 'build', '-j2')
+          pack_lib('gpu', tvm_multilib)
+          // compiler test
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
+          make(ci_gpu, 'build2', '-j2')
+        }
       }
-    }
   },
   'BUILD: CPU': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-cpu")) {
-        init_git()
-        sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
-        make(ci_cpu, 'build', '-j2')
-        pack_lib('cpu', tvm_multilib_tsim)
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
-          // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
-          // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
-          junit "build/pytest-results/*.xml"
+    if (docs == 1) {
+      node('CPU') {
+        ws(per_exec_ws('tvm/build-cpu')) {
+          init_git()
+          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
+          make(ci_cpu, 'build', '-j2')
+          pack_lib('cpu', tvm_multilib_tsim)
+          timeout(time: max_time, unit: 'MINUTES') {
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
+            // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
+            // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
+            junit 'build/pytest-results/*.xml'
+          }
         }
       }
+    } else {
+      Utils.markStageSkippedForConditional('BUILD: CPU')
     }
-    },
+  },
   'BUILD: WASM': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-wasm")) {
-        init_git()
-        sh "${docker_run} ${ci_wasm} ./tests/scripts/task_config_build_wasm.sh"
-        make(ci_wasm, 'build', '-j2')
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_wasm} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_wasm} ./tests/scripts/task_web_wasm.sh"
+    if (docs == 1) {
+      node('CPU') {
+        ws(per_exec_ws('tvm/build-wasm')) {
+          init_git()
+          sh "${docker_run} ${ci_wasm} ./tests/scripts/task_config_build_wasm.sh"
+          make(ci_wasm, 'build', '-j2')
+          timeout(time: max_time, unit: 'MINUTES') {
+            sh "${docker_run} ${ci_wasm} ./tests/scripts/task_ci_setup.sh"
+            sh "${docker_run} ${ci_wasm} ./tests/scripts/task_web_wasm.sh"
+          }
         }
       }
+    } else {
+      Utils.markStageSkippedForConditional('BUILD: WASM')
     }
   },
   'BUILD : i386': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-i386")) {
-        init_git()
-        sh "${docker_run} ${ci_i386} ./tests/scripts/task_config_build_i386.sh"
-        make(ci_i386, 'build', '-j2')
-        pack_lib('i386', tvm_multilib_tsim)
+    if ( docs == 1) {

Review comment:
       nit: extra space

##########
File path: Jenkinsfile
##########
@@ -42,41 +42,42 @@
 // Hashtag in the source to build current CI docker builds
 //
 //
+import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
-ci_lint = "tlcpack/ci-lint:v0.67"
-ci_gpu = "tlcpack/ci-gpu:v0.77"
-ci_cpu = "tlcpack/ci-cpu:v0.77"
-ci_wasm = "tlcpack/ci-wasm:v0.71"
-ci_i386 = "tlcpack/ci-i386:v0.73"
-ci_qemu = "tlcpack/ci-qemu:v0.08"
-ci_arm = "tlcpack/ci-arm:v0.06"
+ci_lint = 'tlcpack/ci-lint:v0.67'

Review comment:
       +1 would be great to avoid too many formatting changes. in particular this one also requires updates to docker/dev_common.sh

##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        docs = sh (returnStatus: true, script: '''

Review comment:
       could we name this `is_docs_only_build`?

##########
File path: Jenkinsfile
##########
@@ -201,192 +205,240 @@ def unpack_lib(name, libs) {
 }
 
 stage('Build') {
-  parallel 'BUILD: GPU': {
-    node('GPUBUILD') {
-      ws(per_exec_ws("tvm/build-gpu")) {
-        init_git()
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
-        make(ci_gpu, 'build', '-j2')
-        pack_lib('gpu', tvm_multilib)
-        // compiler test
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
-        make(ci_gpu, 'build2', '-j2')
+    parallel 'BUILD: GPU': {
+      node('GPUBUILD') {
+        ws(per_exec_ws('tvm/build-gpu')) {
+          init_git()
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
+          make(ci_gpu, 'build', '-j2')
+          pack_lib('gpu', tvm_multilib)
+          // compiler test
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
+          make(ci_gpu, 'build2', '-j2')
+        }
       }
-    }
   },
   'BUILD: CPU': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-cpu")) {
-        init_git()
-        sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
-        make(ci_cpu, 'build', '-j2')
-        pack_lib('cpu', tvm_multilib_tsim)
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
-          // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
-          // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
-          junit "build/pytest-results/*.xml"
+    if (docs == 1) {

Review comment:
       i'm not sure it can be done :/
   
   perhaps if we switch to Declarative Jenkins, but unfortunately I'm not an expert either. I would love for the boilerplate to be templated.

##########
File path: tests/scripts/git_check_tree.sh
##########
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+DOCS_DIR=0
+OTHER_DIR=0
+DOC_DIR="\docs"
+
+changed_files=`git diff --no-commit-id --name-only -r origin/main`
+
+for file in $changed_files; do
+    if grep -q "$DOC_DIR" <<< "$file"; then
+        DOCS_DIR=1
+    else
+        OTHER_DIR=1
+        break
+    fi
+done
+
+if [[ ($OTHER_DIR -eq 1) ]]; then

Review comment:
       can we use the simpler bash syntax `if [ ${OTHER_DIR} -eq 1 ]; then`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-926440784


   PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-930297038


   PTAL
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-922240749


   PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-924400520


   Just triggered the CI again.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch merged pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch merged pull request #9031:
URL: https://github.com/apache/tvm/pull/9031


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-930297038


   PTAL
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r717009636



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        is_docs_only_build = sh (returnStatus: true, script: '''

Review comment:
       ok uhh sorry there is just one minor problem here: the polarity is backwards on this one so none of the if checks below make sense. can you fix?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r717411337



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        is_docs_only_build = sh (returnStatus: true, script: '''

Review comment:
       Good catch! This is fixed now! PTAL




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-932712818


   @mikepapadim Please fix the conflict.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r716012555



##########
File path: Jenkinsfile
##########
@@ -103,23 +104,23 @@ def init_git() {
 }
 
 def init_git_win() {
-    checkout scm
-    retry(5) {
-        timeout(time: 2, unit: 'MINUTES') {
-            bat 'git submodule update --init -f'
-        }
-    }
+  checkout scm

Review comment:
       I think the issue with these is that the Jenkisfile has been formatted properly yet and the automatic linters do not check, so format is inconsistent across the file.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711556675



##########
File path: tests/scripts/git_check_tree.sh
##########
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+DOCS_DIR=0
+OTHER_DIR=0
+DOC_DIR="\docs"

Review comment:
       This is fixed now. It should be `docs/`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711248257



##########
File path: Jenkinsfile
##########
@@ -201,192 +205,240 @@ def unpack_lib(name, libs) {
 }
 
 stage('Build') {
-  parallel 'BUILD: GPU': {
-    node('GPUBUILD') {
-      ws(per_exec_ws("tvm/build-gpu")) {
-        init_git()
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
-        make(ci_gpu, 'build', '-j2')
-        pack_lib('gpu', tvm_multilib)
-        // compiler test
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
-        make(ci_gpu, 'build2', '-j2')
+    parallel 'BUILD: GPU': {
+      node('GPUBUILD') {
+        ws(per_exec_ws('tvm/build-gpu')) {
+          init_git()
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
+          make(ci_gpu, 'build', '-j2')
+          pack_lib('gpu', tvm_multilib)
+          // compiler test
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
+          make(ci_gpu, 'build2', '-j2')
+        }
       }
-    }
   },
   'BUILD: CPU': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-cpu")) {
-        init_git()
-        sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
-        make(ci_cpu, 'build', '-j2')
-        pack_lib('cpu', tvm_multilib_tsim)
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
-          // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
-          // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
-          junit "build/pytest-results/*.xml"
+    if (docs == 1) {

Review comment:
       well, I am afraid we cant do it with a more elegant way atm. We need to migrate the whole script to Declarative Jenkins.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711241743



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        docs = sh (returnStatus: true, script: '''

Review comment:
       I have a comment regarding to this naming as well, but I prefer yours :D




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711248479



##########
File path: Jenkinsfile
##########
@@ -201,192 +205,240 @@ def unpack_lib(name, libs) {
 }
 
 stage('Build') {
-  parallel 'BUILD: GPU': {
-    node('GPUBUILD') {
-      ws(per_exec_ws("tvm/build-gpu")) {
-        init_git()
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
-        make(ci_gpu, 'build', '-j2')
-        pack_lib('gpu', tvm_multilib)
-        // compiler test
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
-        make(ci_gpu, 'build2', '-j2')
+    parallel 'BUILD: GPU': {
+      node('GPUBUILD') {
+        ws(per_exec_ws('tvm/build-gpu')) {
+          init_git()
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
+          make(ci_gpu, 'build', '-j2')
+          pack_lib('gpu', tvm_multilib)
+          // compiler test
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
+          make(ci_gpu, 'build2', '-j2')
+        }
       }
-    }
   },
   'BUILD: CPU': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-cpu")) {
-        init_git()
-        sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
-        make(ci_cpu, 'build', '-j2')
-        pack_lib('cpu', tvm_multilib_tsim)
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
-          // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
-          // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
-          junit "build/pytest-results/*.xml"
+    if (docs == 1) {
+      node('CPU') {
+        ws(per_exec_ws('tvm/build-cpu')) {
+          init_git()
+          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
+          make(ci_cpu, 'build', '-j2')
+          pack_lib('cpu', tvm_multilib_tsim)
+          timeout(time: max_time, unit: 'MINUTES') {
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
+            // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
+            // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
+            sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
+            junit 'build/pytest-results/*.xml'
+          }
         }
       }
+    } else {
+      Utils.markStageSkippedForConditional('BUILD: CPU')
     }
-    },
+  },
   'BUILD: WASM': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-wasm")) {
-        init_git()
-        sh "${docker_run} ${ci_wasm} ./tests/scripts/task_config_build_wasm.sh"
-        make(ci_wasm, 'build', '-j2')
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_wasm} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_wasm} ./tests/scripts/task_web_wasm.sh"
+    if (docs == 1) {
+      node('CPU') {
+        ws(per_exec_ws('tvm/build-wasm')) {
+          init_git()
+          sh "${docker_run} ${ci_wasm} ./tests/scripts/task_config_build_wasm.sh"
+          make(ci_wasm, 'build', '-j2')
+          timeout(time: max_time, unit: 'MINUTES') {
+            sh "${docker_run} ${ci_wasm} ./tests/scripts/task_ci_setup.sh"
+            sh "${docker_run} ${ci_wasm} ./tests/scripts/task_web_wasm.sh"
+          }
         }
       }
+    } else {
+      Utils.markStageSkippedForConditional('BUILD: WASM')
     }
   },
   'BUILD : i386': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-i386")) {
-        init_git()
-        sh "${docker_run} ${ci_i386} ./tests/scripts/task_config_build_i386.sh"
-        make(ci_i386, 'build', '-j2')
-        pack_lib('i386', tvm_multilib_tsim)
+    if ( docs == 1) {

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] Hzfengsy commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r715999626



##########
File path: Jenkinsfile
##########
@@ -103,23 +104,23 @@ def init_git() {
 }
 
 def init_git_win() {
-    checkout scm
-    retry(5) {
-        timeout(time: 2, unit: 'MINUTES') {
-            bat 'git submodule update --init -f'
-        }
-    }
+  checkout scm

Review comment:
       Wonder if these format changes are necessary?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r717411337



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        is_docs_only_build = sh (returnStatus: true, script: '''

Review comment:
       Good catch! This is fixed now! PTAL




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] areusch commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r717009636



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        is_docs_only_build = sh (returnStatus: true, script: '''

Review comment:
       ok uhh sorry there is just one minor problem here: the polarity is backwards on this one so none of the if checks below make sense. can you fix?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#issuecomment-925998277


   > blocked again by #9013 . @mikepapadim you could retrigger and hope we get a different node for docs: GPU run or wait for that one to get fixed.
   
   Just pushed to CI again now that #9013 is fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r712546058



##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        docs = sh (returnStatus: true, script: '''
+        ./tests/scripts/git_check_tree.sh

Review comment:
       It is no longer `git_check_tree.sh`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mikepapadim commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711248909



##########
File path: tests/scripts/git_check_tree.sh
##########
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+DOCS_DIR=0
+OTHER_DIR=0
+DOC_DIR="\docs"
+
+changed_files=`git diff --no-commit-id --name-only -r origin/main`
+
+for file in $changed_files; do
+    if grep -q "$DOC_DIR" <<< "$file"; then
+        DOCS_DIR=1
+    else
+        OTHER_DIR=1
+        break
+    fi
+done
+
+if [[ ($OTHER_DIR -eq 1) ]]; then

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #9031: [CI] Prevent the complete Jenkins pipeline to run when files commited only to `/docs`

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #9031:
URL: https://github.com/apache/tvm/pull/9031#discussion_r711204273



##########
File path: Jenkinsfile
##########
@@ -42,41 +42,42 @@
 // Hashtag in the source to build current CI docker builds
 //
 //
+import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
-ci_lint = "tlcpack/ci-lint:v0.67"
-ci_gpu = "tlcpack/ci-gpu:v0.77"
-ci_cpu = "tlcpack/ci-cpu:v0.77"
-ci_wasm = "tlcpack/ci-wasm:v0.71"
-ci_i386 = "tlcpack/ci-i386:v0.73"
-ci_qemu = "tlcpack/ci-qemu:v0.08"
-ci_arm = "tlcpack/ci-arm:v0.06"
+ci_lint = 'tlcpack/ci-lint:v0.67'

Review comment:
       There are lots of format change noises in this file and they seems not relate to this PR. Is it required or just done by auto-formatting? I would suggest removing them if not required.

##########
File path: tests/scripts/git_check_tree.sh
##########
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+DOCS_DIR=0
+OTHER_DIR=0
+DOC_DIR="\docs"

Review comment:
       Does it matter with slash or anti-slash?

##########
File path: Jenkinsfile
##########
@@ -148,11 +149,15 @@ stage('Prepare') {
   }
 }
 
-stage("Sanity Check") {
+stage('Sanity Check') {
   timeout(time: max_time, unit: 'MINUTES') {
     node('CPU') {
-      ws(per_exec_ws("tvm/sanity")) {
+      ws(per_exec_ws('tvm/sanity')) {
         init_git()
+        docs = sh (returnStatus: true, script: '''
+        ./tests/scripts/git_check_tree.sh

Review comment:
       1. The name `git_check_tree` is confusing, because it only checks if the change tree includes `docs`. Better to name it `git_change_docs.sh` or something like that.
   2. The result status `docs` is also confusing as it doesn't look like a flag. Maybe `only_change_docs` might be clearer.

##########
File path: Jenkinsfile
##########
@@ -201,192 +205,240 @@ def unpack_lib(name, libs) {
 }
 
 stage('Build') {
-  parallel 'BUILD: GPU': {
-    node('GPUBUILD') {
-      ws(per_exec_ws("tvm/build-gpu")) {
-        init_git()
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
-        make(ci_gpu, 'build', '-j2')
-        pack_lib('gpu', tvm_multilib)
-        // compiler test
-        sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
-        make(ci_gpu, 'build2', '-j2')
+    parallel 'BUILD: GPU': {
+      node('GPUBUILD') {
+        ws(per_exec_ws('tvm/build-gpu')) {
+          init_git()
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh"
+          make(ci_gpu, 'build', '-j2')
+          pack_lib('gpu', tvm_multilib)
+          // compiler test
+          sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
+          make(ci_gpu, 'build2', '-j2')
+        }
       }
-    }
   },
   'BUILD: CPU': {
-    node('CPU') {
-      ws(per_exec_ws("tvm/build-cpu")) {
-        init_git()
-        sh "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh"
-        make(ci_cpu, 'build', '-j2')
-        pack_lib('cpu', tvm_multilib_tsim)
-        timeout(time: max_time, unit: 'MINUTES') {
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_ci_setup.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_fsim.sh"
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh"
-          // sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
-          // TODO(@jroesch): need to resolve CI issue will turn back on in follow up patch
-          sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
-          junit "build/pytest-results/*.xml"
+    if (docs == 1) {

Review comment:
       It seems a bit tedious to add this guard everywhere. It would be better to define a stage list and only we only run these stages when this flag is true. However, I'm not a Jenkins expect so I'm not sure if this can be done. Maybe others can comment.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org