Skip to content

Commit 87d6f00

Browse files
Test against NET 9
1 parent 93299e1 commit 87d6f00

File tree

6 files changed

+32
-8
lines changed

6 files changed

+32
-8
lines changed

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,31 @@ jobs:
1919
isARM:
2020
- ${{ contains(github.event.pull_request.labels.*.name, 'arch:arm32') || contains(github.event.pull_request.labels.*.name, 'arch:arm64') }}
2121
options:
22+
- os: ubuntu-latest
23+
framework: net9.0
24+
sdk: 9.0.x
25+
sdk-preview: true
26+
runtime: -x64
27+
codecov: false
28+
- os: macos-13 # macos-latest runs on arm64 runners where libgdiplus is unavailable
29+
framework: net9.0
30+
sdk: 9.0.x
31+
sdk-preview: true
32+
runtime: -x64
33+
codecov: false
34+
- os: windows-latest
35+
framework: net9.0
36+
sdk: 9.0.x
37+
sdk-preview: true
38+
runtime: -x64
39+
codecov: false
40+
- os: buildjet-4vcpu-ubuntu-2204-arm
41+
framework: net9.0
42+
sdk: 9.0.x
43+
sdk-preview: true
44+
runtime: -x64
45+
codecov: false
46+
2247
- os: ubuntu-latest
2348
framework: net8.0
2449
sdk: 8.0.x
@@ -100,7 +125,7 @@ jobs:
100125
uses: actions/setup-dotnet@v4
101126
with:
102127
dotnet-version: |
103-
8.0.x
128+
9.0.x
104129
105130
- name: DotNet Build
106131
if: ${{ matrix.options.sdk-preview != true }}

src/ImageSharp/ImageSharp.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<PackageTags>Image Resize Crop Gif Jpg Jpeg Bitmap Pbm Png Tga Tiff WebP NetCore</PackageTags>
1414
<Description>A new, fully featured, fully managed, cross-platform, 2D graphics API for .NET</Description>
1515
<Configurations>Debug;Release</Configurations>
16+
<IsTrimmable>true</IsTrimmable>
1617
</PropertyGroup>
1718

1819
<!-- This enables the nullable analysis and treats all nullable warnings as error-->
@@ -29,14 +30,12 @@
2930
<Choose>
3031
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
3132
<PropertyGroup>
32-
<TargetFrameworks>net8.0</TargetFrameworks>
33-
<IsTrimmable>true</IsTrimmable>
33+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
3434
</PropertyGroup>
3535
</When>
3636
<Otherwise>
3737
<PropertyGroup>
3838
<TargetFrameworks>net8.0</TargetFrameworks>
39-
<IsTrimmable>true</IsTrimmable>
4039
</PropertyGroup>
4140
</Otherwise>
4241
</Choose>

tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Choose>
2424
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
2525
<PropertyGroup>
26-
<TargetFrameworks>net8.0</TargetFrameworks>
26+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
2727
</PropertyGroup>
2828
</When>
2929
<Otherwise>

tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<Choose>
2020
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
2121
<PropertyGroup>
22-
<TargetFrameworks>net8.0</TargetFrameworks>
22+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
2323
</PropertyGroup>
2424
</When>
2525
<Otherwise>

tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ public void TiffDecoder_CanDecode_TiledWithBadZlib<TPixel>(TestImageProvider<TPi
719719
// ImageMagick cannot decode this image.
720720
image.DebugSave(provider);
721721
image.CompareToReferenceOutput(
722-
ImageComparer.Exact,
722+
ImageComparer.TolerantPercentage(0.0018F), // NET 9+ Uses zlib-ng to decompress, which manages to decode 2 extra pixels.
723723
provider,
724724
appendPixelTypeToFileName: false);
725725
}

tests/ImageSharp.Tests/ImageSharp.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Choose>
1313
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
1414
<PropertyGroup>
15-
<TargetFrameworks>net8.0</TargetFrameworks>
15+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
1616
</PropertyGroup>
1717
</When>
1818
<Otherwise>

0 commit comments

Comments
 (0)