about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-26 13:53:27 +0000
committerbors <bors@rust-lang.org>2022-11-26 13:53:27 +0000
commitb3e44029cf0c2a43a6326666fa8e0d7c60ac5000 (patch)
tree39caffc88a4235eef1cf76915141fb8ffc980a3e
parent4d3e565004eeef0d01a57007577dd96cfb9bf208 (diff)
parent56a1d07cb7b78cadf7f8b260c1035bc48e33a17d (diff)
downloadrust-b3e44029cf0c2a43a6326666fa8e0d7c60ac5000.tar.gz
rust-b3e44029cf0c2a43a6326666fa8e0d7c60ac5000.zip
Auto merge of #2695 - RalfJung:ci-pretty, r=RalfJung
prettify our CI logs
-rwxr-xr-xsrc/tools/miri/ci.sh29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/tools/miri/ci.sh b/src/tools/miri/ci.sh
index bf9e986bdc7..01925e39da9 100755
--- a/src/tools/miri/ci.sh
+++ b/src/tools/miri/ci.sh
@@ -1,6 +1,17 @@
 #!/bin/bash
 set -euo pipefail
-set -x
+
+function begingroup {
+  echo "::group::$1"
+  set -x
+}
+
+function endgroup {
+  set +x
+  echo "::endgroup"
+}
+
+begingroup "Building Miri"
 
 # Determine configuration for installed build
 echo "Installing release version of Miri"
@@ -14,14 +25,15 @@ export CARGO_EXTRA_FLAGS="--locked"
 ./miri check --no-default-features # make sure this can be built
 ./miri check --all-features # and this, too
 ./miri build --all-targets # the build that all the `./miri test` below will use
-echo
+
+endgroup
 
 # Test
 function run_tests {
   if [ -n "${MIRI_TEST_TARGET+exists}" ]; then
-    echo "Testing foreign architecture $MIRI_TEST_TARGET"
+    begingroup "Testing foreign architecture $MIRI_TEST_TARGET"
   else
-    echo "Testing host architecture"
+    begingroup "Testing host architecture"
   fi
 
   ## ui test suite
@@ -52,7 +64,6 @@ function run_tests {
   echo 'build.rustc-wrapper = "thisdoesnotexist"' > .cargo/config.toml
   # Run the actual test
   ${PYTHON} test-cargo-miri/run-test.py
-  echo
   # Clean up
   unset RUSTC MIRI
   rm -rf .cargo
@@ -63,13 +74,15 @@ function run_tests {
       cargo miri run --manifest-path bench-cargo-miri/$BENCH/Cargo.toml
     done
   fi
+
+  endgroup
 }
 
 function run_tests_minimal {
   if [ -n "${MIRI_TEST_TARGET+exists}" ]; then
-    echo "Testing MINIMAL foreign architecture $MIRI_TEST_TARGET: only testing $@"
+    begingroup "Testing MINIMAL foreign architecture $MIRI_TEST_TARGET: only testing $@"
   else
-    echo "Testing MINIMAL host architecture: only testing $@"
+    begingroup "Testing MINIMAL host architecture: only testing $@"
   fi
 
   ./miri test -- "$@"
@@ -77,6 +90,8 @@ function run_tests_minimal {
   # Ensure that a small smoke test of cargo-miri works.
   # Note: This doesn't work on windows because of TLS.
   cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml
+
+  endgroup
 }
 
 # host