Skip to content

Commit dafd7fb

Browse files
authored
Merge branch 'main' into opacitymaskview-experiment
2 parents ce46c6f + 6f640e6 commit dafd7fb

File tree

26 files changed

+153
-44
lines changed

26 files changed

+153
-44
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"uno.check": {
6-
"version": "1.10.0",
6+
"version": "1.16.1",
77
"commands": [
88
"uno-check"
99
]

.editorconfig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ dotnet_diagnostic.CA2200.severity = warning
355355
dotnet_diagnostic.CA2202.severity = warning
356356
dotnet_diagnostic.CA2207.severity = warning
357357
dotnet_diagnostic.CA2212.severity = warning
358-
dotnet_diagnostic.CA2213.severity = warning
359358
dotnet_diagnostic.CA2214.severity = warning
360359
dotnet_diagnostic.CA2216.severity = warning
361360
dotnet_diagnostic.CA2220.severity = warning
@@ -433,5 +432,8 @@ csharp_style_prefer_extended_property_pattern = true:suggestion
433432
# Require file header
434433
dotnet_diagnostic.IDE0073.severity = warning
435434

436-
# Uno platform exposes IDisposable on Storyboard publicly when it should be internal. Ignore this.
437-
dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard
435+
# Member owns disposable field
436+
# Todo: Clean up suppression of CA1063 and implement IDisposable correctly
437+
# https://github.com/CommunityToolkit/Labs-Windows/issues/443
438+
dotnet_diagnostic.CA2213.severity = none
439+
dotnet_diagnostic.CA1001.severity = none

.github/workflows/build.yml

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@ on:
1414

1515
# Allows you to run this workflow manually from the Actions tab
1616
workflow_dispatch:
17+
merge_group:
1718

1819
env:
19-
DOTNET_VERSION: ${{ '7.0.x' }}
20+
DOTNET_VERSION: ${{ '7.0.402' }}
2021
ENABLE_DIAGNOSTICS: false
2122
#COREHOST_TRACE: 1
23+
MSBUILD_VERBOSITY: normal
2224
COREHOST_TRACEFILE: corehosttrace.log
25+
IS_MAIN: ${{ github.ref == 'refs/heads/main' }}
26+
IS_PR: ${{ startsWith(github.ref, 'refs/pull/') }}
2327

2428
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2529
jobs:
2630
# This workflow contains a single job called "Xaml-Style-Check"
2731
Xaml-Style-Check:
28-
runs-on: windows-latest
32+
runs-on: windows-latest-large
2933

3034
# Steps represent a sequence of tasks that will be executed as part of the job
3135
steps:
@@ -61,8 +65,9 @@ jobs:
6165
env:
6266
MULTI_TARGET_DIRECTORY: tooling/MultiTarget
6367
# faux-ternary expression to select which platforms to build for each platform vs. duplicating step below.
64-
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all' || 'all-uwp' }}
68+
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all-wasdk' || 'all-uwp' }}
6569
TEST_PLATFORM: ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }}
70+
VERSION_PROPERTY: ${{ github.ref == 'refs/heads/main' && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
6671

6772
# Steps represent a sequence of tasks that will be executed as part of the job
6873
steps:
@@ -72,16 +77,15 @@ jobs:
7277
minimum-size: 32GB
7378
maximum-size: 32GB
7479
disk-root: "C:"
75-
76-
- name: Configure User-Mode crash dump type
77-
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }}
78-
run: |
79-
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpType /t REG_DWORD /d 2 /f
80-
81-
- name: Configure User-Mode crash dump folder
80+
81+
- name: Enable User-Mode Dumps collecting
8282
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }}
83+
shell: powershell
8384
run: |
84-
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpFolder /t REG_EXPAND_SZ /d C:\CrashDumps\ /f
85+
New-Item '${{ github.workspace }}\CrashDumps' -Type Directory
86+
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpFolder' -Type ExpandString -Value '${{ github.workspace }}\CrashDumps'
87+
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpCount' -Type DWord -Value '10'
88+
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2'
8589
8690
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
8791
uses: actions/setup-dotnet@v3
@@ -103,7 +107,15 @@ jobs:
103107
run: dotnet tool restore
104108

105109
- name: Run Uno Check to Install Dependencies
106-
run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --verbose
110+
run: >
111+
dotnet tool run uno-check
112+
--ci
113+
--fix
114+
--non-interactive
115+
--skip wsl
116+
--skip androidemulator
117+
--skip vswinworkloads
118+
--verbose
107119
108120
- name: Add msbuild to PATH
109121
uses: microsoft/[email protected]
@@ -117,31 +129,48 @@ jobs:
117129
run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -IncludeHeads ${{ env.TEST_PLATFORM }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}" -ErrorAction Stop
118130

119131
- name: Enable Uno.WinUI (in WinUI3 matrix only)
132+
if: ${{ matrix.platform == 'WinUI3' }}
120133
working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }}
121134
run: powershell -version 5.1 -command "./UseUnoWinUI.ps1 3" -ErrorAction Stop
122-
if: ${{ matrix.platform == 'WinUI3' }}
135+
136+
- name: Format Date/Time of Commit for Package Version
137+
run: |
138+
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
123139
124140
- name: MSBuild (With diagnostics)
125141
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
126-
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release /bl -v:diag
142+
run: >
143+
msbuild.exe /restore /nowarn:MSB4011
144+
/p:Configuration=Release
145+
/m
146+
${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }}
147+
/v:${{ env.MSBUILD_VERBOSITY }}
148+
CommunityToolkit.AllComponents.sln
127149
128150
- name: MSBuild
129151
if: ${{ env.ENABLE_DIAGNOSTICS == 'false' }}
130152
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release
131153

