Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 578
Replace Step_CopyExtraResultFilesForCI with a YAML template#11568
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| parameters: | ||
| xaSourcePath: $(System.DefaultWorkingDirectory) | ||
| configuration: $(XA.Build.Configuration) | ||
| condition: or(ne(variables['Agent.JobStatus'], 'Succeeded'), eq(variables['XA.PublishAllLogs'], 'true')) | ||
| # Copies extra build and test result files into $(Build.StagingDirectory) so | ||
| # they can be uploaded as pipeline artifacts. This template replaces the old | ||
| # `Step_CopyExtraResultFilesForCI` xaprepare step. | ||
| steps: | ||
| # Build-side files: configuration files scattered across the source tree. | ||
| # Preserve the relative paths so e.g. external/.../config.log lands at | ||
| # Build$(Configuration)/external/.../config.log. | ||
| - task: CopyFiles@2 | ||
| displayName: Copy extra build result files (preserve paths) | ||
| condition: ${{ parameters.condition }} | ||
| continueOnError: true | ||
| inputs: | ||
| sourceFolder: ${{ parameters.xaSourcePath }} | ||
| contents: | | ||
| **/Configuration.OperatingSystem.props | ||
| **/Configuration.Override.props | ||
| **/config.log | ||
| **/config.status | ||
| **/config.h | ||
| **/android-*.config.cache | ||
| CMakeFiles/*.log | ||
| external/Java.Interop/bin/Build${{ parameters.configuration }}/*.props | ||
| targetFolder: $(Build.StagingDirectory)/Build${{ parameters.configuration }} | ||
| flattenFolders: false | ||
| # Build-side files from bin/Build$(Configuration); flat at the destination | ||
| # root. Use the repo root as sourceFolder so a missing | ||
| # bin/Build$(Configuration) is just 0 matches rather than a hard error | ||
| # (matches the old C# Directory.Exists guard). | ||
| - task: CopyFiles@2 | ||
| displayName: Copy bin/Build$(Configuration) result files | ||
| condition: ${{ parameters.condition }} | ||
| continueOnError: true | ||
| inputs: | ||
| sourceFolder: ${{ parameters.xaSourcePath }} | ||
| contents: | | ||
| bin/Build${{ parameters.configuration }}/XABuildConfig.cs | ||
| bin/Build${{ parameters.configuration }}/*.binlog | ||
| bin/Build${{ parameters.configuration }}/prepare*log | ||
| bin/Build${{ parameters.configuration }}/*.json | ||
| bin/Build${{ parameters.configuration }}/*.mk | ||
| bin/Build${{ parameters.configuration }}/*.projitems | ||
| bin/Build${{ parameters.configuration }}/*.cmake | ||
| bin/Build${{ parameters.configuration }}/*.targets | ||
| bin/Build${{ parameters.configuration }}/CMakeCache.txt | ||
| bin/Build${{ parameters.configuration }}/.ninja_log | ||
| bin/Build${{ parameters.configuration }}/clang-tidy*.log | ||
| targetFolder: $(Build.StagingDirectory)/Build${{ parameters.configuration }} | ||
| flattenFolders: true | ||
| # Test-side files from bin/Test$(Configuration); top-level only, flat. | ||
| # Same pattern: sourceFolder is the repo root so missing folders don't error. | ||
| - task: CopyFiles@2 | ||
| displayName: Copy bin/Test$(Configuration) result files | ||
| condition: ${{ parameters.condition }} | ||
| continueOnError: true | ||
| inputs: | ||
| sourceFolder: ${{ parameters.xaSourcePath }} | ||
| contents: | | ||
| bin/Test${{ parameters.configuration }}/*.apkdesc | ||
| bin/Test${{ parameters.configuration }}/*.aabdesc | ||
| bin/Test${{ parameters.configuration }}/logcat-*.txt | ||
| bin/Test${{ parameters.configuration }}/*log | ||
| bin/Test${{ parameters.configuration }}/TestOutput-*.txt | ||
| bin/Test${{ parameters.configuration }}/Timing_* | ||
| bin/Test${{ parameters.configuration }}/*.runsettings | ||
| targetFolder: $(Build.StagingDirectory)/Test${{ parameters.configuration }} | ||
| flattenFolders: true | ||
| # Test-side compatibility subfolder. sourceFolder at the repo root so a | ||
| # missing compatibility/ doesn't error. | ||
| - task: CopyFiles@2 | ||
| displayName: Copy bin/Test$(Configuration)/compatibility files | ||
| condition: ${{ parameters.condition }} | ||
| continueOnError: true | ||
| inputs: | ||
| sourceFolder: ${{ parameters.xaSourcePath }} | ||
| contents: bin/Test${{ parameters.configuration }}/compatibility/* | ||
| targetFolder: $(Build.StagingDirectory)/Test${{ parameters.configuration }}/compatibility | ||
| flattenFolders: true | ||
| # Repo-root TestResult*.xml and *.csv files into test-extras (top-level only). | ||
| - task: CopyFiles@2 | ||
| displayName: Copy TestResult*.xml and *.csv to test-extras | ||
| condition: ${{ parameters.condition }} | ||
| continueOnError: true | ||
| inputs: | ||
| sourceFolder: ${{ parameters.xaSourcePath }} | ||
| contents: | | ||
| TestResult*.xml | ||
| *.csv | ||
| targetFolder: $(Build.StagingDirectory)/Test${{ parameters.configuration }}/test-extras | ||
| flattenFolders: true | ||
| # Stray llc.exe-* files from the system temp directory (matches Path.GetTempPath()). | ||
| - pwsh: | | ||
| $tempDir = [System.IO.Path]::GetTempPath() | ||
| $destDir = "$(Build.StagingDirectory)/Test${{ parameters.configuration }}/test-extras" | ||
| if (Test-Path $tempDir) { | ||
| $llcFiles = Get-ChildItem -Path $tempDir -Filter 'llc.exe-*' -File -ErrorAction SilentlyContinue | ||
| if ($llcFiles) { | ||
| New-Item -ItemType Directory -Force -Path $destDir | Out-Null | ||
| $llcFiles | ForEach-Object { Copy-Item -LiteralPath $_.FullName -Destination $destDir -Force -ErrorAction SilentlyContinue } | ||
| } | ||
jonathanpeppers marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| displayName: Copy llc.exe-* temp files to test-extras | ||
| condition: ${{ parameters.condition }} | ||
| continueOnError: true | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
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.
🤖 💡 Performance — The
**/config.hand**/config.logpatterns are very broad recursive globs that will walk the entire source tree (includingexternal/,packages/, etc.). This matches the original C# behavior (SearchOption.AllDirectories), so it's correct for parity — but a future follow-up could scope these to known subtrees (e.g.src/**/config.h) to speed up artifact collection on large workspaces.Rule: Behavioral parity acknowledged
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.
Not fixing, to keep behavior the same as before.