rust-tool-cache: Replace cargo-binstall action with install script#79
Open
makubacki wants to merge 1 commit intoOpenDevicePartnership:mainfrom
Open
Conversation
The "Install cargo-binstall" step previously used the `cargo-bins/cargo-binstall` action to install cargo-binstall on a cache miss. This action fails to run successfully in a container environment. (e.g. with ghcr.io/microsoft/mu_devops/ubuntu-24-test:latest): ``` bash: /home/runner/work/_actions/cargo-bins/cargo-binstall/v1.17.5/install-from-binstall-release.sh: No such file or directory ```` As far as I can tell, this was not an issue before because all workflows that used the action were running directly on github-hosted runners (not containers). Because the action is JavaScript, it runs in a slightly separate context from the container shell and calls within the action are modifying the action runner host environment rather than the container environment. Future workflows will build Rust code and run QEMU in the same container environment. This change simplifies binstall installation by replacing the action with the official cargo-binstall install script delivered with curl. This approach: - Is container-agnostic: the script installs directly into the cargo bin directory without relying on runner-specific tooling or JavaScript action infrastructure - Removes maintenance of an action dependency - Works on both Linux and Windows runners - GitHub Windows runners have bash support Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
os-d
approved these changes
Feb 18, 2026
berlin-with0ut-return
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Install cargo-binstall" step previously used the
cargo-bins/cargo-binstallaction to install cargo-binstall on a cache miss.This action fails to run successfully in a container environment. (e.g. with ghcr.io/microsoft/mu_devops/ubuntu-24-test:latest):
As far as I can tell, this was not an issue before because all workflows that used the action were running directly on github-hosted runners (not containers). Because the action is JavaScript, it runs in a slightly separate context from the container shell and calls within the action are modifying the action runner host environment rather than the container environment.
Future workflows will build Rust code and run QEMU in the same container environment.
This change simplifies binstall installation by replacing the action with the official cargo-binstall install script delivered with curl. Following the command given in https://github.com/cargo-bins/cargo-binstall?tab=readme-ov-file#linux-and-macos.
This approach: