From 427d97a742a108429d201e823a125c415a9d2306 Mon Sep 17 00:00:00 2001 From: AlexNDRmac Date: Mon, 26 Oct 2020 22:17:59 +0200 Subject: [PATCH 1/5] Add support using libgdiplus on macOS --- src/ImageSharp/ImageSharp.csproj | 8 ++++++++ tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj | 4 +++- tests/ImageSharp.Tests/ImageSharp.Tests.csproj | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index c3d9618c8c..2a9b53cbab 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -28,6 +28,14 @@ + + + + + + + + diff --git a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj index 4784a219b2..627e281f6f 100644 --- a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj +++ b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj @@ -26,7 +26,9 @@ - + + + diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj index 07ade97d5d..d96d33a5ad 100644 --- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj +++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj @@ -22,6 +22,8 @@ + + From c44690ff89a4be547aa868632ad2a81bb75769c4 Mon Sep 17 00:00:00 2001 From: AlexNDRmac Date: Mon, 26 Oct 2020 22:31:16 +0200 Subject: [PATCH 2/5] Fix incompatible package reference for OSX --- src/ImageSharp/ImageSharp.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index 2a9b53cbab..a5e6bbbc7d 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -32,7 +32,7 @@ - + From 8f2da28358ccf17ee2e227f7a18ed4440f0c76e2 Mon Sep 17 00:00:00 2001 From: AlexNDRmac Date: Thu, 12 Nov 2020 16:52:56 +0200 Subject: [PATCH 3/5] Move package to build props --- .github/workflows/build-and-test.yml | 4 ++++ src/ImageSharp/ImageSharp.csproj | 8 -------- tests/Directory.Build.targets | 2 ++ tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj | 2 -- tests/ImageSharp.Tests/ImageSharp.Tests.csproj | 2 -- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c8f3997946..b618e1e657 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,6 +18,10 @@ jobs: framework: netcoreapp3.1 runtime: -x64 codecov: true + - os: macos-latest + framework: netcoreapp3.1 + runtime: -x64 + codecov: false - os: windows-latest framework: netcoreapp3.1 runtime: -x64 diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index a5e6bbbc7d..c3d9618c8c 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -28,14 +28,6 @@ - - - - - - - - diff --git a/tests/Directory.Build.targets b/tests/Directory.Build.targets index 1f699c9dd1..76759948b2 100644 --- a/tests/Directory.Build.targets +++ b/tests/Directory.Build.targets @@ -35,6 +35,8 @@ + + diff --git a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj index 627e281f6f..e8ad660adf 100644 --- a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj +++ b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj @@ -26,8 +26,6 @@ - - diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj index d96d33a5ad..07ade97d5d 100644 --- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj +++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj @@ -22,8 +22,6 @@ - - From 2085b77b05fc9cea722e0e9749d4c1b3bd9fcba3 Mon Sep 17 00:00:00 2001 From: AlexNDRmac Date: Fri, 30 Oct 2020 11:48:24 +0200 Subject: [PATCH 4/5] Do not run windows specific tests on macOS --- .../TestUtilities/Tests/TestEnvironmentTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs index e72d953ac1..e3418220b0 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs @@ -67,7 +67,7 @@ namespace SixLabors.ImageSharp.Tests [InlineData("lol/Baz.gif", typeof(GifEncoder))] public void GetReferenceEncoder_ReturnsCorrectEncoders_Windows(string fileName, Type expectedEncoderType) { - if (TestEnvironment.IsLinux) + if (!TestEnvironment.IsWindows) { return; } @@ -83,7 +83,7 @@ namespace SixLabors.ImageSharp.Tests [InlineData("lol/Baz.gif", typeof(GifDecoder))] public void GetReferenceDecoder_ReturnsCorrectDecoders_Windows(string fileName, Type expectedDecoderType) { - if (TestEnvironment.IsLinux) + if (!TestEnvironment.IsWindows) { return; } From 17639498f2ae160faf7c4a66feea92e5fc87fe03 Mon Sep 17 00:00:00 2001 From: AlexNDRmac Date: Fri, 30 Oct 2020 12:15:34 +0200 Subject: [PATCH 5/5] Decorate OSX specific tests --- .../Processing/Processors/Transforms/ResizeTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs index f40b8d11a0..47d951837d 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs @@ -355,6 +355,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms } [Theory] + [PlatformSpecific(~TestPlatforms.OSX)] [WithFileCollection(nameof(CommonTestImages), DefaultPixelType)] public void ResizeFromSourceRectangle(TestImageProvider provider) where TPixel : unmanaged, IPixel @@ -437,6 +438,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms } [Theory] + [PlatformSpecific(~TestPlatforms.OSX)] [WithFileCollection(nameof(CommonTestImages), DefaultPixelType)] public void ResizeWithBoxPadMode(TestImageProvider provider) where TPixel : unmanaged, IPixel @@ -547,6 +549,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms } [Theory] + [PlatformSpecific(~TestPlatforms.OSX)] [WithFileCollection(nameof(CommonTestImages), DefaultPixelType)] public void ResizeWithPadMode(TestImageProvider provider) where TPixel : unmanaged, IPixel