ci: cross-compile Windows Bazel tests

This commit is contained in:
Michael Bolin
2026-05-01 13:31:27 -07:00
parent aed74e5ee4
commit 79a259e476
15 changed files with 404 additions and 84 deletions
+2 -6
View File
@@ -34,6 +34,7 @@ where
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::future::pending;
use std::time::Duration;
use tokio::task;
use tokio::time::sleep;
@@ -58,12 +59,7 @@ mod tests {
token_clone.cancel();
});
let result = async {
sleep(Duration::from_millis(100)).await;
7
}
.or_cancel(&token)
.await;
let result = pending::<i32>().or_cancel(&token).await;
cancel_handle.await.expect("cancel task panicked");
assert_eq!(Err(CancelErr::Cancelled), result);
@@ -50,6 +50,10 @@ fn pwsh_path() -> Option<PathBuf> {
}
fn sandbox_cwd() -> PathBuf {
if let Ok(workspace_root) = std::env::var("INSTA_WORKSPACE_ROOT") {
return PathBuf::from(workspace_root);
}
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.expect("repo root")