--- /dev/null
+<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
+ <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
+ <Python>python3</Python>
+ <HelixPreCommands>$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk</HelixPreCommands>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
+ <PayloadDirectory>%(Identity)</PayloadDirectory>
+ </HelixCorrelationPayload>
+ </ItemGroup>
+
+ <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
+ <ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>
+ <BlazorDirectory>$(ScenarioDirectory)blazor\</BlazorDirectory>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
+ <ScenarioDirectory>$HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/</ScenarioDirectory>
+ <BlazorDirectory>$(ScenarioDirectory)blazor/</BlazorDirectory>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <HelixWorkItem Include="SOD - New Blazor Template - Publish">
+ <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
+ <PreCommands>cd $(BlazorDirectory);$(Python) pre.py publish --msbuild %27/p:_TrimmerDumpDependencies=true%27 --msbuild-static AdditionalMonoLinkerOptions=%27"%24(AdditionalMonoLinkerOptions) --dump-dependencies"%27 --binlog %27./traces/blazor_publish.binlog%27</PreCommands>
+ <Command>$(Python) test.py sod --scenario-name "%(Identity)"</Command>
+ <PostCommands>$(Python) post.py</PostCommands>
+ </HelixWorkItem>
+ </ItemGroup>
+</Project>
\ No newline at end of file
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
+ <ItemGroup>
+ <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
+ <PayloadDirectory>%(Identity)</PayloadDirectory>
+ </HelixCorrelationPayload>
+ </ItemGroup>
+
+ <!--
+ Crossgen and Crossgen2 Scenario WorkItems
+ -->
<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<Python>py -3</Python>
- <HelixPreCommands>$(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD%</HelixPreCommands>
- <ArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts</ArtifactsDirectory>
- <BaseDirectory>$HELIX_CORRELATION_PAYLOAD</BaseDirectory>
- <PerformanceDirectory>$(BaseDirectory)/performance</PerformanceDirectory>
+ <HelixPreCommands>$(HelixPreCommands)</HelixPreCommands>
+ <CoreRoot>%HELIX_CORRELATION_PAYLOAD%\Core_Root</CoreRoot>
+ <ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>
+ <CrossgenDirectory>$(ScenarioDirectory)crossgen\</CrossgenDirectory>
+ <Crossgen2Directory>$(ScenarioDirectory)crossgen2\</Crossgen2Directory>
</PropertyGroup>
-
- <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
- <WorkItemCommand>$(PerformanceDirectory)/scripts/benchmarks_ci.py --csproj $(PerformanceDirectory)/$(TargetCsproj)</WorkItemCommand>
- <CliArguments>--dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP</CliArguments>
+ <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<Python>python3</Python>
- <CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
- <HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
- <ArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
- <BaselineArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
- <ResultsComparer>$(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj</ResultsComparer>
- <DotnetExe>$(PerformanceDirectory)/tools/dotnet/$(Architecture)/dotnet</DotnetExe>
- <Percent>%25</Percent>
- <XMLResults>$HELIX_WORKITEM_ROOT/testResults.xml</XMLResults>
- </PropertyGroup>
+ <HelixPreCommands>$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/startup/Startup</HelixPreCommands>
+ <CoreRoot>$HELIX_CORRELATION_PAYLOAD/Core_Root</CoreRoot>
+ <ScenarioDirectory>$HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/</ScenarioDirectory>
+ <CrossgenDirectory>$(ScenarioDirectory)crossgen/</CrossgenDirectory>
+ <Crossgen2Directory>$(ScenarioDirectory)crossgen2/</Crossgen2Directory>
+ </PropertyGroup>
<ItemGroup>
- <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
- <PayloadDirectory>%(Identity)</PayloadDirectory>
- </HelixCorrelationPayload>
+ <SingleAssembly Include="System.Private.Xml.dll"/>
+ <SingleAssembly Include="System.Linq.Expressions.dll"/>
+ <SingleAssembly Include="Microsoft.CodeAnalysis.VisualBasic.dll"/>
+ <SingleAssembly Include="Microsoft.CodeAnalysis.CSharp.dll"/>
+ <SingleAssembly Include="System.Private.CoreLib.dll"/>
+ </ItemGroup>
+ <ItemGroup>
+ <Composite Include="framework-r2r.dll.rsp"/>
</ItemGroup>
- <ItemGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
- <HelixWorkItem Include="Crossgen System.Private.Xml.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Private.Xml.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen System.Linq.Expressions.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Linq.Expressions.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen Microsoft.CodeAnalysis.VisualBasic.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name Microsoft.CodeAnalysis.VisualBasic.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen Microsoft.CodeAnalysis.CSharp.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name Microsoft.CodeAnalysis.CSharp.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen System.Private.CoreLib.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Private.CoreLib.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
+ <ItemGroup>
+ <CrossgenWorkItem Include="@(SingleAssembly)">
+ <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
+ <Command>$(Python) $(CrossgenDirectory)test.py crossgen --core-root $(CoreRoot) --test-name %(Identity)</Command>
+ </CrossgenWorkItem>
</ItemGroup>
- <ItemGroup Condition="'$(AGENT_OS)' == 'Windows_NT' and '$(Architecture)' == 'x64'">
- <HelixWorkItem Include="Crossgen2 System.Private.Xml.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Private.Xml.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen2 System.Linq.Expressions.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Linq.Expressions.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen2 Microsoft.CodeAnalysis.VisualBasic.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single Microsoft.CodeAnalysis.VisualBasic.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
- </HelixWorkItem>
- <HelixWorkItem Include="Crossgen2 Microsoft.CodeAnalysis.CSharp.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single Microsoft.CodeAnalysis.CSharp.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
+ <ItemGroup>
+ <Crossgen2WorkItem Include="@(SingleAssembly)">
+ <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
+ <Command>$(Python) $(Crossgen2Directory)test.py crossgen2 --core-root $(CoreRoot) --single %(Identity)</Command>
+ </Crossgen2WorkItem>
+ </ItemGroup>
+
+ <ItemGroup>
+ <!-- Enable crossgen tests on Windows x64 and Windows x86 -->
+ <HelixWorkItem Include="@(CrossgenWorkItem -> 'Crossgen %(Identity)')" Condition="'$(AGENT_OS)' == 'Windows_NT'">
+ <Timeout>4:00</Timeout>
</HelixWorkItem>
- <HelixWorkItem Include="Crossgen2 System.Private.CoreLib.dll">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Private.CoreLib.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
+ <!-- Enable crossgen2 tests on Windows x64 and Linux x64 -->
+ <HelixWorkItem Include="@(Crossgen2WorkItem -> 'Crossgen2 %(Identity)')" Condition="'$(Architecture)' == 'x64'">
+ <Timeout>4:00</Timeout>
</HelixWorkItem>
- <HelixWorkItem Include="Crossgen2 Composite Framework R2R">
- <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
- <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --composite %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\framework-r2r.dll.rsp --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
+ <HelixWorkItem Include="Crossgen2 Composite Framework R2R" Condition="'$(Architecture)' == 'x64'">
+ <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
+ <Command>$(Python) $(Crossgen2Directory)test.py crossgen2 --core-root $(CoreRoot) --composite $(Crossgen2Directory)framework-r2r.dll.rsp</Command>
<Timeout>1:00</Timeout>
</HelixWorkItem>
</ItemGroup>
using_mono=false
wasm_runtime_loc=
using_wasm=false
+use_latest_dotnet=false
while (($# > 0)); do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
configurations=$2
shift 2
;;
- --help)
+ --latestdotnet)
+ use_latest_dotnet=true
+ shift 1
+ ;;
+ *)
echo "Common settings:"
echo " --corerootdirectory <value> Directory where Core_Root exists, if running perf testing with --corerun"
echo " --architecture <value> Architecture of the testing being run"
echo " --internal If the benchmarks are running as an official job."
echo " --monodotnet Pass the path to the mono dotnet for mono performance testing."
echo " --wasm Path to the unpacked wasm runtime pack."
+ echo " --latestdotnet --dotnet-versions will not be specified. --dotnet-versions defaults to LKG version in global.json "
echo ""
exit 0
;;
fi
if [[ "$wasm_runtime_loc" != "" ]]; then
- configurations="CompilationMode=wasm RunKind=micro"
+ configurations="CompilationMode=wasm RunKind=$kind"
extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoInterpreter NoWASM NoMono"
fi
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
-# Get the tools section from the global.json.
-# This grabs the LKG version number of dotnet and passes it to our scripts
-dotnet_version=`cat global.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tools"]["dotnet"])'`
-setup_arguments="--dotnet-versions $dotnet_version $setup_arguments"
-
+if [[ "$use_latest_dotnet" = false ]]; then
+ # Get the tools section from the global.json.
+ # This grabs the LKG version number of dotnet and passes it to our scripts
+ dotnet_version=`cat global.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tools"]["dotnet"])'`
+ setup_arguments="--dotnet-versions $dotnet_version $setup_arguments"
+fi
if [[ "$run_from_perf_repo" = true ]]; then
payload_directory=
Write-PipelineSetVariable -name "WorkItemDirectory" -value "$workitem_directory" -is_multi_job_variable false
Write-PipelineSetVariable -name "Queue" -value "$queue" -is_multi_job_variable false
Write-PipelineSetVariable -name "SetupArguments" -value "$setup_arguments" -is_multi_job_variable false
-Write-PipelineSetVariable -name "Python" -value "$python3" -is_multi_job_variable false
+Write-PipelineSetVariable -name "Python" -value "python3" -is_multi_job_variable false
Write-PipelineSetVariable -name "PerfLabArguments" -value "$perflab_arguments" -is_multi_job_variable false
Write-PipelineSetVariable -name "ExtraBenchmarkDotNetArguments" -value "$extra_benchmark_dotnet_arguments" -is_multi_job_variable false
Write-PipelineSetVariable -name "BDNCategories" -value "$run_categories" -is_multi_job_variable false
jobParameters:
testGroup: perf
-# build mono
+# build mono on wasm
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildArgs: -s mono+libs+installer -c $(_BuildConfig)
nameSuffix: wasm
isOfficialBuild: ${{ variables.isOfficialBuild }}
- extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml
+ extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
extraStepsParameters:
- name: MonoRuntimePacks
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+ includeRootFolder: true
+ displayName: Browser Wasm Artifacts
+ artifactName: BrowserWasm
+ archiveType: zip
+ archiveExtension: .zip
+# build mono
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/build-job.yml
platforms:
- Linux_x64
-# run mono perf job
+# run mono microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
runtimeType: mono
projectFile: microbenchmarks.proj
runKind: micro_mono
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-# run mono interpreter job
+# run mono interpreter perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
codeGenType: 'Interpreter'
projectFile: microbenchmarks.proj
runKind: micro_mono
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
# run mono wasm microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+ jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
buildConfig: release
runtimeFlavor: wasm
platforms:
runtimeType: wasm
codeGenType: 'wasm'
projectFile: microbenchmarks.proj
- runKind: micro
-
+ runKind: micro # is this supposed to be micro_mono or micro_wasm?
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+
+
# run coreclr microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
liveLibrariesBuildConfig: Release
projectFile: microbenchmarks.proj
runKind: micro
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
# run coreclr crossgen perf job
- template: /eng/pipelines/common/platform-matrix.yml
liveLibrariesBuildConfig: Release
projectFile: crossgen_perf.proj
runKind: crossgen_scenarios
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+
+# run mono wasm blazor perf job
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+ buildConfig: release
+ runtimeFlavor: wasm
+ platforms:
+ - Linux_x64
+ jobParameters:
+ testGroup: perf
+ liveLibrariesBuildConfig: Release
+ runtimeType: wasm
+ projectFile: blazor_perf.proj
+ runKind: blazor_scenarios
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+ additionalSetupParameters: '--latestdotnet'
codeGenType: 'JIT'
projetFile: ''
runKind: ''
+ runJobTemplate: '/eng/pipelines/coreclr/templates/run-performance-job.yml'
+ additionalSetupParameters: ''
### Perf job
### buildConfig and archType.
jobs:
-- template: run-performance-job.yml
+- template: ${{ parameters.runJobTemplate }}
parameters:
# Compute job name from template parameters
jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind) }}
codeGenType: ${{ parameters.codeGenType }}
projectFile: ${{ parameters.projectFile }}
runKind: ${{ parameters.runKind }}
+ additionalSetupParameters: ${{ parameters.additionalSetupParameters }}
# Test job depends on the corresponding build job
dependsOn:
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.osGroup, 'Windows_NT') }}:
${{ if eq(parameters.runtimeType, 'mono') }}:
- extraSetupParameters: -Architecture ${{ parameters.archType }} -MonoDotnet $(Build.SourcesDirectory)\.dotnet-mono -Kind micro_mono
- ${{ if ne(parameters.runtimeType, 'mono') }}:
+ extraSetupParameters: -Architecture ${{ parameters.archType }} -MonoDotnet $(Build.SourcesDirectory)\.dotnet-mono
+ ${{ if eq(parameters.runtimeType, 'coreclr') }}:
extraSetupParameters: -CoreRootDirectory $(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.Release\Tests\Core_Root -Architecture ${{ parameters.archType }}
${{ if ne(parameters.osGroup, 'Windows_NT') }}:
${{ if eq(parameters.runtimeType, 'mono') }}:
- extraSetupParameters: --architecture ${{ parameters.archType }} --monodotnet $(Build.SourcesDirectory)/.dotnet-mono --kind micro_mono
+ extraSetupParameters: --architecture ${{ parameters.archType }} --monodotnet $(Build.SourcesDirectory)/.dotnet-mono
${{ if eq(parameters.runtimeType, 'wasm') }}:
- extraSetupParameters: --architecture ${{ parameters.archType }} --wasm $(librariesDownloadDir)/bin/wasm --kind micro
+ extraSetupParameters: --architecture ${{ parameters.archType }} --wasm $(librariesDownloadDir)/bin/wasm
${{ if eq(parameters.runtimeType, 'coreclr') }}:
extraSetupParameters: --corerootdirectory $(Build.SourcesDirectory)/artifacts/tests/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.Release/Tests/Core_Root --architecture ${{ parameters.archType }}
-
+
variables: ${{ parameters.variables }}
frameworks:
artifactName: '$(librariesBuildArtifactName)'
displayName: 'live-built libraries'
-
- # Download product binaries directory
+ # Download coreclr
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(buildProductRootFolderPath)
artifactFileName: '$(buildProductArtifactName)$(archiveExtension)'
artifactName: '$(buildProductArtifactName)'
- displayName: 'product build'
+ displayName: 'Coreclr product build'
+ # Download mono
- ${{ if eq(parameters.runtimeType, 'mono') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
artifactName: 'MonoProduct_${{ parameters.runtimeVariant }}_$(osGroup)_$(archType)_$(buildConfig)'
displayName: 'Mono runtime'
+ # Download wasm
- ${{ if eq(parameters.runtimeType, 'wasm') }}:
- # Download artifact
- - task: DownloadBuildArtifacts@0
- displayName: 'Download WASM Runtime Pack'
- inputs:
- buildType: current
- downloadType: single
- downloadPath: '$(Build.SourcesDirectory)/__download__'
- artifactName: 'IntermediateUnsignedArtifacts'
+ - template: /eng/pipelines/common/download-artifact-step.yml
+ parameters:
+ unpackFolder: $(librariesDownloadDir)/BrowserWasm
+ artifactFileName: BrowserWasm.zip
+ artifactName: BrowserWasm
+ displayName: BrowserWasm
- - script: "mkdir $(librariesDownloadDir)/bin/wasm;unzip -o $(Build.SourcesDirectory)/__download__/IntermediateUnsignedArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.browser-wasm.6.0.0-ci.nupkg data/* runtimes/* -d $(librariesDownloadDir)/bin/wasm;cp src/mono/wasm/runtime-test.js $(librariesDownloadDir)/bin/wasm/runtime-test.js;find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \\;"
+ - script: "mkdir $(librariesDownloadDir)/bin/wasm;unzip -o $(librariesDownloadDir)/BrowserWasm/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Runtime.browser-wasm.6.0.0-ci.nupkg data/* runtimes/* -d $(librariesDownloadDir)/bin/wasm;cp src/mono/wasm/runtime-test.js $(librariesDownloadDir)/bin/wasm/runtime-test.js;find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \\;"
displayName: "Create wasm directory (Linux)"
# Create Core_Root
displayName: Create Core_Root
condition: and(succeeded(), ne(variables.runtimeFlavorName, 'Mono'))
- # Copy the runtime directory into the testhost folder to include OOBs.
-
+ # Copy the runtime directory into the testhost folder to include OOBs.
- script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\6.0.0 /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\6.0.0\\corerun.exe"
displayName: "Create mono dotnet (Windows)"
condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'Windows_NT'))
liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run
runtimeType: 'coreclr' # optional -- Sets the runtime as coreclr or mono
codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono
- projectFile: '' # required -- project file to build helix workitems
+ projectFile: 'microbenchmarks.proj' # optional -- project file to build helix workitems
runKind: '' # required -- test category
jobs:
- HelixPreCommand: 'export MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsLinux)'
- Interpreter: ' --monointerpreter'
+
workspace:
clean: all
pool:
continueOnError: ${{ parameters.continueOnError }}
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments)
displayName: Run ci setup script
- - script: xcopy $(PerformanceDirectory)\scripts $(WorkItemDirectory)\ScenarioCorrelation\scripts\/e && xcopy $(PerformanceDirectory)\src\scenarios\shared $(WorkItemDirectory)\ScenarioCorrelation\shared\/e && xcopy $(PerformanceDirectory)\src\scenarios\staticdeps $(WorkItemDirectory)\ScenarioCorrelation\staticdeps\/e
- displayName: Copy scenario support files
- condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
- - script: $(PerformanceDirectory)\tools\dotnet\$(Architecture)\dotnet publish -c Release -o $(WorkItemDirectory)\ScenarioCorrelation\Startup -f netcoreapp3.1 -r win-$(Architecture) $(PerformanceDirectory)\src\tools\ScenarioMeasurement\Startup\Startup.csproj
- displayName: Build scenario tools
- env:
- PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1
- condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
# Run perf testing in helix
- template: /eng/common/templates/steps/perf-send-to-helix.yml
parameters:
--- /dev/null
+parameters:
+ steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo)
+ variables: [] # optional -- list of additional variables to send to the template
+ jobName: '' # required -- job name
+ displayName: '' # optional -- display name for the job. Will use jobName if not passed
+ pool: '' # required -- name of the Build pool
+ container: '' # required -- name of the container
+ buildConfig: '' # required -- build configuration
+ archType: '' # required -- targeting CPU architecture
+ osGroup: '' # required -- operating system for the job
+ osSubgroup: '' # optional -- operating system subgroup
+ extraSetupParameters: '' # optional -- extra arguments to pass to the setup script
+ frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against
+ continueOnError: 'false' # optional -- determines whether to continue the build if the step errors
+ dependsOn: '' # optional -- dependencies of the job
+ timeoutInMinutes: 320 # optional -- timeout for the job
+ enableTelemetry: false # optional -- enable for telemetry
+ liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run
+ runtimeType: 'coreclr' # optional -- Sets the runtime as coreclr or mono
+ codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono
+ projectFile: '' # required -- project file to build helix workitems
+ runKind: '' # required -- test category
+ additionalSetupParameters: '' # optional -- additional setup parameters that are job-specific
+
+jobs:
+- template: xplat-pipeline-job.yml
+ parameters:
+ dependsOn: ${{ parameters.dependsOn }}
+ buildConfig: ${{ parameters.buildConfig }}
+ archType: ${{ parameters.archType }}
+ osGroup: ${{ parameters.osGroup }}
+ osSubgroup: ${{ parameters.osSubgroup }}
+ liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
+ enableTelemetry: ${{ parameters.enableTelemetry }}
+ enablePublishBuildArtifacts: true
+ continueOnError: ${{ parameters.continueOnError }}
+
+ ${{ if ne(parameters.displayName, '') }}:
+ displayName: '${{ parameters.displayName }}'
+ ${{ if eq(parameters.displayName, '') }}:
+ displayName: '${{ parameters.jobName }}'
+
+ timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
+
+ variables:
+ - ${{ each variable in parameters.variables }}:
+ - ${{ if ne(variable.name, '') }}:
+ - name: ${{ variable.name }}
+ value: ${{ variable.value }}
+ - ${{ if ne(variable.group, '') }}:
+ - group: ${{ variable.group }}
+
+ - IsInternal: ''
+ - HelixApiAccessToken: ''
+
+ # run machine-setup and set PYTHONPATH
+ - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
+ - HelixPreCommands: 'call %HELIX_WORKITEM_PAYLOAD%\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD%'
+ - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
+ - HelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
+
+ # extra private job settings
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
+ - HelixPreCommands: $(HelixPreCommands);py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"
+ - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
+ - HelixPreCommands: $(HelixPreCommands);sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/Scripts/activate;export PYTHONPATH=;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"
+ - IsInternal: -Internal
+ - group: DotNet-HelixApi-Access
+ - group: dotnet-benchview
+
+ workspace:
+ clean: all
+ pool:
+ ${{ parameters.pool }}
+ container: ${{ parameters.container }}
+ strategy:
+ matrix:
+ ${{ each framework in parameters.frameworks }}:
+ ${{ framework }}:
+ _Framework: ${{ framework }}
+ steps:
+ - ${{ parameters.steps }}
+ # run performance-setup
+ - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) -Kind ${{ parameters.runKind }} ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }}
+ displayName: Performance Setup (Windows)
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) --kind ${{ parameters.runKind }} ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }}
+ displayName: Performance Setup (Linux)
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ # parse Version.props to get the latest stable sdk version on master
+ - script: $(Python) scripts/parse_props.py --branch-name master # defaults to master branch of sdk so we can get the latest
+ displayName: Parse Version.props
+ workingDirectory: $(PerformanceDirectory)
+ continueOnError: ${{ parameters.continueOnError }}
+ # run ci-setup
+ - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(DotnetVersion) $(SetupArguments) --install-dir $(PayloadDirectory)\dotnet --output-file $(WorkItemDirectory)\machine-setup.cmd
+ displayName: Run ci setup script (Windows)
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(DotnetVersion) $(SetupArguments) --install-dir $(PayloadDirectory)/dotnet --output-file $(WorkItemDirectory)/machine-setup.sh
+ displayName: Run ci setup script (Linux)
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+ # copy wasm packs if running on wasm
+ - script: cp -r $(librariesDownloadDir)/BrowserWasm/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm $(PayloadDirectory);cp -r $(librariesDownloadDir)/BrowserWasm/artifacts/bin/microsoft.netcore.app.ref $(PayloadDirectory)
+ displayName: Copy browserwasm and runtime ref packs
+ condition: and(succeeded(), eq('${{ parameters.runtimeType }}', 'wasm'))
+ # copy scenario support files
+ - script: xcopy $(PerformanceDirectory)\scripts $(WorkItemDirectory)\scripts\/e && xcopy $(PerformanceDirectory)\src\scenarios\shared $(WorkItemDirectory)\shared\/e && xcopy $(PerformanceDirectory)\src\scenarios\staticdeps $(WorkItemDirectory)\staticdeps\/e
+ displayName: Copy scenario support files (Windows)
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ - script: cp -r $(PerformanceDirectory)/scripts $(WorkItemDirectory)/scripts/ && cp -r $(PerformanceDirectory)/src/scenarios/shared $(WorkItemDirectory)/shared/ && cp -r $(PerformanceDirectory)/src/scenarios/staticdeps/ $(WorkItemDirectory)/staticdeps/
+ displayName: Copy scenario support files (Linux)
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+ # build Startup
+ - script: $(PayloadDirectory)\dotnet\dotnet.exe publish -c Release -o $(WorkItemDirectory)\Startup -f netcoreapp3.1 -r win-$(Architecture) $(PerformanceDirectory)\src\tools\ScenarioMeasurement\Startup\Startup.csproj
+ displayName: Build Startup tool (Windows)
+ env:
+ PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ - script: $(PayloadDirectory)/dotnet/dotnet publish -c Release -o $(WorkItemDirectory)/startup -f netcoreapp3.1 -r linux-$(Architecture) $(PerformanceDirectory)/src/tools/ScenarioMeasurement/Startup/Startup.csproj
+ displayName: Build Startup tool (Linux)
+ env:
+ PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+ # build SizeOnDisk
+ - script: $(PayloadDirectory)\dotnet\dotnet.exe publish -c Release -o $(WorkItemDirectory)SOD -f netcoreapp3.1 -r win-$(Architecture) $(PerformanceDirectory)\src\tools\ScenarioMeasurement\SizeOnDisk\SizeOnDisk.csproj
+ displayName: Build SizeOnDisk tool (Windows)
+ env:
+ PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ - script: $(PayloadDirectory)/dotnet/dotnet publish -c Release -o $(WorkItemDirectory)/SOD -f netcoreapp3.1 -r linux-$(Architecture) $(PerformanceDirectory)/src/tools/ScenarioMeasurement/SizeOnDisk/SizeOnDisk.csproj
+ displayName: Build SizeOnDisk tool (Linux)
+ env:
+ PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+
+ # run perf testing in helix
+ - template: /eng/common/templates/steps/perf-send-to-helix.yml
+ parameters:
+ HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/
+ HelixType: 'test/performance/$(Kind)/$(_Framework)/$(Architecture)'
+ HelixAccessToken: $(HelixApiAccessToken)
+ HelixTargetQueues: $(Queue)
+ HelixPreCommands: $(HelixPreCommands)
+ Creator: $(Creator)
+ WorkItemTimeout: 4:00 # 4 hours
+ WorkItemDirectory: '$(WorkItemDirectory)' # contains scenario tools, shared python scripts, dotnet tool
+ CorrelationPayloadDirectory: '$(PayloadDirectory)' # contains performance repo and built product
+ ProjectFile: ${{ parameters.projectFile }}
+
+ # publish logs
+ - task: PublishPipelineArtifact@1
+ displayName: Publish Logs
+ inputs:
+ targetPath: $(Build.SourcesDirectory)/artifacts/log
+ artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}'
+ continueOnError: true
+ condition: always()