132154
# Build All Packages
133-
- name: pack experiments
155+
- name: Pack experiments
134156
working-directory: ./tooling/Scripts/
135-
run: ./PackEachExperiment.ps1 all
157+
run: ./PackEachExperiment.ps1 -date ${{ env.VERSION_DATE }}${{ env.VERSION_PROPERTY != '' && format(' -postfix {0}', env.VERSION_PROPERTY) || '' }}
136158

137-
# Push Packages to our DevOps Artifacts Feed
138-
- name: Add source
139-
if: ${{ github.ref == 'refs/heads/main' }}
140-
run: dotnet nuget update source LabsFeed --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }}
159+
# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config)
160+
- name: Push PR packages (if not fork)
161+
if: ${{ env.IS_PR == 'true' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
162+
run: |
163+
dotnet nuget add source https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-PullRequests/nuget/v3/index.json `
164+
--name PullRequests `
165+
--username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }}
166+
dotnet nuget push "**/*.nupkg" --api-key dummy --source PullRequests --skip-duplicate
141167
142-
- name: Push packages
168+
- name: Push packages (main)
143169
if: ${{ github.ref == 'refs/heads/main' }}
144-
run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate
170+
run: |
171+
dotnet nuget update source LabsFeed `
172+
--username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }}
173+
dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate
145174
146175
# Run tests
147176
- name: Setup VSTest Path
@@ -154,7 +183,7 @@ jobs:
154183

155184
- name: Run experiment tests against ${{ env.TEST_PLATFORM }}
156185
id: test-platform
157-
run: vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ env.TEST_PLATFORM }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PLATFORM }}.trx"
186+
run: vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ env.TEST_PLATFORM }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PLATFORM }}.trx" /Blame
158187

159188
- name: Create test reports
160189
run: |
@@ -174,13 +203,28 @@ jobs:
174203
with:
175204
name: ilc-repro
176205
path: ./*.zip
177-
206+
207+
# https://github.com/dorny/paths-filter#custom-processing-of-changed-files
208+
- name: Detect If any Dump Files
209+
uses: dorny/[email protected]
210+
id: filter
211+
with:
212+
list-files: shell
213+
filters: |
214+
dump:
215+
- added: '${{ github.workspace }}/CrashDumps/*.dmp'
178216
- name: Artifact - WER crash dumps
179-
uses: actions/upload-artifact@v2
180-
if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
217+
uses: actions/upload-artifact@v3
218+
if: ${{ steps.filter.outputs.dump == 'true' && (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
181219
with:
182-
name: Crash Dumps
183-
path: C:\CrashDumps\*
220+
name: CrashDumps-${{ matrix.platform }}
221+
path: '${{ github.workspace }}/CrashDumps'
222+
223+
- name: Analyze Dump
224+
if: ${{ steps.filter.outputs.dump == 'true' && (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
225+
run: |
226+
dotnet tool install --global dotnet-dump
227+
dotnet-dump analyze ${{ steps.filter.outputs.dump_files }} -c "clrstack" -c "pe -lines" -c "exit"
184228
185229
wasm-linux:
186230
runs-on: ubuntu-latest

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"csharp.suppressDotnetInstallWarning": true,
88
"csharp.suppressDotnetRestoreNotification": true,
99
"csharp.semanticHighlighting.enabled": true,
10-
"omnisharp.enableImportCompletion": true,
11-
"omnisharp.enableMsBuildLoadProjectsOnDemand": true
10+
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
11+
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true
1212
}

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
1313
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1414
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
15+
<NoWarn>$(NoWarn);Uno0001</NoWarn>
1516
</PropertyGroup>
1617

1718
<Import Project="Windows.Toolkit.Common.props" />

components/AppServices/src/AppServiceHost.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ public abstract class AppServiceHost
4040
/// The name of the app service.
4141
/// </summary>
4242
private readonly string _appServiceName;
43+
#pragma warning disable CA1001
4344
private readonly SemaphoreSlim _semaphoreConnection = new(0, 1);
4445
private readonly SemaphoreSlim _lockConnection = new(1, 1);
46+
#pragma warning restore CA1001
4547

4648
/// <summary>
4749
/// <para>
-1.66 KB
Loading

components/CanvasLayout/samples/CanvasLayout.Samples.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@
55

66
<!-- Sets this up as a toolkit component's sample project -->
77
<Import Project="$(ToolingDirectory)\ToolkitComponent.SampleProject.props" />
8+
9+
<ItemGroup>
10+
<None Remove="Assets\CanvasLayout.png" />
11+
12+
<Content Include="Assets\CanvasLayout.png">
13+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
14+
</Content>
15+
</ItemGroup>
816
</Project>
-1.66 KB
Loading

components/CanvasView/samples/CanvasView.Samples.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@
55

66
<!-- Sets this up as a toolkit component's sample project -->
77
<Import Project="$(ToolingDirectory)\ToolkitComponent.SampleProject.props" />
8+
9+
<ItemGroup>
10+
<None Remove="Assets\CanvasView.png" />
11+
12+
<Content Include="Assets\CanvasView.png">
13+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
14+
</Content>
15+
</ItemGroup>
816
</Project>

0 commit comments

Comments
 (0)