6060 strategy :
6161 fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.
6262 matrix :
63- winui : [2, 3] # Temporary until we can get Uno/Wasm working
64- multitarget : ['uwp', 'wasdk'] # Temporary until we can get Uno/Wasm working
63+ winui : [2, 3]
64+ multitarget : ['uwp', 'wasdk', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android']
6565 exclude :
6666 # WinUI 2 not supported on wasdk
6767 - winui : 2
@@ -134,7 +134,42 @@ jobs:
134134
135135 # Generate full solution with all projects (sample gallery heads, components, tests)
136136 - name : Generate solution with ${{ matrix.multitarget }} gallery, components and tests
137- run : powershell -version 5.1 -command "./tooling/Build-Toolkit-Components.ps1 -Components DependencyPropertyGenerator -Release -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop
137+ working-directory : ./
138+ run : powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop
139+
140+ # Build solution
141+ - name : MSBuild (With diagnostics)
142+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
143+ run : >
144+ msbuild.exe /restore /nowarn:MSB4011
145+ /p:Configuration=Release
146+ /m
147+ ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }}
148+ /v:${{ env.MSBUILD_VERBOSITY }}
149+ CommunityToolkit.AllComponents.sln
150+
151+ - name : MSBuild
152+ if : ${{ env.ENABLE_DIAGNOSTICS == 'false' }}
153+ run : msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release
154+
155+ # Run tests
156+ - name : Setup VSTest Path
157+ uses : darenm/setup-vstest@3a16d909a1f3bbc65b52f8270d475d905e7d3e44
158+
159+ - name : Install Testspace Module
160+ uses : testspace-com/setup-testspace@v1
161+ with :
162+ domain : ${{ github.repository_owner }}
163+
164+ - name : Run component tests against ${{ matrix.multitarget }}
165+ if : ${{ matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk' }}
166+ id : test-platform
167+ run : vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ matrix.multitarget }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ matrix.multitarget }}.trx" /Blame
168+
169+ - name : Create test reports
170+ run : |
171+ testspace '[${{ matrix.multitarget }}]./TestResults/*.trx'
172+ if : ${{ (matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk') && (steps.test-generator.conclusion == 'success' || steps.test-platform.conclusion == 'success') }}
138173
139174 - name : Artifact - Diagnostic Logs
140175 uses : actions/upload-artifact@v4
@@ -178,7 +213,7 @@ jobs:
178213 strategy :
179214 fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.
180215 matrix :
181- winui : [2, 3] # Temporary until we can get Uno/Wasm working
216+ winui : [2, 3]
182217
183218 env :
184219 VERSION_PROPERTY : ${{ github.ref == 'refs/heads/main' && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
@@ -234,7 +269,7 @@ jobs:
234269
235270 # Build and pack component nupkg
236271 - name : Build and pack component packages
237- run : ./tooling/Build-Toolkit-Components.ps1 -Components DependencyPropertyGenerator - MultiTargets uwp,wasdk -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release
272+ run : ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release
238273
239274 - name : Validate package names
240275 if : ${{ env.VERSION_PROPERTY != '' }}
@@ -271,4 +306,52 @@ jobs:
271306 if : ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
272307 with :
273308 name : build-logs-winui${{ matrix.winui }}
274- path : ./*.*log
309+ path : ./*.*log
310+
311+ wasm-linux :
312+ runs-on : ubuntu-latest
313+ env :
314+ HEADS_DIRECTORY : tooling/ProjectHeads
315+
316+ steps :
317+ - name : Install .NET SDK v${{ env.DOTNET_VERSION }}
318+ uses : actions/setup-dotnet@v4
319+ with :
320+ dotnet-version : ${{ env.DOTNET_VERSION }}
321+
322+ - name : .NET Info (if diagnostics)
323+ if : ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
324+ run : dotnet --info
325+
326+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
327+ - name : Checkout Repository
328+ uses : actions/checkout@v4
329+ with :
330+ submodules : recursive
331+
332+ # Restore Tools from Manifest list in the Repository
333+ - name : Restore dotnet tools
334+ run : dotnet tool restore
335+
336+ - name : Generate solution
337+ shell : pwsh
338+ working-directory : ./
339+ run : ./tooling/GenerateAllSolution.ps1${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}
340+
341+ - name : Install ninja for WASM native dependencies
342+ run : sudo apt-get install ninja-build
343+
344+ # Issue with Comment Links currently, see: https://github.com/mrlacey/CommentLinks/issues/38
345+ # See launch.json configuration file for analogous command we're emulating here to build LINK: ../../.vscode/launch.json:CommunityToolkit.App.Wasm.csproj
346+ - name : dotnet build
347+ working-directory : ./${{ env.HEADS_DIRECTORY }}/AllComponents/Wasm/
348+ run : dotnet build /r /bl /p:UnoSourceGeneratorUseGenerationHost=true /p:UnoSourceGeneratorUseGenerationController=false
349+
350+ # TODO: Do we want to run tests here? Can we do that on linux easily?
351+
352+ - name : Artifact - Diagnostic Logs
353+ uses : actions/upload-artifact@v4
354+ if : ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
355+ with :
356+ name : linux-logs
357+ path : ./**/*.*log
0 commit comments