Skip to content

Commit d7b9b16

Browse files
committed
fix various problems
1 parent dc446d6 commit d7b9b16

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

crates/xtask/src/main.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ impl Features {
167167

168168
impl std::fmt::Display for Features {
169169
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
170-
if &Self::all_features() == self {
171-
return write!(f, "all");
172-
}
173170
for (i, feature) in self.0.iter().sorted().enumerate() {
174171
if i > 0 {
175172
write!(f, ",")?;
@@ -298,10 +295,14 @@ impl App {
298295
CiMatrixRow {
299296
command: self.clone().into_command_string().into_string().unwrap(),
300297
name: format!(
301-
"{}({}) - {}",
298+
"{}({}) - {}",
302299
self.subcmd.as_ref(),
303300
os,
304-
self.global_args.features
301+
if self.global_args.features == Features::all_features() {
302+
"all features".to_owned()
303+
} else {
304+
self.global_args.features.to_string()
305+
}
305306
),
306307
os,
307308
}
@@ -473,22 +474,25 @@ impl Xtasks {
473474
// we don't need to verify all feature flags on all platforms, this is mostly a "does it compile" check
474475
// for finding out missing compile time logic or bad imports
475476
multi_os_steps
476-
.retain(|e| !e.command.contains("build") && !e.command.contains("docs"));
477+
.retain(|e| !e.command.contains(" build") && !e.command.contains(" docs"));
477478

478479
let mut macos_matrix = multi_os_steps.clone();
479480
let mut windows_matrix = multi_os_steps.clone();
480481

481482
for row in macos_matrix.iter_mut() {
482483
row.os = "macos-latest".to_owned();
484+
row.name = row.name.replace("ubuntu-latest", "macos-latest");
483485
}
484486

485487
for row in windows_matrix.iter_mut() {
486488
row.os = "windows-latest".to_owned();
489+
row.name = row.name.replace("ubuntu-latest", "windows-latest");
487490
}
488491

489492
matrix.extend(macos_matrix);
490493
matrix.extend(windows_matrix);
491494

495+
matrix.sort_by_key(|e| e.name.to_owned());
492496
let json = serde_json::to_string_pretty(&matrix)?;
493497
return Ok(json);
494498
}

0 commit comments

Comments
 (0)