[wasm] Fix perf pipeline errors (#75406)
authorAnkit Jain <radical@gmail.com>
Tue, 13 Sep 2022 17:13:17 +0000 (13:13 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Sep 2022 17:13:17 +0000 (13:13 -0400)
commit829372600954a39a2723abae76df5da5705c2ca1
tree2b5d6b5477576c0ca28eceec0751557628b36619
parent9866d1285dcf2448c966edbf02b8c17585d430fb
[wasm] Fix perf pipeline errors (#75406)

* [wasm] Fix perf-pipeline errors

Build SizeOnDisk, and Startup tools for `net7.0` instead of `net6.0`.

It current fails with:

```
error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 6.0.10)
error NU1102:   - Found 2073 version(s) in dotnet6 [ Nearest version: 6.0.2-servicing.1.22101.5 ]
error NU1102:   - Found 1520 version(s) in dotnet7 [ Nearest version: 7.0.0-alpha.1.21417.28 ]
error NU1102:   - Found 1120 version(s) in dotnet5 [ Nearest version: 6.0.0-alpha.1.20420.3 ]
error NU1102:   - Found 76 version(s) in dotnet3.1 [ Nearest version: 3.1.1-servicing.19602.11 ]
error NU1102:   - Found 52 version(s) in dotnet-public [ Nearest version: 7.0.0-preview.1.22076.8 ]
error NU1102:   - Found 1 version(s) in dotnet-eng [ Nearest version: 5.0.0-alpha.1.19618.1 ]
error NU1102:   - Found 0 version(s) in benchmark-dotnet-prerelease
error NU1102:   - Found 0 version(s) in dotnet-tools
error NU1102:   - Found 0 version(s) in dotnet3.1-transport
error NU1102:   - Found 0 version(s) in dotnet5-transport
```

* [wasm] Fix perf pipeline errors

We are building with 8.0 sdk now, but for tfm=net7.0 and that confuses
the setup script. So, explicitly pass `--dotnet-versions 8.0.0`, so it
can resolve to the available sdk.

```
Traceback (most recent call last):
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/ci_setup.py", line 357, in <module>
    __main(sys.argv[1:])
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/ci_setup.py", line 310, in __main
    dotnet_version = dotnet.get_dotnet_version(target_framework_moniker, args.cli) if args.dotnet_versions == [] else args.dotnet_versions[0]
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/dotnet.py", line 568, in get_dotnet_version
    "Unable to determine the .NET SDK used for {}".format(framework)
RuntimeError: Unable to determine the .NET SDK used for net7.0
```

* [wasm] Use test-main.js from 7.0 branch for perf pipeline

Since we use a sdk+workload for running the perf benchmarks, and build
the projects for tfm=net7.0, it uses the 7.0 runtime pack, which has
some differences. So, use the 7.0 test-main.js .

Fails with:

```
[2022/09/11 01:06:47][INFO] test-main.js:262: TypeError: dotnet.withVirtualWorkingDirectory(...).withEnvironmentVariables(...).withDiagnosticTracing(...).withExitOnUnhandledError is not a function
[2022/09/11 01:06:47][INFO]             .withExitOnUnhandledError()
[2022/09/11 01:06:47][INFO]              ^
[2022/09/11 01:06:47][INFO] TypeError: dotnet.withVirtualWorkingDirectory(...).withEnvironmentVariables(...).withDiagnosticTracing(...).withExitOnUnhandledError is not a function
[2022/09/11 01:06:47][INFO]     at run (test-main.js:262:14)
[2022/09/11 01:06:47][INFO]
[2022/09/11 01:06:47][INFO] 1 pending unhandled Promise rejection(s) detected.
```
eng/pipelines/coreclr/perf-wasm-jobs.yml
eng/pipelines/coreclr/templates/perf-job.yml
eng/pipelines/coreclr/templates/run-performance-job.yml
eng/pipelines/coreclr/templates/run-scenarios-job.yml
eng/testing/performance/performance-setup.sh