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-ffi.git
The following commit(s) were added to refs/heads/main by this push:
new b310f9c8 [CI] Pass the venv Python to the Rust stubgen example build
(#868)
b310f9c8 is described below
commit b310f9c88eb89551acc27cbf62bf91ac573e81fa
Author: Linzhang Li <[email protected]>
AuthorDate: Thu Oct 22 13:56:38 2026 -0400
[CI] Pass the venv Python to the Rust stubgen example build (#868)
## Summary
Fix the `Run rust stubgen example` step on `ubuntu-latest`. On the new
ubuntu-26.04 runner image it fails to configure
## Cause
`ubuntu-latest` moved from ubuntu-24.04 to ubuntu-26.04. The new image
ships
CMake 4.4.4 (previously 3.31.6) and a system Python 3.14.
From CMake 4.4, FindPython defaults `Python_FIND_ABI` to
`ANY;ANY;ANY;OFF` on
POSIX, so it rejects the job's free-threaded (3.14t) venv interpreter as
"Wrong ABI" and falls back to `/usr/bin/python3.14`, which has no
tvm_ffi.
CMake 3.31 checked the ABI only when `Python_FIND_ABI` was set, so the
venv
interpreter was found.
The step had not run on the new image before: until #865, every
`ubuntu-latest` job stopped earlier at the GCC 15.2 ICE in `Run cpp
tests`.
---
.github/workflows/ci_test.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml
index a4d9bf36..4dcb3902 100644
--- a/.github/workflows/ci_test.yml
+++ b/.github/workflows/ci_test.yml
@@ -211,13 +211,16 @@ jobs:
# Build the Rust stubgen example against the installed package. Its
post-build
# step refreshes the bindings in place, so a diff means the checked-in
file was stale.
+ # Pass the venv interpreter explicitly: from CMake 4.4, FindPython skips
free-threaded
+ # interpreters (3.14t) by default and would pick a system Python without
tvm_ffi.
- name: Run rust stubgen example
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: examples/rust_stubgen
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ steps.env_vars.outputs.cpu_count }}
run: |
- cmake -B build -DCMAKE_BUILD_TYPE=Release
+ cmake -B build -DCMAKE_BUILD_TYPE=Release \
+ -DPython_EXECUTABLE="$(which python)"
-DPython3_EXECUTABLE="$(which python)"
cmake --build build
git diff --exit-code -- rust/src/generated
cd rust && cargo run