Skip to content

Commit e35fae7

Browse files
Retarget to net10/net11 and migrate tests to xUnit v3
Updates shared-infrastructure to latest main and retargets all projects to net10.0 by default with net11.0 in preview runs, updating CI lanes to match. Copies the independent package versioning target from js/avalonia-sample, setting the WebGPU major version to 2 and MinVerMinimumMajorMinor to 4.0. Migrates the test infrastructure to xunit.v3, dropping Microsoft.DotNet.XUnitExtensions and updating Microsoft.DotNet.RemoteExecutor.
1 parent 61bd770 commit e35fae7

39 files changed

Lines changed: 145 additions & 101 deletions

‎.gitattributes‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
###############################################################################
111111
# Handle image files by git lfs
112112
###############################################################################
113+
*.pdf filter=lfs diff=lfs merge=lfs -text
113114
*.jpg filter=lfs diff=lfs merge=lfs -text
114115
*.jpeg filter=lfs diff=lfs merge=lfs -text
115116
*.bmp filter=lfs diff=lfs merge=lfs -text
@@ -137,6 +138,10 @@
137138
*.heic filter=lfs diff=lfs merge=lfs -text
138139
*.hif filter=lfs diff=lfs merge=lfs -text
139140
*.avif filter=lfs diff=lfs merge=lfs -text
141+
*.hvc1 filter=lfs diff=lfs merge=lfs -text
142+
*.hvcc filter=lfs diff=lfs merge=lfs -text
143+
*.yuv filter=lfs diff=lfs merge=lfs -text
144+
*.bit filter=lfs diff=lfs merge=lfs -text
140145
###############################################################################
141146
# Handle ICC files by git lfs
142147
###############################################################################

‎.github/workflows/build-and-test.yml‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,48 +64,48 @@ jobs:
6464
matrix:
6565
options:
6666
- os: ubuntu-latest
67-
framework: net10.0
68-
sdk: 10.0.x
67+
framework: net11.0
68+
sdk: 11.0.x
6969
sdk-preview: true
7070
runtime: -x64
7171
codecov: false
7272
- os: macos-26
73-
framework: net10.0
74-
sdk: 10.0.x
73+
framework: net11.0
74+
sdk: 11.0.x
7575
sdk-preview: true
7676
runtime: -x64
7777
codecov: false
7878
- os: windows-latest
79-
framework: net10.0
80-
sdk: 10.0.x
79+
framework: net11.0
80+
sdk: 11.0.x
8181
sdk-preview: true
8282
runtime: -x64
8383
codecov: false
8484
- os: ubuntu-22.04-arm
85-
framework: net10.0
86-
sdk: 10.0.x
85+
framework: net11.0
86+
sdk: 11.0.x
8787
sdk-preview: true
8888
runtime: -x64
8989
codecov: false
9090

9191
- os: ubuntu-latest
92-
framework: net8.0
93-
sdk: 8.0.x
92+
framework: net10.0
93+
sdk: 10.0.x
9494
runtime: -x64
9595
codecov: false
9696
- os: macos-26
97-
framework: net8.0
98-
sdk: 8.0.x
97+
framework: net10.0
98+
sdk: 10.0.x
9999
runtime: -x64
100100
codecov: true
101101
- os: windows-latest
102-
framework: net8.0
103-
sdk: 8.0.x
102+
framework: net10.0
103+
sdk: 10.0.x
104104
runtime: -x64
105105
codecov: false
106106
- os: ubuntu-22.04-arm
107-
framework: net8.0
108-
sdk: 8.0.x
107+
framework: net10.0
108+
sdk: 10.0.x
109109
runtime: -x64
110110
codecov: false
111111

@@ -169,14 +169,15 @@ jobs:
169169
uses: actions/setup-dotnet@v6
170170
with:
171171
dotnet-version: |
172-
8.0.x
172+
10.0.x
173173
174174
- name: DotNet Setup Preview
175175
if: ${{ matrix.options.sdk-preview == true }}
176176
uses: actions/setup-dotnet@v6
177177
with:
178+
dotnet-quality: preview
178179
dotnet-version: |
179-
10.0.x
180+
11.0.x
180181
181182
- name: DotNet Build
182183
if: ${{ matrix.options.sdk-preview != true }}

