-
-
Notifications
You must be signed in to change notification settings - Fork 60
Running cargo commands in a subdirectory? #86
Comments
This is also needed if you have a workspace project and want to tests with feature flags:
|
Actually, while digging through the source, I suspect this is an actual bug in https://github.com/actions/toolkit. If you look at this comment, it states that if cwd is unset, it defaults to the current working directory, which is set by the |
Perhaps this works?
|
This works around this issue. Nevertheless I think this is a bug. |
I could also use a way to run cargo commands from a subdirectory, especially when using |
I have a same requirement as to publish crates onto crates.io in a workspace through an action trigger. |
So it seems we are waiting for #59 to be merged. |
Use --manifest-path to specify the path to Cargo.yaml
* AVRO-3175 Rust: fix lint/clippy errors Fix all linting/clippy errors & warnings. Add build.sh for Rust that currently supports clean, dist, lint and test targets * INFRA-22085 Test actions-rs * AVRO-3175 Build with all features enabled * AVRO-3175 Change working folder to lang/rust * AVRO-3175 Set working folder to lang/avro for GHA * [squash] Debug pwd * AVRO-3175 Workaround actions-rs/cargo#86 Use --manifest-path to specify the path to Cargo.yaml * AVRO-3175 Format the code with `cargo fmt --all --" This should fix the Github Actions CI workflow * AVRO-3175 Specify the path to Cargo.yaml for clippy
* AVRO-3175 Rust: fix lint/clippy errors Fix all linting/clippy errors & warnings. Add build.sh for Rust that currently supports clean, dist, lint and test targets * INFRA-22085 Test actions-rs * AVRO-3175 Build with all features enabled * AVRO-3175 Change working folder to lang/rust * AVRO-3175 Set working folder to lang/avro for GHA * [squash] Debug pwd * AVRO-3175 Workaround actions-rs/cargo#86 Use --manifest-path to specify the path to Cargo.yaml * AVRO-3175 Format the code with `cargo fmt --all --" This should fix the Github Actions CI workflow * AVRO-3175 Specify the path to Cargo.yaml for clippy
* CHORE: re-org years * CHORE: fix ci? settings working-directory using '--manifest-path' actions-rs/cargo#86 (comment) * CHORE: oops, forgot build.yml
I also expected this to use defaults:
run:
working-directory: my-rust-project As the working directory for where |
Is there a way to do this? I cannot set the manifest path as that's not the directory I wish to run |
@lpil yes, as others stated you could use the
|
it'd still be neat to have this! |
- Fix typos in CI yaml - Due to actions-rs/cargo#86 the cargo actions cannot be configured to run in the `compiler/` dir, so it's easier to just move the compiler into the root of the repo.
Do the checklist before filing an issue:
actions-rs
Actions?If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.saobby.my.eu.orgmunity
Motivation
My understanding is this github action only supports running cargo commands from the root of the repo. Is it possible to run cargo commands from a subdirectory? The motivation is that I have a monorepo that has projects that use different languages. I'd like to run cargo commands only for the rust projects.
Additional context
I've tried to set "working-directory" at the top level but that didn't seem to work.
The text was updated successfully, but these errors were encountered: