Initial work to enable ASM diff generation in CI (#20366)
authorBruce Forstall <brucefo@microsoft.com>
Thu, 11 Oct 2018 18:29:21 +0000 (11:29 -0700)
committerGitHub <noreply@github.com>
Thu, 11 Oct 2018 18:29:21 +0000 (11:29 -0700)
commitd983e44fce5cf69822cbc2a51c6450b58ef8ad87
tree98fdbdd681bcc164e5ef810370d56b4a9cfb2ccb
parent746da72fbd0ad480be9b2eca147f74eea36d2b5f
Initial work to enable ASM diff generation in CI (#20366)

A set of CI jobs is defined to generate assembly diffs:

```
Windows_NT x64 Checked pmi_asm_diffs
Windows_NT x86 Checked pmi_asm_diffs
Ubuntu arm Cross Checked pmi_asm_diffs
Ubuntu16.04 arm64 Cross Checked pmi_asm_diffs
Windows_NT x64_arm64_altjit Checked pmi_asm_diffs
Windows_NT x86_arm_altjit Checked pmi_asm_diffs
```

Most of the work is in the run-pmi-diffs.py script. This script:

1. Expects a "diff" build to exist.
2. Clones the baseline branch and builds it.
3. Downloads the dotnet CLI and unpacks it.
4. Clones the jitutils tree and builds it.
5. Generates asm with both the "baseline" and "diff" compilers, currently just on System.Private.CoreLib.dll, but that can be easily expanded (and perhaps we could create new jobs that do different sets of diffs, such as frameworks or benchmarks or all tests)
6. Runs jit-analyze.

The Linux arm/arm64 jobs do cross-compilation, so much zip and copy the build artifacts to a test machine to run.

This has been tested in the dev/unix_test_workflow branch, e.g. #20357

There is still some work to do:

1. Properly figure out the correct baseline commit.
2. Make the Linux arm/arm64 runs work (there are still some problems).
3. Do a better job surfacing the results, e.g., post back to the GitHub PR comments with the jit-analyze results.
4. Enable Linux x64 asm diffs jobs
5. Respond to code review feedback, e.g. (a) make various Python script improvements to handle failure modes, (b) do better temp directory creation, (c) use Tools\dotnetcli and init-tools instead of downloading/unpacking/installing a "live" dotnet CLI, (d) don't invoke run.cmd directly. Maybe use "build-test skipmanaged skipnative" instead?
netci.groovy
tests/scripts/run-pmi-diffs.py [new file with mode: 0644]