From d71c321db6cebb66cb6476e7134a58cf73d6c98e Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Tue, 23 Jan 2024 21:23:42 -0500 Subject: [PATCH] Use `group-runner` --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d8efb32..93f1472a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,15 +136,27 @@ jobs: run: | cargo install cargo-supply-chain || true cargo install cargo-unmaintained || true + cargo install group-runner || true - - name: Test + - name: Setup run: | + SERDE_FORMAT='--features=test-fuzz/serde_${{ matrix.serde_format }}' SHUFFLE= if [[ ${{ matrix.toolchain }} = nightly ]]; then SHUFFLE='-Z unstable-options --shuffle --test-threads=1' fi SELF_TY_IN_MOD_NAME="$(${{ matrix.self_ty_in_mod_name }} && echo '--features test-fuzz/self_ty_in_mod_name')" || true - TEST_CMD="cargo test --features=test-fuzz/serde_${{ matrix.serde_format }} $SELF_TY_IN_MOD_NAME -- --nocapture $SHUFFLE" + CONFIG_GROUP_RUNNER="--config target.'cfg(all())'.runner='group-runner'" + BUILD_CMD="cargo build $SERDE_FORMAT $SELF_TY_IN_MOD_NAME --all-targets" + TEST_CMD="cargo test $SERDE_FORMAT $SELF_TY_IN_MOD_NAME $CONFIG_GROUP_RUNNER -- --nocapture $SHUFFLE" + echo "BUILD_CMD=$BUILD_CMD" >> "$GITHUB_ENV" + echo "TEST_CMD=$TEST_CMD" >> "$GITHUB_ENV" + + - name: Build + run: $BUILD_CMD + + - name: Test + run: | $TEST_CMD if [[ ${{ github.event_name }} = 'schedule' ]] || git diff --name-only ${{ github.event.pull_request.base.sha }} | grep -w 'patches\|third_party' >/dev/null