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
  • Loading branch information
tgross35 committed Dec 7, 2024
1 parent cde5e54 commit 5b471ae
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 @@ -293,11 +299,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 5b471ae

Please sign in to comment.