@@ -76,15 +76,30 @@ jobs:
76
76
77
77
# Steps represent a sequence of tasks that will be executed as part of the job
78
78
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
+
79
93
- name : Configure Pagefile
94
+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
80
95
uses : al-cheb/configure-pagefile-action@v1.4
81
96
with :
82
97
minimum-size : 32GB
83
98
maximum-size : 32GB
84
99
disk-root : " C:"
85
100
86
101
- 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 ' }}
88
103
shell : powershell
89
104
run : |
90
105
New-Item '${{ github.workspace }}\CrashDumps' -Type Directory
@@ -93,27 +108,22 @@ jobs:
93
108
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2'
94
109
95
110
- name : Install .NET SDK v${{ env.DOTNET_VERSION }}
111
+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
96
112
uses : actions/setup-dotnet@v4
97
113
with :
98
114
dotnet-version : ${{ env.DOTNET_VERSION }}
99
115
100
116
- name : .NET Info (if diagnostics)
101
- if : ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
117
+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
102
118
run : dotnet --info
103
119
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
120
# Restore Tools from Manifest list in the Repository
112
121
- name : Restore dotnet tools
122
+ if : ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
113
123
run : dotnet tool restore
114
124
115
125
- 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' }}
117
127
run : >
118
128
dotnet tool run uno-check
119
129
--ci
@@ -127,15 +137,9 @@ jobs:
127
137
128
138
- name : Add msbuild to PATH
129
139
uses : microsoft/setup-msbuild@v2
140
+ if : ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
130
141
with :
131
142
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
139
143
140
144
# Generate full solution with all projects (sample gallery heads, components, tests)
141
145
- name : Generate solution with ${{ matrix.multitarget }} gallery, components and tests
@@ -362,4 +366,4 @@ jobs:
362
366
if : ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
363
367
with :
364
368
name : linux-logs
365
- path : ./**/*.*log
369
+ path : ./**/*.*log
0 commit comments