Skip to content

Commit

Permalink
Create a SuperPMI collection pipeline (dotnet#42053)
Browse files Browse the repository at this point in the history
* Create a SuperPMI collection pipeline

Start with a clone of jitstress.yml, and go from there.

* Only build Windows_NT_x64, disable test builds and runs

* TEMPORARY: disable normal PR triggered jobs

* some template files for superpmi

* Little trial error# 1

* fix the superpmi-setup.ps1

* Disable CoreClrTestBuildHost, fix the project path in superpmi-send-to-helix

* Skip build, download, create core_root

* Just copy superpmi scripts, import pipeline-logging-functions

* add a dummy step

* add missing space before message

* Replace message with script

* Temporarily disable dependsOn

* disable another dependsOn

* Pass superpmi.proj file

* logging around send-to-helix

* fix superpmi.proj to include ItemGroup

* have placeholder.txt in WorkItem folder

* fix workitem folder creation, script name

* Re-enable build coreclr, libraries, download, core_root

* fix superpmi.py path

* clone jitutils, build and copy pmi.dll

* Pass Core_Root as payload

* Use hardcoded checked

* Use .dotnet from runtime repo
- Build jitutils before and send the payload to helix

* Fix the pmi.dll location and add  -output_mch_path

* fix the output path

* Try publishing SourcesDirectory

* Upload to HELIX_WORKITEM_UPLOAD_ROOT

* Include test in collection and partition core_root and test

* Enable CoreClrTestBuildHost

* Add dependsOn P1 test

* Add DownloadFilesFromResults

* Properly copy the Tests

* Workaround for dotnet/arcade#6179

* Disable test run, SuperPMI just system.web.dll

* Fix the mch path

* Comment partition for test

* Remove commented code

* Increase timeout to 12 hours

* fast pass

- Comment build coreclr/libraries job
- Instead just download coreclr from some previous run, and tell that it is core_root

* Update the machine pool

* Add a dummy step

* Use SuperPMI_Min.zip that contains all the required files

* Another way of Extracting cab

* download in powershell, extract files separately

* fix the zip path

* Another logic of download zip

* fix path

* fix newdir path

* more fixes

* fix extract step

* add test python script and modify creator

* Map secret to env

* decrease timeout, fix superpmi path in proj, print unzipped contents

* Add a step to download and dir artifacts

* Attempt to call super_pmi upload

* list all contents

* Also dir SourcesDir\artifacts

* Use DownloadPipelineArtifact

* Use the right key

* Upload from helixresults

* cleanup run-superpmi-job.yml

* Re-enable superpmi for CORE_ROOT

* fix the dependsOn

* Replace checked with $(BuildConfig)

* Replace checked with $(BuildConfig)
Comment download artifacts

* change helix queue for windows and add for arm64

* Use FileSeparateChar in superpmi.proj

* Add Linux x64

* Fix the helix queue, property erroro

* logging in shell

* Fix PayloadDir and CorrelationPayloadDir

* Make timeout to 5 hours

* Print workitem contents

* fix WorkItemDirectory

* Just copy pmi.dll

* fix the pmi_assemblies path

* disable reporter

* pop put JitUtilsDirectory before deleting it

* chmod for superpmi-setup.sh

* just copy pmi.dll for unix

* fix the parameter to unix

* Add logging to understand -pmi_assemblies issue

* Add "binaries" folder where payload is present
fix unit script that initializes array

* remove precommand

* Pass Core_Root as CorrelationPayload

- Pass Core_Root as CorrelationPayload
- Pass tag to name .mch file with
- Changes to .ps1 and .sh to copy Core_Root directly

* Add back the workaround for dotnet/arcade#6179

Also, rename 'checked' -> 'Checked'

* fix checked for Linux

* mkdir for linux

* fix path in HelixResultsDestinationDir

* Enable Windows x86/arm64

* fix the python path

* First version of superpmi-setup.py

* Attempt to use superpmi-setup.py

* Fix spelling of LibrariesArtifacts, set python path

* TestArtifacts commented

* superpmi-setup script for linux

* Enable Linux_x64

* Added pydocs

* Add option for exclude_directories

* Moved all the logic to superpmi-setup.py

* Replace superpmi-setup.ps1 and superpmi-setup.sh with superpmi-setup.py

* Fix up in superpmi-setup.py

* fix display name

* add missing spacE

* Use differnet conditional

* ignore PermissionError while cleaning up temp folder

* fix workitem copy for linux

* fix copy for unix

* Publish logs

* Print LibrariesArtifacts

* remove space in front of publish logs desc

* Add missing quotes for LibrariesArtifacts

* Download x64 coreclr to make upload work

* Enable Windows x86/arm64, Linux arm/arm64

* Delete superpmi-setup.ps1, superpmi-setup.sh

* Fix space around LibrariesArtifacts

* Download real coreclr x64

* ignore native dlls

* Make superpmi.py Python3.6 friendly

* Minor cleanup

* Cleanup superpmi-send-to-helix to use helix-inner-step

* Remove redundant steps

* Merge mch files

* Pass osGroup

* Make superpmi-setup script takes tests_directory

* Enable SPMI collection for P1

* General cleanup

* fix merge_mch pattern for OS

* Log the SPMI collection output and put it in upload_root folder

* Replace robocopy/rsync with shutil.copy2

Note that shutil.copy2 is very slow specially on Linux as compared to rsync.
But I think we are ok to have slowness in return of simpler code.

* fix path of pmi.dll to be copied

* Include linux .so and file_exe files in copy_directories

* Try publishing just .mch file

* Revert "Try publishing just .mch file"

This reverts commit a5312c0.

* Disable tests SPMI collection on 42053

- Tests run times out on Windows
- Some of the partition's collection failed for tests because reply was not clean
- Here are the details when libraries/tests were run:
  https://dev.azure.com/dnceng/internal/_build/results?buildId=832814&view=results
- Hence, disable tests run and just have libraries run for now.
- I didn't remove the test run part but commented the portion of tests collection with
  TODO intentionally so when I have to enable it, I will know what to enable.

* Review feedback

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
  • Loading branch information
BruceForstall and kunalspathak committed Oct 1, 2020
1 parent 464010d commit 6b33e41
Show file tree
Hide file tree
Showing 8 changed files with 886 additions and 4 deletions.
102 changes: 102 additions & 0 deletions eng/common/superpmi/superpmi.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">

<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<FileSeparatorChar>\</FileSeparatorChar>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<FileSeparatorChar>/</FileSeparatorChar>
</PropertyGroup>

<!-- The directory structure of pmiAssembliesPayload is
source\workitem\pmiAssembliesDirectory\<machine_specific_load_0>\binaries
source\workitem\pmiAssembliesDirectory\<machine_specific_load_1>\binaries
...
source\workitem\pmiAssembliesDirectory\<machine_specific_load_N>\binaries
PmiAssembliesPayload - Path that will be sent to helix machine to run collection on
PmiAssembliesDirectory - Path on helix machine itself where superpmi.py will discover the sent assemblies.
-->
<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<Python>%HELIX_PYTHONPATH%</Python>
<PmiAssembliesPayload>$(WorkItemDirectory)\pmiAssembliesDirectory</PmiAssembliesPayload>
<PmiAssembliesDirectory>%HELIX_WORKITEM_PAYLOAD%\binaries</PmiAssembliesDirectory>
<SuperPMIDirectory>%HELIX_CORRELATION_PAYLOAD%\superpmi</SuperPMIDirectory>
<OutputMchPath>%HELIX_WORKITEM_UPLOAD_ROOT%</OutputMchPath>
<!-- Workaround until https://github.com/dotnet/arcade/pull/6179 is not available -->
<HelixResultsDestinationDir>$(BUILD_SOURCESDIRECTORY)\artifacts\helixresults</HelixResultsDestinationDir>
<WorkItemCommand>$(SuperPMIDirectory)\superpmi.py collect --pmi -pmi_location $(SuperPMIDirectory)\pmi.dll </WorkItemCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<Python>$HELIX_PYTHONPATH</Python>
<PmiAssembliesPayload>$(WorkItemDirectory)/pmiAssembliesDirectory</PmiAssembliesPayload>
<PmiAssembliesDirectory>$HELIX_WORKITEM_PAYLOAD/binaries</PmiAssembliesDirectory>
<SuperPMIDirectory>$HELIX_CORRELATION_PAYLOAD/superpmi</SuperPMIDirectory>
<OutputMchPath>$HELIX_WORKITEM_UPLOAD_ROOT</OutputMchPath>
<!-- Workaround until https://github.com/dotnet/arcade/pull/6179 is not available -->
<HelixResultsDestinationDir>$(BUILD_SOURCESDIRECTORY)/artifacts/helixresults</HelixResultsDestinationDir>
<WorkItemCommand>$(SuperPMIDirectory)/superpmi.py collect --pmi -pmi_location $(SuperPMIDirectory)/pmi.dll </WorkItemCommand>
</PropertyGroup>

<PropertyGroup Condition="'$(WorkItemCommand)' != ''">
<WorkItemCommand>$(Python) $(WorkItemCommand) -pmi_assemblies $(PmiAssembliesDirectory) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory)</WorkItemCommand>
</PropertyGroup>

