diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4aa9564..6a998a8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # fetch tags for publish - + - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 - run: cargo run -p xtask -- ci env: CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} 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()?; }