From d673baa5a6643928d0da88f6b71cfee06743ff1e Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 6 Dec 2024 23:59:01 -0500 Subject: [PATCH] ci: Use workflow commands to group output by target (backport ) (cherry picked from commit 5b471ae47f0e762c0687c8c72e5b62b4f001cfef) --- ci/verify-build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci/verify-build.sh b/ci/verify-build.sh index f24c3c39f5f7..e61fc69188c5 100755 --- a/ci/verify-build.sh +++ b/ci/verify-build.sh @@ -28,6 +28,12 @@ if [ "$TOOLCHAIN" = "nightly" ] ; then rustup component add rust-src fi +# Print GHA workflow commands +echo_if_ci() { + # Discard stderr so the "set -x" trace doesn't show up + { [ -n "${CI:-}" ] && echo "$1"; } 2> /dev/null +} + # Run the tests for a specific target test_target() { target="$1" @@ -297,11 +303,15 @@ filter_and_run() { } for target in $targets; do + echo_if_ci "::group::Target: $target" filter_and_run "$target" + echo_if_ci "::endgroup::" done for target in ${no_dist_targets:-}; do + echo_if_ci "::group::Target: $target" filter_and_run "$target" 1 + echo_if_ci "::endgroup::" done # Make sure we didn't accidentally filter everything