Skip to content

Commit

Permalink
Only verify simtest build, not test runs (temporarily broken due to a…
Browse files Browse the repository at this point in the history
…nemo) (MystenLabs#4546)

* Support for `cargo simtest build` command

* Only verify simtest build, not test runs (temporarily broken due to anemo)

Co-authored-by: Mark Logan <mark@marklgn.com>
  • Loading branch information
mystenmark and mlogan authored Sep 9, 2022
1 parent 760ae2d commit 51ec51f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- uses: taiki-e/install-action@nextest
- name: cargo simtest
run: |
scripts/simtest/cargo-simtest simtest
scripts/simtest/cargo-simtest simtest build
# This is a no-op job that allows the resulting action names to line up when
# there are no rust changes in a given PR/commit. This ensures that we can
Expand Down
9 changes: 7 additions & 2 deletions scripts/simtest/cargo-simtest
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ else
echo "Using MSIM_TEST_SEED=$MSIM_TEST_SEED from the environment"
fi

cargo nextest run \
--cargo-profile simulator \
CARGO_COMMAND=(nextest run --cargo-profile simulator)
if [ "$1" = "build" ]; then
shift
CARGO_COMMAND=(build --profile simulator)
fi

cargo ${CARGO_COMMAND[@]} \
--config 'build.rustflags = ["--cfg", "msim"]' \
--config 'patch.crates-io.tokio.git = "https://github.com/MystenLabs/mysten-sim.git"' \
--config 'patch.crates-io.tokio.rev = "15dff80e8e69218bc20b08a5ef91a4f156e626ac"' \
Expand Down

0 comments on commit 51ec51f

Please sign in to comment.