Skip to content

fix(ci): run uniffi-bindgen from the Rust workspace in the Windows wheel script - #246

Merged
Nic-dorman merged 1 commit into
mainfrom
nic/fix-windows-bindgen-cwd
Sep 3, 2026
Merged

fix(ci): run uniffi-bindgen from the Rust workspace in the Windows wheel script#246
Nic-dorman merged 1 commit into
mainfrom
nic/fix-windows-bindgen-cwd

Conversation

@Nic-dorman

Copy link
Copy Markdown
Member

First real run of the Windows wheel leg (dispatch 33760245735, publish=testpypi) failed in step 3/6:

error running cargo metadata
error: could not find Cargo.toml in D:\a\ant-sdk\ant-sdk or any parent directory

uniffi-bindgen runs cargo metadata from the current directory. Both bash wheel scripts invoke it from inside ffi/rust (macOS via cd $RUST_DIR, manylinux inside the container at /io/rust), but the PowerShell script Pop-Locations back to the repo root — no Cargo.toml there — before generating bindings. Fix: wrap the bindgen call in Push-Location $RustDir / Pop-Location, preserving the exit code across the pop.

The same dispatch validated the rest of the pipeline: linux-x86_64, linux-aarch64 (first run), and macOS universal2 all built, install/import/version-checked, and Publish was correctly skipped on the matrix failure. Re-dispatching publish=testpypi after this lands exercises the full four-leg matrix again.

🤖 Generated with Claude Code

…eel script

uniffi-bindgen invokes cargo metadata from the current directory. The
bash wheel scripts happen to run it from inside ffi/rust (via cd), but
the PowerShell script Pop-Locations back to the repo root — which has no
Cargo.toml — before generating bindings, so the first real Windows CI
run failed with 'could not find Cargo.toml'. The other three matrix legs
built and checked green in the same run (33760245735).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Nic-dorman
Nic-dorman merged commit ad324ae into main Sep 3, 2026
3 checks passed
@Nic-dorman
Nic-dorman deleted the nic/fix-windows-bindgen-cwd branch September 3, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant