Rollup merge of #138531 - Kobzol:test-diff-try-build, r=marcoieni
Store test diffs in job summaries and improve analysis formatting
This PR stores the test diffs that we already have in the post-merge workflow also into individual job summaries. This makes it easier to compare test (and later also other) diffs per job, which will be especially useful for try jobs, so that we can actually see the test diffs *before* we merge a given PR.
As a drive-by, I also made a bunch of cleanups in `citool` and in the formatting of the summary and post-merge analyses. These changes are split into self-contained commits.
The analysis can be tested locally with the following command:
```bash
$ curl https://ci-artifacts.rust-lang.org/rustc-builds/<current-sha>/metrics-<job-name>.json > metrics.json
$ cargo run --manifest-path src/ci/citool/Cargo.toml postprocess-metrics metrics.json --job-name <job-name> --parent <parent-sha> > out.md
```
For example, for [this PR](https://github.com/rust-lang/rust/pull/138523):
```bash
$ curl https://ci-artifacts.rust-lang.org/rustc-builds/282865097d138c7f0f7a7566db5b761312dd145c/metrics-aarch64-gnu.json > metrics.json
$ cargo run --manifest-path src/ci/citool/Cargo.toml postprocess-metrics metrics.json --job-name aarch64-gnu --parent d9e5539a39
> out.md
```
Best reviewed commit by commit.
r? `@marcoieni`
try-job: aarch64-gnu
try-job: dist-x86_64-linux
This commit is contained in:
commit
5786233b81
6 changed files with 532 additions and 472 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -239,16 +239,31 @@ jobs:
|
|||
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
|
||||
|
||||
- name: postprocess metrics into the summary
|
||||
# This step is not critical, and if some I/O problem happens, we don't want
|
||||
# to cancel the build.
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [ -f build/metrics.json ]; then
|
||||
./build/citool/debug/citool postprocess-metrics build/metrics.json ${GITHUB_STEP_SUMMARY}
|
||||
METRICS=build/metrics.json
|
||||
elif [ -f obj/build/metrics.json ]; then
|
||||
./build/citool/debug/citool postprocess-metrics obj/build/metrics.json ${GITHUB_STEP_SUMMARY}
|
||||
METRICS=obj/build/metrics.json
|
||||
else
|
||||
echo "No metrics.json found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get closest bors merge commit
|
||||
PARENT_COMMIT=`git rev-list --author='bors <bors@rust-lang.org>' -n1 --first-parent HEAD^1`
|
||||
|
||||
./build/citool/debug/citool postprocess-metrics \
|
||||
--job-name ${CI_JOB_NAME} \
|
||||
--parent ${PARENT_COMMIT} \
|
||||
${METRICS} >> ${GITHUB_STEP_SUMMARY}
|
||||
|
||||
- name: upload job metrics to DataDog
|
||||
# This step is not critical, and if some I/O problem happens, we don't want
|
||||
# to cancel the build.
|
||||
continue-on-error: true
|
||||
if: needs.calculate_matrix.outputs.run_type != 'pr'
|
||||
env:
|
||||
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue