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/17 16:51:47 UTC

[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`

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