From 862c939a3a2da3f0d218d0fc2ef9eacaf39a6b30 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Sat, 23 Jan 2021 14:15:32 +0100 Subject: [PATCH 1/9] Add net5.0 target * add it in ImageSharp.csproj * update Buildscript --- .github/workflows/build-and-test.yml | 12 ++++++++++++ src/ImageSharp/ImageSharp.csproj | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9e760c4b2..778e27e51 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -14,6 +14,18 @@ jobs: strategy: matrix: options: + - os: ubuntu-latest + framework: net5.0 + runtime: -x64 + codecov: true + - os: macos-latest + framework: net5.0 + runtime: -x64 + codecov: false + - os: windows-latest + framework: net5.0 + runtime: -x64 + codecov: false - os: ubuntu-latest framework: netcoreapp3.1 runtime: -x64 diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index a90aaf715..ea32661dd 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -12,7 +12,7 @@ $(RepositoryUrl) Image Resize Crop Gif Jpg Jpeg Bitmap Png Tga NetCore A new, fully featured, fully managed, cross-platform, 2D graphics API for .NET - netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 From 72037f46f80781fb99e3906da61f3f7196b1a97e Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Sat, 23 Jan 2021 14:19:16 +0100 Subject: [PATCH 2/9] add .net5.0 targetframework in tests --- tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj | 2 +- .../ImageSharp.Tests.ProfilingSandbox.csproj | 2 +- tests/ImageSharp.Tests/ImageSharp.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj index 2a209683b..d89cf79fc 100644 --- a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj +++ b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj @@ -5,7 +5,7 @@ ImageSharp.Benchmarks Exe SixLabors.ImageSharp.Benchmarks - netcoreapp3.1;netcoreapp2.1;net472 + net5.0;netcoreapp3.1;netcoreapp2.1;net472 false false diff --git a/tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj b/tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj index b71b5ebf2..220780c58 100644 --- a/tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj +++ b/tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj @@ -8,7 +8,7 @@ false SixLabors.ImageSharp.Tests.ProfilingSandbox win7-x64 - netcoreapp3.1;netcoreapp2.1;net472 + net5.0;netcoreapp3.1;netcoreapp2.1;net472 SixLabors.ImageSharp.Tests.ProfilingSandbox.Program false diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj index 542614440..ebbe2cbdf 100644 --- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj +++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj @@ -2,7 +2,7 @@ - netcoreapp3.1;netcoreapp2.1;net472 + net5.0;netcoreapp3.1;netcoreapp2.1;net472 True SixLabors.ImageSharp.Tests AnyCPU;x64;x86 From 58491c9c12fa2ee44c2fb976b2465ea6936a4d1f Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Sat, 23 Jan 2021 16:38:18 +0100 Subject: [PATCH 3/9] remove .net50 target framework --- 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 ea32661dd..a90aaf715 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -12,7 +12,7 @@ $(RepositoryUrl) Image Resize Crop Gif Jpg Jpeg Bitmap Png Tga NetCore A new, fully featured, fully managed, cross-platform, 2D graphics API for .NET - net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 From 3fad302539a178a72703fb425f7d845dd92c95a2 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Sat, 23 Jan 2021 16:42:54 +0100 Subject: [PATCH 4/9] codecov only on one target --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 778e27e51..4da7813a8 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -17,7 +17,7 @@ jobs: - os: ubuntu-latest framework: net5.0 runtime: -x64 - codecov: true + codecov: false - os: macos-latest framework: net5.0 runtime: -x64 From 37709f941e4371cb3d99dd16f5739c9e1b9d7d55 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Mon, 25 Jan 2021 15:34:41 +0100 Subject: [PATCH 5/9] test and build framework can be different --- .github/workflows/build-and-test.yml | 31 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4da7813a8..579a547ea 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,39 +15,48 @@ jobs: matrix: options: - os: ubuntu-latest - framework: net5.0 + framework-build: netcoreapp3.1 + framework-test: net5.0 runtime: -x64 codecov: false - os: macos-latest - framework: net5.0 + framework-build: netcoreapp3.1 + framework-test: net5.0 runtime: -x64 codecov: false - os: windows-latest - framework: net5.0 + framework-build: netcoreapp3.1 + framework-test: net5.0 runtime: -x64 codecov: false - os: ubuntu-latest - framework: netcoreapp3.1 + framework-build: netcoreapp3.1 + framework-test: netcoreapp3.1 runtime: -x64 codecov: true - os: macos-latest - framework: netcoreapp3.1 + framework-build: netcoreapp3.1 + framework-test: netcoreapp3.1 runtime: -x64 codecov: false - os: windows-latest - framework: netcoreapp3.1 + framework-build: netcoreapp3.1 + framework-test: netcoreapp3.1 runtime: -x64 codecov: false - os: windows-latest - framework: netcoreapp2.1 + framework-build: netcoreapp2.1 + framework-test: netcoreapp2.1 runtime: -x64 codecov: false - os: windows-latest - framework: net472 + framework-build: net472 + framework-test: net472 runtime: -x64 codecov: false - os: windows-latest - framework: net472 + framework-build: net472 + framework-test: net472 runtime: -x86 codecov: false @@ -78,11 +87,11 @@ jobs: - name: Build shell: pwsh - run: ./ci-build.ps1 "${{matrix.options.framework}}" + run: ./ci-build.ps1 "${{matrix.options.framework-build}}" - name: Test shell: pwsh - run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" + run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework-test}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" env: CI: True XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit From e5f640182c692cf7030669c3fe65fcdad5782a1b Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Wed, 27 Jan 2021 21:52:01 +0100 Subject: [PATCH 6/9] use CI environment variable to also build on .net5.0 --- .github/workflows/build-and-test.yml | 31 ++++++++++------------------ src/ImageSharp/ImageSharp.csproj | 7 +++++++ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 579a547ea..4da7813a8 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,48 +15,39 @@ jobs: matrix: options: - os: ubuntu-latest - framework-build: netcoreapp3.1 - framework-test: net5.0 + framework: net5.0 runtime: -x64 codecov: false - os: macos-latest - framework-build: netcoreapp3.1 - framework-test: net5.0 + framework: net5.0 runtime: -x64 codecov: false - os: windows-latest - framework-build: netcoreapp3.1 - framework-test: net5.0 + framework: net5.0 runtime: -x64 codecov: false - os: ubuntu-latest - framework-build: netcoreapp3.1 - framework-test: netcoreapp3.1 + framework: netcoreapp3.1 runtime: -x64 codecov: true - os: macos-latest - framework-build: netcoreapp3.1 - framework-test: netcoreapp3.1 + framework: netcoreapp3.1 runtime: -x64 codecov: false - os: windows-latest - framework-build: netcoreapp3.1 - framework-test: netcoreapp3.1 + framework: netcoreapp3.1 runtime: -x64 codecov: false - os: windows-latest - framework-build: netcoreapp2.1 - framework-test: netcoreapp2.1 + framework: netcoreapp2.1 runtime: -x64 codecov: false - os: windows-latest - framework-build: net472 - framework-test: net472 + framework: net472 runtime: -x64 codecov: false - os: windows-latest - framework-build: net472 - framework-test: net472 + framework: net472 runtime: -x86 codecov: false @@ -87,11 +78,11 @@ jobs: - name: Build shell: pwsh - run: ./ci-build.ps1 "${{matrix.options.framework-build}}" + run: ./ci-build.ps1 "${{matrix.options.framework}}" - name: Test shell: pwsh - run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework-test}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" + run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" env: CI: True XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index a90aaf715..e0da2abf0 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -12,9 +12,16 @@ $(RepositoryUrl) Image Resize Crop Gif Jpg Jpeg Bitmap Png Tga NetCore A new, fully featured, fully managed, cross-platform, 2D graphics API for .NET + + + netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + + net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + + From fd22d81c7661515c7c7af977b4e9c4ee59ef740b Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Mon, 1 Feb 2021 06:42:06 +0100 Subject: [PATCH 7/9] update submodule shared-infrastructure --- shared-infrastructure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-infrastructure b/shared-infrastructure index b7b9a2755..af824b8ba 160000 --- a/shared-infrastructure +++ b/shared-infrastructure @@ -1 +1 @@ -Subproject commit b7b9a2755e456a96acbf103494228226d92eddf3 +Subproject commit af824b8bad7307b735662e3eeab39d401c41741c From cf63cd22186707fdc2e2474982dba50ab3a1d6f0 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Mon, 1 Feb 2021 06:42:52 +0100 Subject: [PATCH 8/9] use when and otherwise in csproj --- src/ImageSharp/ImageSharp.csproj | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index e0da2abf0..6a7f7a600 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -14,13 +14,18 @@ A new, fully featured, fully managed, cross-platform, 2D graphics API for .NET - - netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 - - - - net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 - + + + + net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + + + + + netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + + + From a060d5c37e9c1f83a26186d62749d58a8fd72a01 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Mon, 1 Feb 2021 07:36:05 +0100 Subject: [PATCH 9/9] USE SIXLABORS_TESTING instead of CI Env var --- .github/workflows/build-and-test.yml | 4 +++- src/ImageSharp/ImageSharp.csproj | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4da7813a8..67259c04f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -79,12 +79,14 @@ jobs: - name: Build shell: pwsh run: ./ci-build.ps1 "${{matrix.options.framework}}" + env: + SIXLABORS_TESTING: True - name: Test shell: pwsh run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" env: - CI: True + SIXLABORS_TESTING: True XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit - name: Export Failed Output diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index 6a7f7a600..ca6ca1689 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -15,7 +15,7 @@ - + net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472