From 51c536342172bbe366f4be1286689750e1ac1442 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 25 Nov 2022 15:16:53 +0000 Subject: [PATCH] . --- xtask/src/main.rs | 80 +++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 2a5b66d..b3e2377 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -5,50 +5,50 @@ use std::time::Instant; use xshell::{cmd, Shell}; -const MSRV: &str = "1.56.0"; +// const MSRV: &str = "1.56.0"; fn main() -> xshell::Result<()> { let sh = Shell::new()?; let _e = push_toolchain(&sh, "stable")?; - { - let _s = section("BUILD"); - cmd!(sh, "cargo test --workspace --no-run").run()?; - } - - { - let _s = section("TEST"); - - for &release in &[None, Some("--release")] { - cmd!(sh, "cargo test --features unstable {release...}").run()?; - cmd!( - sh, - "cargo test --no-default-features --features unstable,std,parking_lot {release...}" - ) - .run()?; - } - - // Skip doctests for no_std tests as those don't work - cmd!(sh, "cargo test --no-default-features --features unstable --test it").run()?; - cmd!(sh, "cargo test --no-default-features --features unstable,alloc --test it").run()?; - - cmd!(sh, "cargo test --no-default-features --features critical-section").run()?; - cmd!(sh, "cargo test --features critical-section").run()?; - } - - { - let _s = section("TEST_BETA"); - let _e = push_toolchain(&sh, "beta")?; - cmd!(sh, "cargo test --features unstable").run()?; - } - - { - let _s = section("TEST_MSRV"); - let _e = push_toolchain(&sh, MSRV)?; - sh.copy_file("Cargo.lock.msrv", "Cargo.lock")?; - cmd!(sh, "cargo build").run()?; - } + // { + // let _s = section("BUILD"); + // cmd!(sh, "cargo test --workspace --no-run").run()?; + // } + + // { + // let _s = section("TEST"); + + // for &release in &[None, Some("--release")] { + // cmd!(sh, "cargo test --features unstable {release...}").run()?; + // cmd!( + // sh, + // "cargo test --no-default-features --features unstable,std,parking_lot {release...}" + // ) + // .run()?; + // } + + // // Skip doctests for no_std tests as those don't work + // cmd!(sh, "cargo test --no-default-features --features unstable --test it").run()?; + // cmd!(sh, "cargo test --no-default-features --features unstable,alloc --test it").run()?; + + // cmd!(sh, "cargo test --no-default-features --features critical-section").run()?; + // cmd!(sh, "cargo test --features critical-section").run()?; + // } + + // { + // let _s = section("TEST_BETA"); + // let _e = push_toolchain(&sh, "beta")?; + // cmd!(sh, "cargo test --features unstable").run()?; + // } + + // { + // let _s = section("TEST_MSRV"); + // let _e = push_toolchain(&sh, MSRV)?; + // sh.copy_file("Cargo.lock.msrv", "Cargo.lock")?; + // cmd!(sh, "cargo build").run()?; + // } { let _s = section("TEST_MIRI"); @@ -58,6 +58,10 @@ fn main() -> xshell::Result<()> { sh.remove_path("./target")?; cmd!(sh, "rustup component add miri").run()?; + cmd!(sh, "cargo --version").run()?; + let cargo = sh.var("CARGO"); + eprintln!("cargo = {:?}", cargo); + cmd!(sh, "cargo miri --version").run()?; cmd!(sh, "cargo miri setup").run()?; cmd!(sh, "cargo miri test --features unstable").run()?; }