Skip to content

Commit bd9fc66

Browse files
Merge pull request #2341 from SixLabors/js/buildjet-arm64
Add BuildJet ARM64 runners.
2 parents 8cf4991 + 3fd4fdc commit bd9fc66

29 files changed

+138
-61
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
sdk-preview: true
3333
runtime: -x64
3434
codecov: false
35+
- os: buildjet-4vcpu-ubuntu-2204-arm
36+
framework: net7.0
37+
sdk: 7.0.x
38+
sdk-preview: true
39+
runtime: -x64
40+
codecov: false
3541
- os: ubuntu-latest
3642
framework: net6.0
3743
sdk: 6.0.x
@@ -47,10 +53,19 @@ jobs:
4753
sdk: 6.0.x
4854
runtime: -x64
4955
codecov: false
56+
- os: buildjet-4vcpu-ubuntu-2204-arm
57+
framework: net6.0
58+
sdk: 6.0.x
59+
runtime: -x64
60+
codecov: false
5061

5162
runs-on: ${{matrix.options.os}}
5263

5364
steps:
65+
- name: Install libgdi+, which is required for tests running on ubuntu
66+
if: ${{ matrix.options.os == 'buildjet-4vcpu-ubuntu-2204-arm' }}
67+
run: sudo apt-get -y install libgdiplus libgif-dev libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev
68+
5469
- name: Git Config
5570
shell: bash
5671
run: |

ci-test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ elseif ($platform -eq '-x86' -and $targetFramework -match $netFxRegex) {
3333
}
3434
else {
3535

36-
dotnet test --no-build -c Release -f $targetFramework
36+
dotnet test --no-build -c Release -f $targetFramework --blame --diag .tests\Images\ActualOutput\diaglog.txt
3737
}

tests/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
<PropertyGroup>
2020
<CodeAnalysisRuleSet>..\ImageSharp.Tests.ruleset</CodeAnalysisRuleSet>
21+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
2122
</PropertyGroup>
2223

2324
<ItemGroup>

tests/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PackageReference Update="BenchmarkDotNet" Version="0.13.0" />
2222
<PackageReference Update="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.0" Condition="'$(IsWindows)'=='true'" />
2323
<PackageReference Update="Colourful" Version="3.0.0" />
24-
<PackageReference Update="Magick.NET-Q16-AnyCPU" Version="11.1.2" />
24+
<PackageReference Update="Magick.NET-Q16-AnyCPU" Version="12.2.2" />
2525
<PackageReference Update="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21311.3" />
2626
<PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21311.3" />
2727
<PackageReference Update="Moq" Version="4.14.6" />
@@ -32,7 +32,7 @@
3232
<PackageReference Update="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="5.8.64" Condition="'$(IsOSX)'=='true'" />
3333
<PackageReference Update="SharpZipLib" Version="1.3.2" />
3434
<PackageReference Update="SkiaSharp" Version="2.80.2" />
35-
<PackageReference Update="System.Drawing.Common" Version="5.0.2" />
35+
<PackageReference Update="System.Drawing.Common" Version="6.0.0" />
3636
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
3737
</ItemGroup>
3838

tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4+
using System.Runtime.InteropServices;
45
using Microsoft.DotNet.RemoteExecutor;
56
using SixLabors.ImageSharp.Formats;
67
using SixLabors.ImageSharp.Formats.Gif;
@@ -49,8 +50,11 @@ public void GifDecoder_Decode_Resize<TPixel>(TestImageProvider<TPixel> provider)
4950
FormattableString details = $"{options.TargetSize.Value.Width}_{options.TargetSize.Value.Height}";
5051

5152
image.DebugSave(provider, testOutputDetails: details, appendPixelTypeToFileName: false);
53+
54+
// Floating point differences result in minor pixel differences.
55+
// Output have been manually verified.
5256
image.CompareToReferenceOutput(
53-
ImageComparer.TolerantPercentage(0.0001F),
57+
ImageComparer.TolerantPercentage(TestEnvironment.OSArchitecture == Architecture.Arm64 ? 0.0002F : 0.0001F),
5458
provider,
5559
testOutputDetails: details,
5660
appendPixelTypeToFileName: false);

tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public partial class JpegEncoderTests
6464
{
6565
{ JpegEncodingColor.Luminance, 100, 0.0175f / 100 },
6666
{ JpegEncodingColor.Luminance, 80, 0.6730f / 100 },
67-
{ JpegEncodingColor.Luminance, 40, 0.9941f / 100 },
67+
{ JpegEncodingColor.Luminance, 40, 0.9943f / 100 },
6868
};
6969

7070
[Theory]

tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4+
using System.Runtime.InteropServices;
45
using Microsoft.DotNet.RemoteExecutor;
56
using SixLabors.ImageSharp.Formats;
67
using SixLabors.ImageSharp.Formats.Png;
@@ -120,8 +121,11 @@ public void PngDecoder_Decode_Resize<TPixel>(TestImageProvider<TPixel> provider)
120121
FormattableString details = $"{options.TargetSize.Value.Width}_{options.TargetSize.Value.Height}";
121122

122123
image.DebugSave(provider, testOutputDetails: details, appendPixelTypeToFileName: false);
124+
125+
// Floating point differences result in minor pixel differences.
126+
// Output have been manually verified.
123127
image.CompareToReferenceOutput(
124-
ImageComparer.TolerantPercentage(0.0003F), // Magick decoder shows difference on Mac
128+
ImageComparer.TolerantPercentage(TestEnvironment.OSArchitecture == Architecture.Arm64 ? 0.0005F : 0.0003F),
125129
provider,
126130
testOutputDetails: details,
127131
appendPixelTypeToFileName: false);

tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4+
using System.Runtime.InteropServices;
45
using Microsoft.DotNet.RemoteExecutor;
56
using SixLabors.ImageSharp.Formats;
67
using SixLabors.ImageSharp.Formats.Tga;
@@ -758,8 +759,11 @@ public void TgaDecoder_Decode_Resize<TPixel>(TestImageProvider<TPixel> provider)
758759
FormattableString details = $"{options.TargetSize.Value.Width}_{options.TargetSize.Value.Height}";
759760

760761
image.DebugSave(provider, testOutputDetails: details, appendPixelTypeToFileName: false);
762+
763+
// Floating point differences result in minor pixel differences.
764+
// Output have been manually verified.
761765
image.CompareToReferenceOutput(
762-
ImageComparer.TolerantPercentage(0.0001F),
766+
ImageComparer.TolerantPercentage(TestEnvironment.OSArchitecture == Architecture.Arm64 ? 0.0016F : 0.0001F),
763767
provider,
764768
testOutputDetails: details,
765769
appendPixelTypeToFileName: false);

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Six Labors Split License.
33

44
// ReSharper disable InconsistentNaming
5+
using System.Runtime.InteropServices;
56
using SixLabors.ImageSharp.Formats;
67
using SixLabors.ImageSharp.Formats.Tiff;
78
using SixLabors.ImageSharp.Metadata;
@@ -765,8 +766,11 @@ public void TiffDecoder_Decode_Resize<TPixel>(TestImageProvider<TPixel> provider
765766
FormattableString details = $"{options.TargetSize.Value.Width}_{options.TargetSize.Value.Height}";
766767

767768
image.DebugSave(provider, testOutputDetails: details, appendPixelTypeToFileName: false);
769+
770+
// Floating point differences result in minor pixel differences.
771+
// Output have been manually verified.
768772
image.CompareToReferenceOutput(
769-
ImageComparer.Exact,
773+
TestEnvironment.OSArchitecture == Architecture.Arm64 ? ImageComparer.TolerantPercentage(0.0006F) : ImageComparer.Exact,
770774
provider,
771775
testOutputDetails: details,
772776
appendPixelTypeToFileName: false);

0 commit comments

Comments
 (0)