about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-08 00:04:17 +0000
committerbors <bors@rust-lang.org>2023-10-08 00:04:17 +0000
commite9addfdecf14633324fc5c935f4f2983699bef7e (patch)
treed79c7f400415a9d516477444ad9e89b49f571508 /src/ci/docker
parent97c81e1b537088f1881c8894ee8579812ed9b6d1 (diff)
parent209789ef4c20c7076678a67974c1f399b0fcd2c2 (diff)
Auto merge of #114623 - Kobzol:opt-dist-gha-summaries, r=Mark-Simulacrum
Print some information from try builds to GitHub summary

This PR adds some logs from `opt-dist` (the duration of the individual steps of the build pipeline, and the size of the resulting artifacts) to GitHub [job summaries](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/), in order to quickly show useful information right in the GHA CI job page, without needing to read the full log.

[This](https://github.com/rust-lang-ci/rust/actions/runs/5810621086) is how the summary currently looks like.

r? `@ghost`
Diffstat (limited to 'src/ci/docker')
-rwxr-xr-xsrc/ci/docker/run.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index e9c155b1378..22aabda2bb3 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -264,6 +264,9 @@ else
   BASE_COMMIT=""
 fi
 
+SUMMARY_FILE=github-summary.md
+touch $objdir/${SUMMARY_FILE}
+
 docker \
   run \
   --workdir /checkout/obj \
@@ -275,6 +278,7 @@ docker \
   --env CI \
   --env GITHUB_ACTIONS \
   --env GITHUB_REF \
+  --env GITHUB_STEP_SUMMARY="/checkout/obj/${SUMMARY_FILE}" \
   --env TOOLSTATE_REPO_ACCESS_TOKEN \
   --env TOOLSTATE_REPO \
   --env TOOLSTATE_PUBLISH \
@@ -289,6 +293,8 @@ docker \
   rust-ci \
   $command
 
+cat $objdir/${SUMMARY_FILE} >> "${GITHUB_STEP_SUMMARY}"
+
 if [ -f /.dockerenv ]; then
   rm -rf $objdir
   docker cp checkout:/checkout/obj $objdir