Skip to content

Commit

Permalink
Test without default features in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Mar 6, 2024
1 parent abe78e5 commit f330108
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions xtask/tests/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ fn main() {

// Build-test every HAL.
for (hal, target) in HALS {
let mut cargo = Command::new("cargo");
let toml_path = format!("{}/Cargo.toml", hal);
// With default features.
let mut cargo = Command::new("cargo");
let status = cargo
.args(&["build", "--manifest-path", &toml_path, "--target", target])
.status()
Expand All @@ -45,6 +46,25 @@ fn main() {
"command exited with error status: {:?}",
cargo
);
// Without default features.
let mut cargo = Command::new("cargo");
let status = cargo
.args(&[
"build",
"--manifest-path",
&toml_path,
"--target",
target,
//"--no-default-features",
])
.status()
.map_err(|e| format!("could not execute {:?}: {}", cargo, e))
.unwrap();
assert!(
status.success(),
"command exited with error status: {:?}",
cargo
);
}

// Build/Run doc-tests in `nrf-hal-common` for each chip.
Expand Down Expand Up @@ -104,11 +124,17 @@ fn main() {
}
}


let mut cargo = Command::new("cargo");
let toml_path = "nrf52840-hal-tests/Cargo.toml";
let status = cargo
.args(&["build", "--manifest-path", &toml_path, "--target", "thumbv7em-none-eabihf", "--tests"])
.args(&[
"build",
"--manifest-path",
&toml_path,
"--target",
"thumbv7em-none-eabihf",
"--tests",
])
.status()
.map_err(|e| format!("could not execute {:?}: {}", cargo, e))
.unwrap();
Expand Down

0 comments on commit f330108

Please sign in to comment.