Skip to content

Commit 73548c1

Browse files
committed
[bfops/parallel-smoketests]: Pre-build in non-parallel case too
1 parent 75b47ac commit 73548c1

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

tools/ci/src/main.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,16 @@ fn main() -> Result<()> {
362362
}
363363
};
364364

365+
if matches!(start_server, StartServer::Yes { .. }) {
366+
println!("Building SpacetimeDB..");
367+
368+
// Pre-build so that `cargo run -p spacetimedb-cli` will immediately start. Otherwise we risk starting the tests
369+
// before the server is up.
370+
// TODO: The `cargo run` invocation still seems to rebuild a bunch? investigate.. maybe we infer the binary path from cargo metadata.
371+
bash!("cargo build -p spacetimedb-cli -p spacetimedb-standalone")?;
372+
args.push("--no-build-cli".into());
373+
}
374+
365375
if parallel {
366376
println!("Listing smoketests for parallel execution..");
367377

@@ -407,14 +417,6 @@ fn main() -> Result<()> {
407417
})
408418
.collect();
409419

410-
if matches!(start_server, StartServer::Yes { .. }) {
411-
// Pre-build so that `cargo run -p spacetimedb-cli` will immediately start. Otherwise we risk starting the tests
412-
// before the server is up.
413-
// TODO: The `cargo run` invocation still seems to rebuild a bunch? investigate.. maybe we infer the binary path from cargo metadata.
414-
bash!("cargo build -p spacetimedb-cli -p spacetimedb-standalone")?;
415-
args.push("--no-build-cli".into());
416-
}
417-
418420
// Run each batch in parallel threads.
419421
let mut handles = Vec::new();
420422
for batch in batches {

0 commit comments

Comments
 (0)