Skip to content

Commit 20e010f

Browse files
committed
[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 ```
1 parent 9e60417 commit 20e010f

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

eng/pipelines/coreclr/perf-wasm-jobs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
116116
logicalmachine: 'perftiger'
117117
javascriptEngine: 'v8'
118+
additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py
118119
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
119120
compare: ${{ parameters.compare }}
120121
onlySanityCheck: ${{ parameters.onlySanityCheck }}
@@ -140,6 +141,7 @@ jobs:
140141
runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
141142
logicalmachine: 'perftiger'
142143
javascriptEngine: 'v8'
144+
additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py
143145
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
144146
compare: ${{ parameters.compare }}
145147
onlySanityCheck: ${{ parameters.onlySanityCheck }}
@@ -162,7 +164,7 @@ jobs:
162164
projectFile: blazor_perf.proj
163165
runKind: blazor_scenarios
164166
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
165-
#additionalSetupParameters: '--latestdotnet' - doesn't do anything, IIUC. see performance-setup.sh
167+
additionalSetupParameters: '--dotnetversions 8.0.0' # passed to performance-setup.sh
166168
logicalmachine: 'perftiger'
167169
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
168170
perfForkToUse: ${{ parameters.perfForkToUse }}

eng/pipelines/coreclr/templates/run-performance-job.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ parameters:
2525
javascriptEngine: 'NoJS'
2626
helixTypeSuffix: '' # optional -- appends to HelixType
2727
collectHelixLogsScript: '' # optional -- script to collect the logs, and artifacts helpful for debugging failures
28+
additionalSetupParameters: '' # optional -- additional setup parameters that are job-specific
2829

2930
jobs:
3031
- template: xplat-pipeline-job.yml
@@ -162,7 +163,7 @@ jobs:
162163
displayName: Performance Setup (Unix)
163164
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
164165
continueOnError: ${{ parameters.continueOnError }}
165-
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments)
166+
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }}
166167
displayName: Run ci setup script
167168
# Run perf testing in helix
168169
- template: /eng/pipelines/coreclr/templates/perf-send-to-helix.yml

eng/pipelines/coreclr/templates/run-scenarios-job.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ jobs:
107107
- AdditionalHelixPreCommands: $(HelixPreCommandOSX)
108108
- AdditionalHelixPostCommands: $(HelixPostCommandOSX)
109109

110-
- ${{ if ne(parameters.runtimeType, 'wasm') }}:
111-
- ExtraSetupArguments: --install-dir $(PayloadDirectory)/dotnet
112-
- ${{ if and(eq(parameters.runtimeType, 'wasm'), in(variables['Build.Reason'], 'PullRequest')) }}:
113-
- ExtraSetupArguments: ''
110+
- name: ExtraSetupArguments
111+
${{ if ne(parameters.runtimeType, 'wasm') }}:
112+
value: --install-dir $(PayloadDirectory)/dotnet
114113

115114
workspace:
116115
clean: all

eng/testing/performance/performance-setup.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ iosmono=false
3838
iosllvmbuild=""
3939
maui_version=""
4040
only_sanity=false
41+
dotnet_versions=""
4142

4243
while (($# > 0)); do
4344
lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
@@ -148,6 +149,10 @@ while (($# > 0)); do
148149
use_latest_dotnet=true
149150
shift 1
150151
;;
152+
--dotnetversions)
153+
dotnet_versions="$2"
154+
shift 2
155+
;;
151156
--iosmono)
152157
iosmono=true
153158
shift 1
@@ -196,12 +201,13 @@ while (($# > 0)); do
196201
echo " --wasmbundle Path to the wasm bundle containing the dotnet, and data needed for helix payload"
197202
echo " --wasmaot Indicate wasm aot"
198203
echo " --latestdotnet --dotnet-versions will not be specified. --dotnet-versions defaults to LKG version in global.json "
204+
echo " --dotnetversions Passed as '--dotnet-versions <value>' to the setup script"
199205
echo " --alpine Set for runs on Alpine"
200206
echo " --iosmono Set for ios Mono/Maui runs"
201207
echo " --iosllvmbuild Set LLVM for iOS Mono/Maui runs"
202208
echo " --mauiversion Set the maui version for Mono/Maui runs"
203209
echo ""
204-
exit 0
210+
exit 1
205211
;;
206212
esac
207213
done
@@ -354,6 +360,10 @@ if [[ -n "$mono_dotnet" && "$monoaot" == "false" ]]; then
354360
mv $mono_dotnet $mono_dotnet_path
355361
fi
356362

363+
if [[ -n "$dotnet_versions" ]]; then
364+
setup_arguments="$setup_arguments --dotnet-versions $dotnet_versions"
365+
fi
366+
357367
if [[ "$monoaot" == "true" ]]; then
358368
monoaot_dotnet_path=$payload_directory/monoaot
359369
mv $monoaot_path $monoaot_dotnet_path

0 commit comments

Comments
 (0)