mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #297] Getting "cargo is not installed by default for some virtual environments", while using the correct toolchain action #209
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vmalloc on GitHub (Jun 29, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/297
My workflow is something like this:
This workflow works great on GH actions, but run with
act, I get errors. Mainly:@siedentop commented on GitHub (Jul 22, 2020):
Same. I get
| /github/workflow/1: line 2: cargo: command not foundwith just the basic Rust workflow (without using the actions-rs action).This is the file:
EDIT: I saw that this is a "pinned issue". (Didn't know this existed) Which explains what I see.
@siedentop commented on GitHub (Jul 23, 2020):
Solution: Provide the correct runner image. Either provide
-P ...on the command line, or provide it in the.actrcfile:.actrc:Tested with:
cargo buildcommand I posted above.action-rsaction.For just
cargo buildtherust:latestimage works. But theaction-rsalso needs node support. I decided to trade simplicity (using nektos' image) for disk space.@stackedsax commented on GitHub (Jul 31, 2020):
@siedentop should that be:
@tmcguire commented on GitHub (Aug 12, 2020):
I have the same problem. Using
-P ubuntu-latest=nektos/act-environments-ubuntu:18.04didn't help in my case. And it shouldn't be needed, as I useactions-rs/toolchain@v1to install rustup and cargo manually, just like @vmalloc does.What confuses me is that
rustup show active-toolchain,rustup which cargo,which cargoandcargo -vall work correctly, so I wonder whyactions-rs/clippy-check@v1doesn't find cargo. Internally,actions-rs/clippy-check@v1useswhich cargoto check for the presence of cargo (seegithub.com/actions-rs/core@1b3bf36903/src/commands/cargo.ts (L31)), so it's strange that it doesn't work.@github-actions[bot] commented on GitHub (Oct 12, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@regexident commented on GitHub (Oct 12, 2020):
This issue persists to this day, making act unusable for many rust projects, and thus shouldn't be closed, I think.
@mandrean commented on GitHub (Oct 12, 2020):
If I put this in my
.actrc:Then run
act:My computer fans spin up like crazy. Worse than compiling a large crate. And it doesn't progress any further than
Start image=...@github-actions[bot] commented on GitHub (Dec 12, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@Skallwar commented on GitHub (Jul 7, 2021):
It does for me, I waited around 10 minutes
@fadeevab commented on GitHub (Jan 5, 2022):
This works for me:
act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:rust-latestWait until it silently downloads the docker image.
@injectedfusion commented on GitHub (Nov 29, 2022):
Thank you for this. This worked for me.