@@ -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
@@ -93,27 +108,22 @@ jobs:
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' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
96112 uses : actions/setup-dotnet@v4
97113 with :
98114 dotnet-version : ${{ env.DOTNET_VERSION }}
99115
100116 - name : .NET Info (if diagnostics)
101- if : ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
117+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == '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-
111120 # Restore Tools from Manifest list in the Repository
112121 - name : Restore dotnet tools
122+ if : ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
113123 run : dotnet tool restore
114124
115125 - name : Run Uno Check to Install Dependencies
116- if : ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' }}
126+ if : ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
117127 run : >
118128 dotnet tool run uno-check
119129 --ci
@@ -127,15 +137,9 @@ jobs:
127137
128138 - name : Add msbuild to PATH
129139 uses : microsoft/setup-msbuild@v2
140+ if : ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
130141 with :
131142 vs-version : ' [17.9,)'
132- # Get changed components
133- - name : Get changed components
134- run : |
135- $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }})
136- $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }})
137- echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV
138- echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV
139143
140144 # Generate full solution with all projects (sample gallery heads, components, tests)
141145 - name : Generate solution with ${{ matrix.multitarget }} gallery, components and tests
@@ -362,4 +366,4 @@ jobs:
362366 if : ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
363367 with :
364368 name : linux-logs
365- path : ./**/*.*log
369+ path : ./**/*.*log
0 commit comments