Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Pietro's CI playground #72571

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -151,6 +152,7 @@ else

exit 1
fi
ciEndGroup

mkdir -p $HOME/.cargo
mkdir -p $objdir/tmp
Expand Down
29 changes: 29 additions & 0 deletions src/ci/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,32 @@ function ciCommandSetEnv {
exit 1
fi
}

function ciStartGroup {
if [[ $# -ne 1 ]]; then
echo "usage: $0 <name>"
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
}