Skip to content

VectorCraft: An open-source, vector art tool written by scratch in pure Rust

ci(xtask): print the i18n report without recompiling the workspace (#5001)

FredApps217c01836be1
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 0516321ab..de6ff5815 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -294,7 +294,7 @@ fn cmd_ci() -> Result<(), String> {
("assets", Box::new(|| assets::run(&root()))),
("brands", Box::new(|| brands::run(&root()))),
("cursors", Box::new(|| cursors::run(&root()))),
- ("i18n-report", Box::new(cmd_i18n_report)),
+ ("i18n-report", Box::new(cmd_ci_i18n_report)),
("layers", Box::new(cmd_layers)),
("wasm", Box::new(cmd_wasm)),
];
@@ -349,3 +349,13 @@ fn cmd_i18n_report() -> Result<(), String> {
c.args(["test", "-p", "vectorcraft-ui-egui", "--lib", "--", "i18n::tests::untranslated_report", "--exact", "--nocapture"]);
run(c, "cargo test -p vectorcraft-ui-egui --lib -- i18n::tests::untranslated_report --exact --nocapture")
}
+
+/// [`cmd_i18n_report`] in `ci`, selecting the packages and targets the test stage did so it
+/// reuses that build: with `-p vectorcraft-ui-egui --lib` alone cargo resolves features
+/// differently and recompiled for about 3.5 minutes. Every other test binary runs with no test
+/// matching the filter.
+fn cmd_ci_i18n_report() -> Result<(), String> {
+ let mut c = cargo();
+ c.args(["test", "--workspace", "--lib", "--bins", "--tests", "--", "i18n::tests::untranslated_report", "--exact", "--nocapture"]);
+ run(c, "cargo test --workspace --lib --bins --tests -- i18n::tests::untranslated_report --exact --nocapture")
+}