@@ -61,14 +61,17 @@ jobs:
61
61
62
62
# See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
63
63
strategy :
64
- fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them both to run to completion.
64
+ fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.
65
65
matrix :
66
- platform : [WinUI2, WinUI3]
66
+ winui : [2, 3]
67
+ multitarget : ['uwp', 'wasdk', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android']
68
+ exclude :
69
+ - winui : 2
70
+ multitarget : wasdk
71
+ - winui : 3
72
+ multitarget : uwp
67
73
68
74
env :
69
- # faux-ternary expression to select which platforms to build for each platform vs. duplicating step below.
70
- TARGET_PLATFORMS : ${{ matrix.platform != 'WinUI3' && 'all-wasdk' || 'all-uwp' }}
71
- TEST_PLATFORM : ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }}
72
75
VERSION_PROPERTY : ${{ github.ref == 'refs/heads/main' && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
73
76
74
77
# Steps represent a sequence of tasks that will be executed as part of the job
@@ -124,18 +127,17 @@ jobs:
124
127
with :
125
128
vs-version : ' [17.9,)'
126
129
127
- - name : Enable ${{ env.TARGET_PLATFORMS }} TargetFrameworks
130
+ - name : Enable ${{ matrix.multitarget }} TargetFrameworks
128
131
working-directory : ./${{ env.MULTI_TARGET_DIRECTORY }}
129
- run : powershell -version 5.1 -command "./UseTargetFrameworks.ps1 ${{ env.TARGET_PLATFORMS }}" -ErrorAction Stop
130
-
131
- - name : Generate solution w/ ${{ env.TEST_PLATFORM }} Tests
132
- working-directory : ./
133
- run : powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -IncludeHeads ${{ env.TEST_PLATFORM }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}" -ErrorAction Stop
132
+ run : powershell -version 5.1 -command "./UseTargetFrameworks.ps1 -Include ${{ matrix.multitarget }}" -ErrorAction Stop
134
133
135
- - name : Enable Uno.WinUI (in WinUI3 matrix only)
136
- if : ${{ matrix.platform == 'WinUI3' }}
134
+ - name : Set WinUI Version
137
135
working-directory : ./${{ env.MULTI_TARGET_DIRECTORY }}
138
- run : powershell -version 5.1 -command "./UseUnoWinUI.ps1 3" -ErrorAction Stop
136
+ run : powershell -version 5.1 -command "./UseUnoWinUI.ps1 ${{ matrix.winui }}" -ErrorAction Stop
137
+
138
+ - name : Generate solution with ${{ matrix.multitarget }} gallery and tests
139
+ working-directory : ./
140
+ run : powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -IncludeHeads ${{ matrix.multitarget }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}" -ErrorAction Stop
139
141
140
142
- name : Format Date/Time of Commit for Package Version
141
143
if : ${{ env.IS_RELEASE == 'false' }}
@@ -189,9 +191,10 @@ jobs:
189
191
id : test-generator
190
192
run : vstest.console.exe ./tooling/CommunityToolkit.Tooling.SampleGen.Tests/bin/Release/net6.0/CommunityToolkit.Tooling.SampleGen.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx"
191
193
192
- - name : Run experiment tests against ${{ env.TEST_PLATFORM }}
194
+ - name : Run experiment tests against ${{ matrix.multitarget }}
195
+ if : ${{ matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk' }}
193
196
id : test-platform
194
- run : vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ env.TEST_PLATFORM }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PLATFORM }}.trx" /Blame
197
+ run : vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ matrix.multitarget }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ matrix.multitarget }}.trx" /Blame
195
198
196
199
- name : Create test reports
197
200
run : |
0 commit comments