Skip to content

Commit ce43688

Browse files
Merge pull request #216 from ronaldbarendse/feature/net5-net6-builds
Build against .NET 5 and .NET 6
2 parents b86a247 + 616d943 commit ce43688

8 files changed

Lines changed: 71 additions & 22 deletions

File tree

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

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,48 @@ jobs:
1515
strategy:
1616
matrix:
1717
options:
18+
- os: ubuntu-latest
19+
framework: net6.0
20+
runtime: -x64
21+
codecov: false
1822
- os: macos-latest
19-
framework: netcoreapp3.1
23+
framework: net6.0
24+
runtime: -x64
25+
codecov: false
26+
- os: windows-latest
27+
framework: net6.0
28+
runtime: -x64
29+
codecov: true
30+
- os: ubuntu-latest
31+
framework: net5.0
32+
runtime: -x64
33+
codecov: false
34+
- os: macos-latest
35+
framework: net5.0
36+
runtime: -x64
37+
codecov: false
38+
- os: windows-latest
39+
framework: net5.0
2040
runtime: -x64
2141
codecov: false
2242
- os: ubuntu-latest
2343
framework: netcoreapp3.1
2444
runtime: -x64
2545
codecov: false
46+
- os: macos-latest
47+
framework: netcoreapp3.1
48+
runtime: -x64
49+
codecov: false
2650
- os: windows-latest
2751
framework: netcoreapp3.1
2852
runtime: -x64
29-
codecov: true
53+
codecov: false
3054
- os: windows-latest
3155
framework: netcoreapp2.1
3256
runtime: -x64
3357
codecov: false
3458

3559
runs-on: ${{matrix.options.os}}
36-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
3760

3861
steps:
3962
- name: Git Config
@@ -49,7 +72,7 @@ jobs:
4972
submodules: recursive
5073

5174
# See https://github.com/actions/checkout/issues/165#issuecomment-657673315
52-
- name: Git Create LFS file list
75+
- name: Git Create LFS FileList
5376
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
5477

5578
- name: Git Setup LFS Cache

src/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<PackageReference Update="SixLabors.ImageSharp" Version="2.0.0" />
2525
</ItemGroup>
2626

27-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
27+
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
2828
<FrameworkReference Update="Microsoft.AspNetCore.App" />
2929
</ItemGroup>
3030

src/ImageSharp.Web.Providers.AWS/ImageSharp.Web.Providers.AWS.csproj

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,18 @@
1313
<Description>A provider for resolving and caching images via AWS S3 Storage.</Description>
1414
</PropertyGroup>
1515

16-
<PropertyGroup>
17-
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
18-
</PropertyGroup>
16+
<Choose>
17+
<When Condition="$(SIXLABORS_TESTING) == true">
18+
<PropertyGroup>
19+
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
20+
</PropertyGroup>
21+
</When>
22+
<Otherwise>
23+
<PropertyGroup>
24+
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
25+
</PropertyGroup>
26+
</Otherwise>
27+
</Choose>
1928

2029
<ItemGroup>
2130
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.web\sixlabors.imagesharp.web.128.png" Pack="true" PackagePath="" />

src/ImageSharp.Web.Providers.Azure/ImageSharp.Web.Providers.Azure.csproj

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,25 @@
1111
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
1212
<PackageTags>Image Middleware Resize Crop Gif Jpg Jpeg Bitmap Png Azure</PackageTags>
1313
<Description>A provider for resolving and caching images via Azure Blob Storage.</Description>
14-
</PropertyGroup>
15-
16-
<PropertyGroup>
17-
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
1814
</PropertyGroup>
1915

16+
<Choose>
17+
<When Condition="$(SIXLABORS_TESTING) == true">
18+
<PropertyGroup>
19+
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
20+
</PropertyGroup>
21+
</When>
22+
<Otherwise>
23+
<PropertyGroup>
24+
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
25+
</PropertyGroup>
26+
</Otherwise>
27+
</Choose>
28+
2029
<ItemGroup>
2130
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.web\sixlabors.imagesharp.web.128.png" Pack="true" PackagePath="" />
2231
</ItemGroup>
23-
32+
2433
<ItemGroup>
2534
<PackageReference Include="Azure.Storage.Blobs" />
2635
</ItemGroup>

src/ImageSharp.Web/ImageSharp.Web.csproj

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@
1313
<Description>ImageSharp Middleware for serving images via a url based API.</Description>
1414
</PropertyGroup>
1515

16-
<PropertyGroup>
17-
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
18-
</PropertyGroup>
16+
<Choose>
17+
<When Condition="$(SIXLABORS_TESTING) == true">
18+
<PropertyGroup>
19+
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
20+
</PropertyGroup>
21+
</When>
22+
<Otherwise>
23+
<PropertyGroup>
24+
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
25+
</PropertyGroup>
26+
</Otherwise>
27+
</Choose>
1928

2029
<ItemGroup>
2130
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.web\sixlabors.imagesharp.web.128.png" Pack="true" PackagePath="" />
2231
</ItemGroup>
2332

24-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
33+
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
2534
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2635
</ItemGroup>
2736

@@ -39,7 +48,6 @@
3948
<PackageReference Include="SixLabors.ImageSharp" />
4049
</ItemGroup>
4150

42-
4351
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />
4452

4553
</Project>

tests/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<PackageReference Update="xunit.runner.visualstudio" Version="2.3.1" />
3434
</ItemGroup>
3535

36-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
36+
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
3737
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="3.1.1" />
3838
</ItemGroup>
3939

tests/ImageSharp.Web.Benchmarks/ImageSharp.Web.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
66
<AssemblyName>ImageSharp.Web.Benchmarks</AssemblyName>
77
<RootNamespace>SixLabors.ImageSharp.Web.Benchmarks</RootNamespace>
88
<GenerateProgramFile>false</GenerateProgramFile>

tests/ImageSharp.Web.Tests/ImageSharp.Web.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<PropertyGroup>
44
<RootNamespace>SixLabors.ImageSharp.Web.Tests</RootNamespace>
55
<AssemblyName>SixLabors.ImageSharp.Web.Tests</AssemblyName>
6-
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="Azure.Storage.Blobs" />
1111
</ItemGroup>
1212

13-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
13+
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
1414
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
1515
</ItemGroup>
1616

0 commit comments

Comments
 (0)