<PropertyGroup>
<EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
<EnableXUnitReporter>false</EnableXUnitReporter>
<WorkItemTimeout>5:00</WorkItemTimeout>
</PropertyGroup>

<ItemGroup>
<HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
<PayloadDirectory>%(Identity)</PayloadDirectory>
</HelixCorrelationPayload>
</ItemGroup>

<ItemGroup>
<!-- libraries payload -->
<LibraryPartitions Include="$([System.IO.Directory]::GetDirectories($(LibrariesArtifacts)))"/>
<Partition Include="@(LibraryPartitions -> '%(Filename)')" PmiAssemblies="Core_Root$(FileSeparatorChar)%(Filename)" OutputMchName="libraries.pmi" PartitionId="%(Filename)" />

<!-- tests payload -->
<!-- TODO: Disable SPMI for P1 tests -->
<!-- <TestPartitions Include="$([System.IO.Directory]::GetDirectories($(TestsArtifacts)))"/>
<Partition Include="@(TestPartitions -> '%(Filename)')" PmiAssemblies="Tests$(FileSeparatorChar)%(Filename)" OutputMchName="tests.pmi" PartitionId="%(Filename)" /> -->
</ItemGroup>

<ItemGroup>
<HelixWorkItem Include="@(Partition)">
<OutputFileName>%(HelixWorkItem.OutputMchName).$(MchFileTag).%(HelixWorkItem.PartitionId)</OutputFileName>
<PayloadDirectory>$(PmiAssembliesPayload)$(FileSeparatorChar)%(HelixWorkItem.PmiAssemblies)</PayloadDirectory>
<Command>$(WorkItemCommand) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults>%(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>

<!--
This is useful for local testing to print the produced helix items
To use this when you are changing how items are produced, uncomment the target
and replace the Project item at the top of the file with this:
<Project DefaultTargets="printItems">
Once you've done that you can run this to see the results:
dotnet msbuild .\scenarios.proj /v:n
-->
<!--
<PropertyGroup>
<HelixTargetQueues>Some_Queue</HelixTargetQueues>
<LibrariesArtifacts>E:\temp\power\test1</LibrariesArtifacts>
<TestsArtifacts>E:\temp\power\test1</TestsArtifacts>
</PropertyGroup>
<Target Name="printItems">
<Message Text="@(HelixWorkItem -> 'name: %(HelixWorkItem.Identity)
dir: %(HelixWorkItem.PayloadDirectory)
pre: %(HelixWorkItem.PreCommands)
command: %(HelixWorkItem.Command)
post: %(HelixWorkItem.PostCommands)
timeout: %(HelixWorkItem.Timeout) '"/>
</Target>
-->

</Project>
53 changes: 53 additions & 0 deletions eng/common/templates/steps/superpmi-send-to-helix.yml
Original file line number Diff line number Diff line change
@@ -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)/eng/common/superpmi/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)
66 changes: 66 additions & 0 deletions eng/pipelines/coreclr/superpmi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
trigger: none

