Skip to content

Commit

Permalink
ci: Use workflow commands to group output by target
Browse files Browse the repository at this point in the history
(backport <rust-lang#4179>)
(cherry picked from commit 5b471ae)
  • Loading branch information
tgross35 committed Dec 9, 2024
1 parent 68d2da5 commit d673baa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ci/verify-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d673baa

Please sign in to comment.