Remove intermedia obj files once build finished (#14361)

### Description
Remove intermedia obj files and reenable cache

### Motivation and Context
Recently, training_debug_x64 pipeline often failed due to not enough
space.
It could free nearly 8G space by deleting obj files.
So, the compilation cache can be reenabled
This commit is contained in:
Yi Zhang 2023-01-20 13:37:15 +08:00 committed by GitHub
parent 668586e8f8
commit 3d6cea14f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -209,6 +209,20 @@ jobs:
displayName: cache stat
condition: eq(${{ parameters.WITH_CACHE }}, true)
- powershell: |
Get-Volume D
displayName: check disk size
- task: DeleteFiles@1
displayName: 'Delete intermedia files from $(Build.BinariesDirectory)\${{ parameters.BuildConfig }}'
inputs:
SourceFolder: '$(Build.BinariesDirectory)\${{ parameters.BuildConfig }}'
Contents: |
**/*.obj
- powershell: |
Get-Volume D
displayName: check disk size
- ${{ if eq(parameters.EnablePython, true) }}:
- task: PythonScript@0

View file

@ -146,7 +146,7 @@ stages:
isTraining: true
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
WITH_CACHE: true
MachinePool: 'onnxruntime-Win2019-CPU-training'
- stage: training_x64_release