pr: none

# schedules:
# - cron: "0 4 * * *"
# displayName: Daily at 8:00 PM (UTC-8:00)
# branches:
# include:
# - master
# always: true

jobs:
#
# Checkout repository
#
- template: /eng/pipelines/common/checkout-job.yml

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
buildConfig: checked
platforms:
# Linux tests are built on the OSX machines.
# - OSX_x64
- Linux_arm
- Linux_arm64
- Linux_x64
- Windows_NT_x64
- Windows_NT_x86
- Windows_NT_arm64
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop

# TODO: Disable SPMI for P1 tests
# - template: /eng/pipelines/common/platform-matrix.yml
# parameters:
# jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml
# buildConfig: checked
# platforms:
# - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
# jobParameters:
# testGroup: outerloop
# liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-job.yml
buildConfig: checked
platforms:
# Linux tests are built on the OSX machines.
# - OSX_x64
- Linux_arm
- Linux_arm64
- Linux_x64
- Windows_NT_x64
- Windows_NT_x86
- Windows_NT_arm64
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

143 changes: 143 additions & 0 deletions eng/pipelines/coreclr/templates/run-superpmi-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
parameters:
steps: [] # optional -- any additional steps that need to happen before pulling down the jitutils repo and sending the jitutils 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: 'superpmi.proj' # optional -- project file to build helix workitems
runKind: '' # required -- test category

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 }}

- HelixApiAccessToken: ''
- HelixPreCommand: ''
- MchFileTag: '${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}'

- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- name: PythonScript
value: 'py -3'
- name: PipScript
value: 'py -3 -m pip'
- name: Core_Root_Dir
value: '$(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}\Tests\Core_Root'
- name: MchFilesLocation
value: '$(Build.SourcesDirectory)\artifacts\helixresults\'
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- name: PythonScript
value: 'python3'
- name: PipScript
value: 'pip3'
- name: Core_Root_Dir
value: '$(Build.SourcesDirectory)/artifacts/tests/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.$(buildConfigUpper)/Tests/Core_Root'
- name: MchFilesLocation
value: '$(Build.SourcesDirectory)/artifacts/helixresults/'
workspace:
clean: all
pool:
${{ parameters.pool }}
container: ${{ parameters.container }}
strategy:
matrix:
${{ each framework in parameters.frameworks }}:
${{ framework }}:
_Framework: ${{ framework }}
steps:
- ${{ parameters.steps }}

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi-setup.py -source_directory $(Build.SourcesDirectory) -core_root_directory $(Core_Root_Dir) -arch $(archType) -mch_file_tag $(MchFileTag) -libraries_directory $(Core_Root_Dir) -tests_directory $(managedTestArtifactRootFolderPath) -max_size 50 # size in MB
displayName: ${{ format('SuperPMI setup ({0})', parameters.osGroup) }}

# Run superpmi collection in helix
- template: /eng/common/templates/steps/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)'
HelixAccessToken: $(HelixApiAccessToken)
HelixTargetQueues: $(Queue)
HelixPreCommands: $(HelixPreCommand)
Creator: $(Creator)
WorkItemTimeout: 4:00 # 4 hours
WorkItemDirectory: '$(WorkItemDirectory)'
CorrelationPayloadDirectory: '$(CorrelationPayloadDirectory)'
ProjectFile: ${{ parameters.projectFile }}
BuildConfig: ${{ parameters.buildConfig }}
osGroup: ${{ parameters.osGroup }}
LibrariesArtifacts: '$(LibrariesArtifacts)'
TestsArtifacts: '$(TestsArtifacts)'

- task: PublishPipelineArtifact@1
displayName: Publish SuperPMI collection
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/helixresults
artifactName: 'SuperPMI_Result_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}'
continueOnError: true
condition: always()

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py merge-mch -pattern $(MchFilesLocation)libraries.pmi*.mch -output_mch_path $(MchFilesLocation)libraries.pmi.$(MchFileTag).mch
displayName: Merge libraries SuperPMI collections

# TODO: Disable SPMI for P1 tests
# - script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py merge-mch -pattern $(MchFilesLocation)tests.pmi*.mch -output_mch_path $(MchFilesLocation)tests.pmi.$(MchFileTag).mch
# displayName: Merge tests SuperPMI collections

# For now, we won't upload merged collection as an artifact.

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py upload -arch $(archType) -build_type $(buildConfig) -mch_files $(MchFilesLocation)libraries.pmi.$(MchFileTag).mch -core_root $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).x64.$(buildConfigUpper)
displayName: Upload SuperPMI libraries collection to Azure Storage
env:
CLRJIT_AZ_KEY: $(clrjit_key1) # secret key stored as variable in pipeline

# TODO: Disable SPMI for P1 tests
# - script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py upload -arch $(archType) -build_type $(buildConfig) $(MchFilesLocation)tests.pmi.$(MchFileTag).mch -core_root $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).x64.$(buildConfigUpper)
# displayName: Upload SuperPMI tests collection to Azure Storage
# env:
# CLRJIT_AZ_KEY: $(clrjit_key1) # secret key stored as variable in pipeline

- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: 'SuperPMI_Logs_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}'
continueOnError: true
condition: always()
Loading

0 comments on commit 6b33e41

Please sign in to comment.