-
Notifications
You must be signed in to change notification settings - Fork 932
Add cargo-make support #4191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cargo-make support #4191
Changes from all commits
d8b0667
bc9830d
d874d22
2cd490e
51a253f
5afb11f
cfd31cf
f7b4066
cd2f3bc
0a91575
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This Makefile.toml defines common tasks and settings used in the rustfmt project. | ||
|
||
[env] | ||
CFG_RELEASE = { value = "nightly", condition = { env_not_set = ["CFG_RELEASE"] } } | ||
CFG_RELEASE_CHANNEL = { value = "nightly", condition = { env_not_set = ["CFG_RELEASE_CHANNEL"] } } | ||
|
||
[tasks.b] | ||
alias = "build" | ||
|
||
[tasks.c] | ||
alias = "check" | ||
|
||
[tasks.t] | ||
alias = "test" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
extend = ".cargo/Makefile.toml" | ||
|
||
[tasks.build] | ||
clear = true | ||
command = "cargo" | ||
args = [ | ||
"build", | ||
"--manifest-path", | ||
"rustfmt-core/Cargo.toml", | ||
"--workspace", | ||
] | ||
|
||
[tasks.install] | ||
command = "cargo" | ||
args = [ | ||
"install", | ||
"--path", | ||
".", | ||
"--force", | ||
"--locked", | ||
] | ||
|
||
[tasks.test] | ||
clear = true | ||
run_task = { name = ["test-bin", "test-lib"] } | ||
|
||
[tasks.test-bin] | ||
env = { "RUSTFMT_MAKE_MANIFEST_PATH" = "rustfmt-core/rustfmt-bin/Cargo.toml" } | ||
run_task = "test-subproject" | ||
|
||
[tasks.test-lib] | ||
env = { "RUSTFMT_MAKE_MANIFEST_PATH" = "rustfmt-core/rustfmt-lib/Cargo.toml" } | ||
run_task = "test-subproject" | ||
|
||
[tasks.test-subproject] | ||
condition = { env_set = ["RUSTFMT_MAKE_MANIFEST_PATH"] } | ||
script_runner = "@shell" | ||
script = [ | ||
"cargo test --manifest-path ${RUSTFMT_MAKE_MANIFEST_PATH}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems the Windows jobs aren't substituting here though seems right to me based on a cursory reading of the cargo make docs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we need to change |
||
"cargo test --manifest-path ${RUSTFMT_MAKE_MANIFEST_PATH} -- --ignored", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extend = { path = "../.cargo/Makefile.toml" } | ||
|
||
[env] | ||
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = "true" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extend = { path = "../Makefile.toml" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extend = { path = "../Makefile.toml" } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extend = { path = "../Makefile.toml" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth trying the GitHub Actions (https://github.com/sagiegurari/cargo-make#usage-ci-github-actions or https://github.com/marketplace/actions/rust-cargo-make) approach for grabbing
cargo-make
to see if that speeds things upThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the advice! I have added rustc-cargo-make action.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, unfortunately, it looks like the rustc-cargo-make does not pick up the latest cargo-make even when told to do so 🤔 I will just use
cargo install
approach for now.