-
-
Notifications
You must be signed in to change notification settings - Fork 60
Support changing working directory #6
Comments
Sounds like a good idea to add, smth like - uses: actions-rs/cargo@v1
with:
cwd: ./sub-folder
command: build I'll try to add it tomorrow |
Btw, @jgrund, can you elaborate a little bit on your case? Do you have a cargo workspace or rust project is just laying in a sub-folder of repository root? |
I have a top-level workspace, and then a workspace in a subfolder within the same project. The workspaces are not tied together by cargo (one is backend code, one is wasm front-end code), so I can't use |
@jgrund I researched it for a bit and found the |
|
Here's an example of Could this issue be reopened? |
@nelsonjchen You should be able to do:
... instead of needing to change the working directory. (Edit: Fixed suggestion as nelsonjchen pointed out.) |
@Arnavion I had to use Thanks! |
I also ran into this issue. A proper |
This tripped me up a bit today too. |
I ran into this today myself while working on using actions for CI on a complex workspace. I would much prefer working_directory here. |
Chiming in with another +1. While the work-around works... the purpose of using a package it to have the workflow be more elegant. Adding support for |
The workaround doesn't seem to work with Specifically I'm doing:
And it fails in an error about musl-gcc. |
As a workaround you can use my fork like so:
I added a PR here: #59 |
@MarcoPolo does your change works correctly with |
Yes |
Just to chime in with another use case for My repo has an embedded project in |
FYI, we're also using @MarcoPolo's fork in conjunction with It'd sure be nice if #59 got merged! |
This is still something that will help greatly at 2021. @svartalf possible to merge the PR or add the existing way to the docs? |
Changing the working directory would also mean picking up any |
Hello ! I am affected by this too. Could this issue be reopened ? |
See actions-rs/cargo#6 for more
See actions-rs/cargo#6 for more
This is not a suitable replacement, as the |
I am unable to use |
Also noting that an actual |
The action-rs plugin doesn't support the working-directory syntax we were trying to use. This commit fixes the hook by using a workaround[1]. We would previously see errors like this in CI: Warning: Unexpected input(s) 'working-directory', valid inputs are ['command', 'toolchain', 'args', 'use-cross'] Run actions-rs/cargo@v1 /home/runner/.cargo/bin/cargo test error: could not find `Cargo.toml` in `/home/runner/work/redpanda/redpanda` or any parent directory Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101 [1] actions-rs/cargo#6 (comment)
So cargo commands can be run in subdirectories.
The text was updated successfully, but these errors were encountered: