-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Enable SuperPMI collection of a libraries tests run #91101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BruceForstall
merged 28 commits into
dotnet:main
from
BruceForstall:SuperPmiLibsTestRunCollection3
Aug 30, 2023
Merged
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
90f2e9b
Enable libraries run collection
BruceForstall 4b2c4d9
[TEST ONLY] Comment out collections
BruceForstall db40a30
Fix variables indentation
BruceForstall ebb44a9
Fix runtime config variable
BruceForstall eb577f8
Fix Target syntax
BruceForstall 4965834
Fix GenerateRunScript dependencies
BruceForstall cf86cd6
Fix some issues with finding mcs, and other path variables
BruceForstall 7a47784
Copy CoreCLR built binaries to a location SPMI can find them
BruceForstall c802c6c
Try different way to get bash script
BruceForstall 472d3ea
Another attempt to install SPMI collection in RunTests.sh on non-Windows
BruceForstall d56e231
Try again to get bash script setup to work
BruceForstall 1fa505e
Move spmi collection enabling to the RunnerTemplate scripts
BruceForstall fc5294f
Refine RunnerTemplate files
BruceForstall eda1df0
Check disk space
BruceForstall b2a067b
Refine disk space query
BruceForstall 29cdd56
Split libraries tests collection into normal and no-tiered-compilation
BruceForstall b1cb1ce
Fix syntax
BruceForstall ffbb819
Differentiate different libraries test collections
BruceForstall 39cd4d3
Fix CultureInfoCurrentCulture.cs test
BruceForstall b623fd7
Re-enable all collections
BruceForstall c3d5f7a
Remove code to display disk space
BruceForstall 0ea2128
Restore tests.targets; no changes were necessary
BruceForstall b6eaf8f
Remove unnecessary extra output from sendtohelix.proj
BruceForstall ca66362
Extract SuperPMI post-processing steps to a separate yml file.
BruceForstall d735ddb
Fix osGroup, osSubgroup references
BruceForstall a71c37f
Extract some SuperPMI collection steps from run-test-job.xml
BruceForstall 04a3e1a
Extract setting variables from run-test-job.yml
BruceForstall 0f984c4
Simplify setting to try and avoid YML error:
BruceForstall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| ######################################################################################################## | ||
| # | ||
| # Finalize SuperPMI collection: (1) merge all MCH files generated by all Helix jobs, (2) upload MCH file | ||
| # to Azure Storage, (3) upload log files. Note that the steps are "condition: always()" because we want | ||
| # to upload as much of the collection as possible, even if there were test failures. | ||
| # | ||
| ######################################################################################################## | ||
|
|
||
| parameters: | ||
| buildConfig: '' | ||
| buildConfigUpper: '' | ||
| osGroup: '' | ||
| osSubgroup: '' | ||
| archType: '' | ||
| SuperPmiCollectionType: 'run' | ||
| SuperPmiCollectionName: 'libraries_tests' | ||
| MergedMchFileLocation: '' | ||
| MchFilesLocation: '' | ||
| SpmiLogsLocation: '' | ||
| SuperPmiMcsPath: '' | ||
| PythonScript: '' | ||
| PipScript: '' | ||
|
|
||
| steps: | ||
|
|
||
| # Create required directories for merged mch collection and superpmi logs | ||
| - ${{ if ne(parameters.osGroup, 'windows') }}: | ||
| - script: | | ||
| mkdir -p ${{ parameters.MergedMchFileLocation }} | ||
| mkdir -p ${{ parameters.SpmiLogsLocation }} | ||
| displayName: 'Create SuperPMI directories' | ||
| condition: always() | ||
| - ${{ if eq(parameters.osGroup, 'windows') }}: | ||
| - script: | | ||
| mkdir ${{ parameters.MergedMchFileLocation }} | ||
| mkdir ${{ parameters.SpmiLogsLocation }} | ||
| displayName: 'Create SuperPMI directories' | ||
| condition: always() | ||
|
|
||
| - script: ${{ parameters.PythonScript }} $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py merge-mch -log_level DEBUG -pattern ${{ parameters.MchFilesLocation }}${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}*.mch -output_mch_path ${{ parameters.MergedMchFileLocation }}${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}.${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}.mch -core_root ${{ parameters.SuperPmiMcsPath }} | ||
| displayName: 'Merge ${{ parameters.SuperPmiCollectionName }}-${{ parameters.SuperPmiCollectionType }} SuperPMI collections' | ||
| condition: always() | ||
|
|
||
| - template: /eng/pipelines/common/upload-artifact-step.yml | ||
| parameters: | ||
| rootFolder: ${{ parameters.MergedMchFileLocation }} | ||
| includeRootFolder: false | ||
| archiveType: $(archiveType) | ||
| tarCompression: $(tarCompression) | ||
| archiveExtension: $(archiveExtension) | ||
| artifactName: 'SuperPMI_Collection_${{ parameters.SuperPmiCollectionName }}_${{ parameters.SuperPmiCollectionType }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' | ||
| displayName: 'Upload artifacts SuperPMI ${{ parameters.SuperPmiCollectionName }}-${{ parameters.SuperPmiCollectionType }} collection' | ||
| condition: always() | ||
|
|
||
| # Add authenticated pip feed | ||
| - task: PipAuthenticate@1 | ||
| displayName: 'Pip Authenticate' | ||
| inputs: | ||
| artifactFeeds: public/dotnet-public-pypi | ||
| onlyAddExtraIndex: false | ||
| condition: always() | ||
|
|
||
| # Ensure the Python azure-storage-blob package is installed before doing the upload. | ||
| - script: ${{ parameters.PipScript }} install --user --upgrade pip && ${{ parameters.PipScript }} install --user azure.storage.blob==12.5.0 --force-reinstall | ||
| displayName: Upgrade Pip to latest and install azure-storage-blob Python package | ||
| condition: always() | ||
|
|
||
| - script: ${{ parameters.PythonScript }} $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py upload -log_level DEBUG -arch ${{ parameters.archType }} -build_type ${{ parameters.buildConfig }} -mch_files ${{ parameters.MergedMchFileLocation }}${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}.${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}.mch -core_root $(Build.SourcesDirectory)/artifacts/bin/coreclr/${{ parameters.osGroup }}.x64.${{ parameters.buildConfigUpper }} | ||
| displayName: 'Upload SuperPMI ${{ parameters.SuperPmiCollectionName }}-${{ parameters.SuperPmiCollectionType }} collection to Azure Storage' | ||
| condition: always() | ||
| env: | ||
| CLRJIT_AZ_KEY: $(clrjit_key1) # secret key stored as variable in pipeline | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: Copying superpmi.log of all partitions | ||
| inputs: | ||
| sourceFolder: '${{ parameters.MchFilesLocation }}' | ||
| contents: '**/${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}*.log' | ||
| targetFolder: '${{ parameters.SpmiLogsLocation }}' | ||
| condition: always() | ||
|
|
||
| - task: PublishPipelineArtifact@1 | ||
| displayName: Publish SuperPMI logs | ||
| inputs: | ||
| targetPath: ${{ parameters.SpmiLogsLocation }} | ||
| artifactName: 'SuperPMI_Logs_${{ parameters.SuperPmiCollectionName }}_${{ parameters.SuperPmiCollectionType }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' | ||
| condition: always() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still wonder why we need this here. We don't have a checked configuration in libraries. Also, please move this and other variables that are only needed by the superpmi YML file into the YML file, i.e.
PythonScriptand others.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just being consistent with the definition in the coreclr files.
I don't believe that's possible: the superpmi YML file is a "steps" template and as such can't define variables. (These here are not actual YML variables definitions either, they are "variables" parameters to a template that later injects them in a "variables:" section)