From deca5c972f8d820a75757e7aa539f4224f9e4d10 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 10 Sep 2020 12:39:55 +0200 Subject: [PATCH] wip --- src/ci/docker/run.sh | 2 ++ src/ci/shared.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index c2ff62e74816d..7f0eae380e0f6 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -40,6 +40,7 @@ source "$ci_dir/shared.sh" CACHE_DOMAIN="${CACHE_DOMAIN:-ci-caches.rust-lang.org}" +ciStartGroup "Download or build the Docker image" if [ -f "$docker_dir/$image/Dockerfile" ]; then if [ "$CI" != "" ]; then hash_key=/tmp/.docker-hash-key.txt @@ -151,6 +152,7 @@ else exit 1 fi +ciEndGroup mkdir -p $HOME/.cargo mkdir -p $objdir/tmp diff --git a/src/ci/shared.sh b/src/ci/shared.sh index 8222758ed6dc4..8379e18f2b617 100644 --- a/src/ci/shared.sh +++ b/src/ci/shared.sh @@ -128,3 +128,32 @@ function ciCommandSetEnv { exit 1 fi } + +function ciStartGroup { + if [[ $# -ne 1 ]]; then + echo "usage: $0 " + exit 1 + fi + name="$1" + + # Only run this on the CI platforms that support the feature. Losing + # support for this is not a big deal, logs would just be a bit harder to + # navigate. + if isGitHubActions; then + echo "::group::${name}" + fi +} + +function ciEndGroup { + if [[ $# -ne 0 ]]; then + echo "usage: $0" + exit 1 + fi + + # Only run this on the CI platforms that support the feature. Losing + # support for this is not a big deal, logs would just be a bit harder to + # navigate. + if isGitHubActions; then + echo "::endgroup::" + fi +}