diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e00757cb7b..745d54447c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -77,13 +77,19 @@ jobs: sdk-preview: true runtime: -x64 codecov: false + - os: macos-26 + framework: net9.0 + sdk: 9.0.x + sdk-preview: true + runtime: -x64 + codecov: false - os: windows-latest framework: net9.0 sdk: 9.0.x sdk-preview: true runtime: -x64 codecov: false - - os: buildjet-4vcpu-ubuntu-2204-arm + - os: ubuntu-22.04-arm framework: net9.0 sdk: 9.0.x sdk-preview: true @@ -100,12 +106,17 @@ jobs: sdk: 8.0.x runtime: -x64 codecov: false + - os: macos-26 + framework: net8.0 + sdk: 8.0.x + runtime: -x64 + codecov: false - os: windows-latest framework: net8.0 sdk: 8.0.x runtime: -x64 codecov: false - - os: buildjet-4vcpu-ubuntu-2204-arm + - os: ubuntu-22.04-arm framework: net8.0 sdk: 8.0.x runtime: -x64 @@ -124,6 +135,18 @@ jobs: sudo apt-get update sudo apt-get -y install libgdiplus libgif-dev libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev + - name: Install libgdi+, which is required for tests running on macos + if: ${{ contains(matrix.options.os, 'macos-26') }} + run: | + brew update + brew install mono-libgdiplus + # Create symlinks to make libgdiplus discoverable + sudo mkdir -p /usr/local/lib + sudo ln -sf $(brew --prefix)/lib/libgdiplus.dylib /usr/local/lib/libgdiplus.dylib + # Verify installation + ls -la $(brew --prefix)/lib/libgdiplus* || echo "libgdiplus not found in brew prefix" + ls -la /usr/local/lib/libgdiplus* || echo "libgdiplus not found in /usr/local/lib" + - name: Git Config shell: bash run: | @@ -192,7 +215,7 @@ jobs: run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" env: SIXLABORS_TESTING: True - XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit + XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit - name: DotNet Test Preview if: ${{ matrix.options.sdk-preview == true }} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs index 26dc4f5878..5df730cb1d 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs @@ -360,7 +360,7 @@ public void TiffDecoder_CanDecode_YccK(TestImageProvider provide { using Image image = provider.GetImage(TiffDecoder.Instance); image.DebugSave(provider); - image.CompareToReferenceOutput(ImageComparer.Exact, provider); + image.CompareToReferenceOutput(ImageComparer.Tolerant(), provider); } [Theory] diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/SystemDrawingReferenceCodecTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/SystemDrawingReferenceCodecTests.cs index 555041890a..40540ec6c7 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/SystemDrawingReferenceCodecTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/SystemDrawingReferenceCodecTests.cs @@ -59,11 +59,6 @@ private static string SavePng(TestImageProvider provider, PngCol public void From32bppArgbSystemDrawingBitmap2(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsLinux) - { - return; - } - string path = SavePng(provider, PngColorType.RgbWithAlpha); using Bitmap sdBitmap = new(path);