From 9390026a2a95f0e8c1b4684ca012a590682c87d6 Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Wed, 9 Oct 2024 15:09:07 -0700 Subject: [PATCH] ci: load rust cache --- .github/workflows/smoke.yml | 3 +++ crates/bin/pmonitor/Cargo.toml | 2 +- crates/bin/pmonitor/tests/common/mod.rs | 1 + justfile | 7 ++++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 237b8135ec..37d13d09af 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -58,6 +58,9 @@ jobs: restore-prefixes-first-match: nix-${{ runner.os }}- backend: buildjet + - name: Load rust cache + uses: astriaorg/buildjet-rust-cache@v2.5.1 + # Confirm that the nix devshell is buildable and runs at all. - name: validate nix env run: nix develop --command echo hello diff --git a/crates/bin/pmonitor/Cargo.toml b/crates/bin/pmonitor/Cargo.toml index 6d1fe75c8f..71612426ba 100644 --- a/crates/bin/pmonitor/Cargo.toml +++ b/crates/bin/pmonitor/Cargo.toml @@ -18,7 +18,7 @@ colored = "2.1.0" directories = {workspace = true} futures = {workspace = true} indicatif = {workspace = true} -pcli = { path = "../pcli" } +pcli = {path = "../pcli", default-features = true} penumbra-app = {workspace = true} penumbra-asset = {workspace = true, default-features = false} penumbra-compact-block = {workspace = true, default-features = false} diff --git a/crates/bin/pmonitor/tests/common/mod.rs b/crates/bin/pmonitor/tests/common/mod.rs index e77ac2089b..59ed60ecd5 100644 --- a/crates/bin/pmonitor/tests/common/mod.rs +++ b/crates/bin/pmonitor/tests/common/mod.rs @@ -315,6 +315,7 @@ impl PmonitorTestRunner { .spawn() .expect("failed to execute devnet start cmd"); // Sleep a bit, to let network start + // TODO: use process-compose API to check for "Running" status on pd. std::thread::sleep(Duration::from_secs(8)); Ok(child) } diff --git a/justfile b/justfile index 4ecc0e9d79..d71bdb3abf 100644 --- a/justfile +++ b/justfile @@ -4,11 +4,12 @@ default: # Run integration tests for pmonitor tool test-pmonitor: - # warm cache - cargo build --release --bin pd - cargo run --release --bin pd -- network unsafe-reset-all || true + # prebuild cargo binaries required for integration tests + cargo -q build --bin pcli --bin pd --bin pmonitor + cargo -q run --release --bin pd -- network unsafe-reset-all rm -rf /tmp/pmonitor-integration-test cargo nextest run -p pmonitor --run-ignored=ignored-only --test-threads 1 + # cargo test -p pmonitor -- --ignored --test-threads 1 --nocapture # Creates and runs a local devnet with solo validator. Includes ancillary services # like metrics, postgres for storing ABCI events, and pindexer for munging those events.