Skip to content

ci: install cbindgen with cargo install, not cargo-binstall - #190

Merged
kingchenc merged 1 commit into
mainfrom
ci/cbindgen-cargo-install
Oct 27, 2026
Merged

kingchenc merged 1 commit into
mainfrom
ci/cbindgen-cargo-install

Conversation

@kingchenc

Copy link
Copy Markdown
Contributor

The C ABI job installs cbindgen with taiki-e/install-action, which ships no prebuilt cbindgen and falls back to cargo-binstall. From v2.87.29 on, the job fails at random on macOS runners:

cargo-binstall already installed at /Users/runner/.install-action/bin/cargo-binstall, but is not compatible version with this action, upgrading
rm: /Users/runner/.install-action/bin/cargo-binstall: No such file or directory

The action finds a preinstalled cargo-binstall on PATH, sees a version other than its manifest's, and deletes ${cargo_bin}/cargo-binstall -- its own bin directory, not the path it found. When rustup on the runner lives in Homebrew, cargo_bin is the action's directory and the file is not there, so rm fails the step; when it lives in ~/.cargo/bin, the paths agree and it passes. v2.87.20 did not reach that branch because its manifest matched the preinstalled version.

fallback: cargo-install makes the action run cargo install --locked cbindgen instead, which never touches cargo-binstall. The same cbindgen version is installed (the latest), so the header drift check is unaffected; the cost is building cbindgen, about a minute per runner.

install-action falls back to cargo-binstall for cbindgen, and its upgrade
of a preinstalled cargo-binstall deletes the file under its own bin dir
rather than where it found it; on macOS runners with Homebrew rustup the
step dies on rm. cargo install never touches cargo-binstall.
@kingchenc
kingchenc enabled auto-merge (squash) October 27, 2026 03:15
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kingchenc
kingchenc merged commit 0446a3a into main Oct 27, 2026
66 checks passed
@kingchenc
kingchenc deleted the ci/cbindgen-cargo-install branch October 28, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant