You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "areusch (via GitHub)" <gi...@apache.org> on 2023/04/06 18:48:26 UTC
[GitHub] [tvm] areusch opened a new pull request, #14520: Update build status stamp to include all builds
areusch opened a new pull request, #14520:
URL: https://github.com/apache/tvm/pull/14520
Previous build status stamp referenced a now-defunct Jenkins build.
@junrushao @driazati @leandron @Liam-Sturge
--
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] driazati commented on a diff in pull request #14520: Update build status stamp to include all builds
Posted by "driazati (via GitHub)" <gi...@apache.org>.
driazati commented on code in PR #14520:
URL: https://github.com/apache/tvm/pull/14520#discussion_r1160146021
##########
ci/jenkins/generate.py:
##########
@@ -150,14 +151,57 @@ def update_jenkinsfile(source: Path) -> ChangeData:
return ChangeData(diff=diff, content=new_content, source=source, destination=destination)
+AUTOGENERATED_RE = re.compile(r'(^<!--- (?:END )?AUTOGENERATED DO NOT EDIT --->$)', re.MULTILINE)
+
+
+AUTOGENERATED_START_LINE = '<!--- AUTOGENERATED DO NOT EDIT --->'
+AUTOGENERATED_END_LINE = '<!--- END AUTOGENERATED DO NOT EDIT --->'
+
+
+BADGE_LINE_TEMPLATE = (
+ '[![{build_name}]'
+ '(https://ci.tlcpack.ai/buildStatus/icon?job=tvm-{build_name}%2fmain&subject={build_name})]'
+ '(https://ci.tlcpack.ai/job/tvm-{build_name}/job/main/)'
+)
+
+def update_readme(sources):
+ readme_path = REPO_ROOT / "README.md"
+ with open(readme_path) as readme_f:
+ readme = readme_f.read()
+
+ parts = AUTOGENERATED_RE.split(readme)
+ if (len(parts) != 5 or
+ parts[1] != AUTOGENERATED_START_LINE or
+ parts[3] != AUTOGENERATED_END_LINE):
+ print(r"README.md didn't split properly: {parts!r}")
+ sys.exit(2)
+
+ def _to_jenkins_name(src):
+ """Produce the varying part of the name of the Jenkins build for a Jenkinsfile.
+
+ e.g. given path/to/foo_bar_jenkinsfile.groovy.j2, returns foo-bar to correspond to
+ a Jenkins build named tvm-foo-bar.
+ """
+ return str(src.stem)[:-len("_jenkinsfile.groovy")].replace("_", "-")
+
+ lines = (
+ [''] + # preserve leading \n
+ [BADGE_LINE_TEMPLATE.format(build_name=_to_jenkins_name(n)) for n in sorted(sources)] +
+ [''] # preserve trailing \n
+ )
+ parts[2] = '\n'.join(lines)
+
+ with open(readme_path, "w") as readme_f:
+ readme_f.write(''.join(parts))
+
if __name__ == "__main__":
help = "Regenerate Jenkinsfile from template"
parser = argparse.ArgumentParser(description=help)
parser.add_argument("--force", action="store_true", help="always overwrite timestamp")
parser.add_argument("--check", action="store_true", help="just verify the output didn't change")
Review Comment:
Can you also integrate the stuff into `--check` so lint will error if the README hasn't been regenerated?
--
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] tvm-bot commented on pull request #14520: Update build status stamp to include all builds
Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #14520:
URL: https://github.com/apache/tvm/pull/14520#issuecomment-1499478933
<!---bot-comment-->
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
<!--bot-comment-ccs-start-->
* No users to auto-tag found, no teams are specified in PR title <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
<sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>
--
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
Re: [PR] Update build status stamp to include all builds [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed pull request #14520: Update build status stamp to include all builds
URL: https://github.com/apache/tvm/pull/14520
--
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