‎ci-local.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ $env:SIXLABORS_TESTING = "True"
33

44
$solution = Join-Path $PSScriptRoot "ImageSharp.Drawing.sln"
55

6-
# Build (ci-build.ps1 net8.0)
6+
# Build (ci-build.ps1 net10.0)
77
dotnet clean $solution -c Release
8-
dotnet build $solution -c Release -f net8.0
8+
dotnet build $solution -c Release -f net10.0
99

1010
# Pack (ci-pack.ps1)
1111
dotnet clean $solution -c Release

‎global.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Pins the .NET SDK to major version 10 or later for all SixLabors repositories.
2+
// The build copies this file to consuming repositories together with .editorconfig and
3+
// the other shared config files (see msbuild/targets/SixLabors.Src.targets).
4+
{
5+
"sdk": {
6+
// The floor, not an exact build: resolution never selects an SDK below major 10.
7+
"version": "10.0.0",
8+
9+
// Select the newest installed SDK at or above the floor. This spans feature bands,
10+
// minor versions, and major versions, so a machine with only stable 10.0.x SDKs
11+
// resolves the newest of those, and a machine with a newer SDK resolves that instead.
12+
"rollForward": "latestMajor",
13+
14+
// Let the CLI and Visual Studio select preview SDKs when one is installed.
15+
// Machines and CI lanes without a preview SDK are unaffected.
16+
"allowPrerelease": true
17+
}
18+
}

‎samples/DrawShapesWithImageSharp/DrawShapesWithImageSharp.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<Choose>
99
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
1010
<PropertyGroup>
11-
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
11+
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
1212
</PropertyGroup>
1313
</When>
1414
<Otherwise>
1515
<PropertyGroup>
16-
<TargetFrameworks>net8.0</TargetFrameworks>
16+
<TargetFrameworks>net10.0</TargetFrameworks>
1717
</PropertyGroup>
1818
</Otherwise>
1919
</Choose>

‎samples/DrawingBackendBenchmark/DrawingBackendBenchmark.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk" TreatAsLocalProperty="TargetFramework;TargetFrameworks">
22
<PropertyGroup>
3-
<TargetFramework>net8.0-windows</TargetFramework>
3+
<TargetFramework>net10.0-windows</TargetFramework>
44
<OutputType>WinExe</OutputType>
55
<UseWindowsForms>true</UseWindowsForms>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

‎samples/WebGPUExternalSurfaceDemo/WebGPUExternalSurfaceDemo.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk" TreatAsLocalProperty="TargetFramework;TargetFrameworks">
22
<PropertyGroup>
3-
<TargetFramework>net8.0-windows</TargetFramework>
3+
<TargetFramework>net10.0-windows</TargetFramework>
44
<OutputType>WinExe</OutputType>
55
<UseWindowsForms>true</UseWindowsForms>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

‎samples/WebGPUWindowDemo/WebGPUWindowDemo.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
<Choose>
1010
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
1111
<PropertyGroup>
12-
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
12+
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
1313
</PropertyGroup>
1414
</When>
1515
<Otherwise>
1616
<PropertyGroup>
17-
<TargetFrameworks>net8.0</TargetFrameworks>
17+
<TargetFrameworks>net10.0</TargetFrameworks>
1818
</PropertyGroup>
1919
</Otherwise>
2020
</Choose>

‎src/Directory.Build.targets‎

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,29 @@
1717
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" />
1818

