@@ -76,15 +76,30 @@ jobs:
7676
7777 # Steps represent a sequence of tasks that will be executed as part of the job
7878 steps :
79+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
80+ - name : Checkout Repository
81+ uses : actions/checkout@v4
82+ with :
83+ submodules : recursive
84+ fetch-depth : 0
85+
86+ - name : Get changed components
87+ run : |
88+ $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
89+ $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }})
90+ echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
91+ echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV
92+
7993 - name : Configure Pagefile
94+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
80958196 with :
8297 minimum-size : 32GB
8398 maximum-size : 32GB
8499 disk-root : " C:"
85100
86101 - name : Enable User-Mode Dumps collecting
87- if : ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }}
102+ if : ${{ ( env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && env.HAS_BUILDABLE_COMPONENTS == 'true ' }}
88103 shell : powershell
89104 run : |
90105 New-Item '${{ github.workspace }}\CrashDumps' -Type Directory
93108 Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2'
94109
95110 - name : Install .NET SDK v${{ env.DOTNET_VERSION }}
111+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
96112 uses : actions/setup-dotnet@v4
97113 with :
98114 dotnet-version : ${{ env.DOTNET_VERSION }}
@@ -101,20 +117,6 @@ jobs:
101117 if : ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
102118 run : dotnet --info
103119
104- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
105- - name : Checkout Repository
106- uses : actions/checkout@v4
107- with :
108- submodules : recursive
109- fetch-depth : 0
110-
111- - name : Get changed components
112- run : |
113- $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
114- $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }})
115- echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
116- echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV
117-
118120 # Restore Tools from Manifest list in the Repository
119121 - name : Restore dotnet tools
120122 if : ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
0 commit comments