mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-01 15:05:12 +00:00
[ci]Fix OutOfMemory in download by separating test-only artifacts and filtering unused files before publishing (#37403)
* chunk download * change pipeline * update pipeline * filter * for testing * use Variable * rebase file * add new line * rebase the pipeline
This commit is contained in:
@@ -456,6 +456,12 @@ jobs:
|
|||||||
Copy-Item src\gpo\assets\* "$(JobOutputDirectory)/gpo" -Recurse
|
Copy-Item src\gpo\assets\* "$(JobOutputDirectory)/gpo" -Recurse
|
||||||
displayName: Stage GPO files
|
displayName: Stage GPO files
|
||||||
|
|
||||||
|
- ${{ if eq(parameters.publishArtifacts, true) }}:
|
||||||
|
- publish: $(JobOutputDirectory)
|
||||||
|
artifact: $(JobOutputArtifactName)
|
||||||
|
displayName: Publish all outputs
|
||||||
|
condition: always()
|
||||||
|
|
||||||
# Running the tests may result in future jobs consuming artifacts out of this build
|
# Running the tests may result in future jobs consuming artifacts out of this build
|
||||||
- ${{ if eq(parameters.runTests, true) }}:
|
- ${{ if eq(parameters.runTests, true) }}:
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
@@ -465,8 +471,17 @@ jobs:
|
|||||||
contents: '$(BuildPlatform)/$(BuildConfiguration)/**/*'
|
contents: '$(BuildPlatform)/$(BuildConfiguration)/**/*'
|
||||||
targetFolder: '$(JobOutputDirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
targetFolder: '$(JobOutputDirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
||||||
|
|
||||||
- ${{ if eq(parameters.publishArtifacts, true) }}:
|
- task: CopyFiles@2
|
||||||
- publish: $(JobOutputDirectory)
|
displayName: Stage entire build output
|
||||||
artifact: $(JobOutputArtifactName)
|
inputs:
|
||||||
displayName: Publish all outputs
|
sourceFolder: $(JobOutputDirectory)
|
||||||
|
contents: |-
|
||||||
|
**
|
||||||
|
!**\*.pdb
|
||||||
|
!**\*.lib
|
||||||
|
targetFolder: '$(JobOutputDirectory)\TestArtifacts'
|
||||||
|
|
||||||
|
- publish: $(JobOutputDirectory)\TestArtifacts
|
||||||
|
artifact: $(JobOutputArtifactName)-TestArtifacts
|
||||||
|
displayName: Publish all outputs for testing
|
||||||
condition: always()
|
condition: always()
|
||||||
|
@@ -19,6 +19,7 @@ jobs:
|
|||||||
BuildPlatform: ${{ parameters.platform }}
|
BuildPlatform: ${{ parameters.platform }}
|
||||||
BuildConfiguration: ${{ parameters.configuration }}
|
BuildConfiguration: ${{ parameters.configuration }}
|
||||||
SrcPath: $(Build.Repository.LocalPath)
|
SrcPath: $(Build.Repository.LocalPath)
|
||||||
|
TestArtifactsName: build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }}-TestArtifacts
|
||||||
pool:
|
pool:
|
||||||
${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}:
|
${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}:
|
||||||
${{ if ne(parameters.platform, 'ARM64') }}:
|
${{ if ne(parameters.platform, 'ARM64') }}:
|
||||||
@@ -59,10 +60,10 @@ jobs:
|
|||||||
- script:
|
- script:
|
||||||
reg add "HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels" /v PowerToys.exe /t REG_SZ /d "3"
|
reg add "HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels" /v PowerToys.exe /t REG_SZ /d "3"
|
||||||
displayName: "Enable WebView2 Canary Channel"
|
displayName: "Enable WebView2 Canary Channel"
|
||||||
|
|
||||||
- download: current
|
- download: current
|
||||||
displayName: Download artifacts
|
displayName: Download artifacts
|
||||||
artifact: build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }}
|
artifact: $(TestArtifactsName)
|
||||||
patterns: |-
|
patterns: |-
|
||||||
**
|
**
|
||||||
!**\*.pdb
|
!**\*.pdb
|
||||||
@@ -91,7 +92,7 @@ jobs:
|
|||||||
platform: '$(BuildPlatform)'
|
platform: '$(BuildPlatform)'
|
||||||
configuration: '$(BuildConfiguration)'
|
configuration: '$(BuildConfiguration)'
|
||||||
testSelector: 'testAssemblies'
|
testSelector: 'testAssemblies'
|
||||||
searchFolder: '$(Pipeline.Workspace)\build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }}'
|
searchFolder: '$(Pipeline.Workspace)\$(TestArtifactsName)'
|
||||||
vsTestVersion: 'toolsInstaller'
|
vsTestVersion: 'toolsInstaller'
|
||||||
uiTests: true
|
uiTests: true
|
||||||
rerunFailedTests: true
|
rerunFailedTests: true
|
||||||
|
Reference in New Issue
Block a user