1919
<!--
20-
Override the WebGPU package version so it tracks the main ImageSharp.Drawing
21-
version but uses a different major number (defined by WebGpuVersionMajor).
22-
For example, if MinVer calculates 3.0.0-alpha.0.201 for the main project,
23-
the WebGPU package becomes 1.0.0-alpha.0.201.
20+
Allow independently versioned packages to track the main ImageSharp.Drawing
21+
version while using a project-defined major number. For example, if MinVer
22+
calculates 3.0.0-alpha.0.201 and IndependentPackageVersionMajor is 1, the
23+
package version becomes 1.0.0-alpha.0.201.
2424
See: https://github.com/adamralph/minver#can-i-use-the-version-calculated-by-minver-for-other-purposes
2525
-->
2626
<PropertyGroup>
27-
<MinVerMinimumMajorMinor>3.0</MinVerMinimumMajorMinor>
28-
<WebGpuVersionMajor>1</WebGpuVersionMajor>
27+
<MinVerMinimumMajorMinor>4.0</MinVerMinimumMajorMinor>
2928
</PropertyGroup>
3029

31-
<Target Name="SetWebGpuVersionNumber" AfterTargets="MinVer" Condition="'$(MSBuildProjectName)' == 'ImageSharp.Drawing.WebGPU' and '$(IsContinuousIntegration)' == 'true'">
30+
<Target Name="SetIndependentPackageVersionNumber" AfterTargets="MinVer" Condition="'$(IndependentPackageVersionMajor)' != '' and '$(IsContinuousIntegration)' == 'true'">
3231
<PropertyGroup>
33-
<_WebGpuVersionPrefix>$(WebGpuVersionMajor).$(MinVerMinor).$(MinVerPatch)</_WebGpuVersionPrefix>
34-
<_WebGpuPreReleaseSuffix></_WebGpuPreReleaseSuffix>
35-
<_WebGpuPreReleaseSuffix Condition="'$(MinVerPreRelease)' != ''">-$(MinVerPreRelease)</_WebGpuPreReleaseSuffix>
36-
<_WebGpuBuildMetadataSuffix></_WebGpuBuildMetadataSuffix>
37-
<_WebGpuBuildMetadataSuffix Condition="'$(MinVerBuildMetadata)' != ''">+$(MinVerBuildMetadata)</_WebGpuBuildMetadataSuffix>
38-
39-
<AssemblyVersion>$(WebGpuVersionMajor).0.0.0</AssemblyVersion>
40-
<FileVersion>$(WebGpuVersionMajor).$(MinVerMinor).$(MinVerPatch).0</FileVersion>
41-
<Version>$(_WebGpuVersionPrefix)$(_WebGpuPreReleaseSuffix)</Version>
32+
<_IndependentPackageVersionPrefix>$(IndependentPackageVersionMajor).$(MinVerMinor).$(MinVerPatch)</_IndependentPackageVersionPrefix>
33+
<_IndependentPackagePreReleaseSuffix></_IndependentPackagePreReleaseSuffix>
34+
<_IndependentPackagePreReleaseSuffix Condition="'$(MinVerPreRelease)' != ''">-$(MinVerPreRelease)</_IndependentPackagePreReleaseSuffix>
35+
<_IndependentPackageBuildMetadataSuffix></_IndependentPackageBuildMetadataSuffix>
36+
<_IndependentPackageBuildMetadataSuffix Condition="'$(MinVerBuildMetadata)' != ''">+$(MinVerBuildMetadata)</_IndependentPackageBuildMetadataSuffix>
37+
38+
<AssemblyVersion>$(IndependentPackageVersionMajor).0.0.0</AssemblyVersion>
39+
<FileVersion>$(IndependentPackageVersionMajor).$(MinVerMinor).$(MinVerPatch).0</FileVersion>
40+
<Version>$(_IndependentPackageVersionPrefix)$(_IndependentPackagePreReleaseSuffix)</Version>
4241
<PackageVersion>$(Version)</PackageVersion>
43-
<InformationalVersion>$(Version)$(_WebGpuBuildMetadataSuffix)</InformationalVersion>
42+
<InformationalVersion>$(Version)$(_IndependentPackageBuildMetadataSuffix)</InformationalVersion>
4443
</PropertyGroup>
4544
</Target>
4645

0 commit comments

Comments
 (0)