Skip to content

Commit 731cc91

Browse files
committed
Makefile.toml: Add new cargo make tasks
Add the following tasks: - `doc` - To build docs. - `doc-open` - To build and open docs. - `fmt` - To run fmt. - `all` - To run all cargo make tasks used in CI. Signed-off-by: Michael Kubacki <[email protected]>
1 parent abe067c commit 731cc91

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.sync/rust_config/Makefile.toml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TARGET_TRIPLE = { source = "${ARCH}", mapping = { "X64" = "x86_64-unknown-uefi",
1010
CARGO_FEATURES_FLAG = {value = "--features ${FEATURES}", condition = {env_set = ["FEATURES"], env_true = ["FEATURES"]}}
1111
BUILD_FLAGS = "--profile ${RUSTC_PROFILE} --target ${TARGET_TRIPLE} -Zbuild-std=core,compiler_builtins,alloc -Zbuild-std-features=compiler-builtins-mem -Zunstable-options --timings=html"
1212
TEST_FLAGS = { value = "", condition = { env_not_set = ["TEST_FLAGS"] } }
13-
COV_FLAGS = { value = "--out html --exclude-files **/tests/*", condition = { env_not_set = ["COV_FLAGS"] } }
13+
COV_FLAGS = { value = "--out html --out xml --exclude-files **/tests/*", condition = { env_not_set = ["COV_FLAGS"] } }
1414

1515
[env.development]
1616
RUSTC_PROFILE = "dev"
@@ -75,6 +75,23 @@ command = "cargo"
7575
args = ["check", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "@@split(BUILD_FLAGS, )", "--message-format=json"]
7676
dependencies = ["individual-package-targets"]
7777

78+
[tasks.doc]
79+
description = "Builds all rust documentation in the workspace. Example `cargo make doc`"
80+
command = "cargo"
81+
args = ["doc", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )"]
82+
83+
[tasks.doc-open]
84+
description = "Builds all rust documentation in the workspace and opens the documentation. Example `cargo make doc-open`"
85+
clear = true
86+
command = "cargo"
87+
args = ["doc", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "--open"]
88+
89+
[tasks.fmt]
90+
description = "Run cargo format."
91+
clear = true
92+
command = "cargo"
93+
args = ["fmt", "--all"]
94+
7895
[tasks.test]
7996
description = "Builds all rust tests in the workspace. Example `cargo make test`"
8097
clear = true
@@ -94,3 +111,14 @@ description = "Run cargo clippy."
94111
clear = true
95112
command = "cargo"
96113
args = ["clippy", "--all-targets", "--", "-D", "warnings"]
114+
115+
[tasks.all]
116+
description = "Run all tasks for PR readiness."
117+
dependencies = [
118+
"clippy",
119+
"fmt",
120+
"build",
121+
"test",
122+
"coverage",
123+
"doc",
124+
]

0 commit comments

Comments
 (0)