This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-tirx.git


The following commit(s) were added to refs/heads/main by this push:
     new 85619f4e9 [CI] Take the final tvm-ffi release when its candidate 
shares the commit (#246)
85619f4e9 is described below

commit 85619f4e9e4ec66b1bd486f36f234a3ba9df3012
Author: Tianqi Chen <[email protected]>
AuthorDate: Fri Nov 13 18:40:10 2026 -0500

    [CI] Take the final tvm-ffi release when its candidate shares the commit 
(#246)
    
    tvm-ffi tags a release on the commit of its last release candidate, so
    `3rdparty/tvm-ffi` at the v0.1.16 commit matches both `v0.1.16` and
    `v0.1.16-rc4`. `detect_tvm_ffi_version.py` required exactly one matching
    tag and failed the crate publish. It now takes the final release when
    exactly one of the matching tags is one, and keeps requiring a single
    tag otherwise.
---
 ci/wheel/detect_tvm_ffi_version.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ci/wheel/detect_tvm_ffi_version.py 
b/ci/wheel/detect_tvm_ffi_version.py
index cf2bc41db..7df1227c6 100644
--- a/ci/wheel/detect_tvm_ffi_version.py
+++ b/ci/wheel/detect_tvm_ffi_version.py
@@ -34,7 +34,7 @@ VERSION_PATTERN = 
r"[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]
 
 
 def detect_version(root):
-    """Resolve the committed submodule to exactly one upstream release tag."""
+    """Resolve the committed submodule to its upstream release tag."""
     submodule = subprocess.check_output(
         ["git", "rev-parse", "HEAD:3rdparty/tvm-ffi"], cwd=root, text=True
     ).strip()
@@ -53,6 +53,10 @@ def detect_version(root):
         if re.fullmatch("refs/tags/v" + VERSION_PATTERN, ref)
         and refs.get(ref + "^{}", sha) == submodule
     )
+    # A release is tagged on its last candidate's commit; the release wins.
+    releases = [version for version in versions if "-" not in 
version.split("+")[0]]
+    if len(releases) == 1:
+        return releases[0]
     if len(versions) != 1:
         raise SystemExit(
             f"3rdparty/tvm-ffi at {submodule} must match exactly one 
apache/tvm-ffi "

Reply via email to