From: Kunal Pathak Date: Tue, 13 Oct 2020 05:39:00 +0000 (-0700) Subject: Add back superpmi pipeline files (#43323) X-Git-Tag: submit/tizen/20210909.063632~5114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c4f3111a40907d91efd42b2fe549e36af58ac78;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add back superpmi pipeline files (#43323) * Add back superpmi pipeline files * add the missing import * add another missing import I am not sure how this worked in the past with missing imports. * remove the workaround for a bug * Revert "remove the workaround for a bug" This reverts commit 5c674210cc8f20fda3e73704c7f72d6e168c68d9. --- diff --git a/eng/pipelines/coreclr/templates/run-superpmi-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-job.yml index 703c384..286acbc 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-job.yml @@ -89,7 +89,7 @@ jobs: displayName: ${{ format('SuperPMI setup ({0})', parameters.osGroup) }} # Run superpmi collection in helix - - template: /eng/common/templates/steps/superpmi-send-to-helix.yml + - template: /eng/pipelines/coreclr/templates/superpmi-send-to-helix.yml parameters: HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/ HelixType: 'test/superpmi/$(Kind)/$(_Framework)/$(Architecture)' diff --git a/eng/pipelines/coreclr/templates/superpmi-send-to-helix.yml b/eng/pipelines/coreclr/templates/superpmi-send-to-helix.yml new file mode 100644 index 0000000..77a25dc --- /dev/null +++ b/eng/pipelines/coreclr/templates/superpmi-send-to-helix.yml @@ -0,0 +1,53 @@ +# Please remember to update the documentation if you make changes to these parameters! +parameters: + HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' + HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number + HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixPreCommands: '' # optional -- commands to run before Helix work item execution + HelixPostCommands: '' # optional -- commands to run after Helix work item execution + WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects + CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload + IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion + DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control + WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." + Creator: '' # optional -- if the build is external, use this to specify who is sending the job + DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO + condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() + continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false + BuildConfig: 'checked' # optional -- Mostly, superpmi will be run on checked builds + LibrariesArtifacts: '' + TestsArtifacts: '' + +steps: +- template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml + parameters: + osGroup: ${{ parameters.osGroup }} + sendParams: $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.proj /restore /t:Test /bl:$(Build.SourcesDirectory)/artifacts/log/$(BuildConfig)/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + environment: + MchFileTag: $(MchFileTag) + BuildConfig: ${{ parameters.BuildConfig }} + LibrariesArtifacts: ${{ parameters.LibrariesArtifacts }} + TestsArtifacts: ${{ parameters.TestsArtifacts }} + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) \ No newline at end of file diff --git a/src/coreclr/scripts/superpmi-setup.py b/src/coreclr/scripts/superpmi-setup.py index 73de8cf..db4fca2 100644 --- a/src/coreclr/scripts/superpmi-setup.py +++ b/src/coreclr/scripts/superpmi-setup.py @@ -33,8 +33,10 @@ ################################################################################ -import subprocess import argparse +import shutil +import subprocess +import tempfile from os import listdir, path, walk from os.path import isfile, join, getsize diff --git a/src/coreclr/scripts/superpmi.proj b/src/coreclr/scripts/superpmi.proj new file mode 100644 index 0000000..75797de --- /dev/null +++ b/src/coreclr/scripts/superpmi.proj @@ -0,0 +1,102 @@ + + + + \ + + + / + + + + + %HELIX_PYTHONPATH% + $(WorkItemDirectory)\pmiAssembliesDirectory + %HELIX_WORKITEM_PAYLOAD%\binaries + %HELIX_CORRELATION_PAYLOAD%\superpmi + %HELIX_WORKITEM_UPLOAD_ROOT% + + $(BUILD_SOURCESDIRECTORY)\artifacts\helixresults + $(SuperPMIDirectory)\superpmi.py collect --pmi -pmi_location $(SuperPMIDirectory)\pmi.dll + + + $HELIX_PYTHONPATH + $(WorkItemDirectory)/pmiAssembliesDirectory + $HELIX_WORKITEM_PAYLOAD/binaries + $HELIX_CORRELATION_PAYLOAD/superpmi + $HELIX_WORKITEM_UPLOAD_ROOT + + $(BUILD_SOURCESDIRECTORY)/artifacts/helixresults + $(SuperPMIDirectory)/superpmi.py collect --pmi -pmi_location $(SuperPMIDirectory)/pmi.dll + + + + $(Python) $(WorkItemCommand) -pmi_assemblies $(PmiAssembliesDirectory) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory) + + + + false + false + 5:00 + + + + + %(Identity) + + + + + + + + + + + + + + + + %(HelixWorkItem.OutputMchName).$(MchFileTag).%(HelixWorkItem.PartitionId) + $(PmiAssembliesPayload)$(FileSeparatorChar)%(HelixWorkItem.PmiAssemblies) + $(WorkItemCommand) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log + $(WorkItemTimeout) + %(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log + + + + + + + \ No newline at end of file