Skip to content

Commit 0152586

Browse files
Merge branch 'master' into js/aot-experiments
2 parents bf957c6 + ae8e5e4 commit 0152586

File tree

1,259 files changed

+19371
-6750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,259 files changed

+19371
-6750
lines changed

.editorconfig

Lines changed: 404 additions & 341 deletions
Large diffs are not rendered by default.

.gitattributes

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
# Set default behavior to:
33
# treat as text and
44
# normalize to Unix-style line endings
5+
###############################################################################
56
* text eol=lf
6-
7+
###############################################################################
78
# Set explicit file behavior to:
9+
# treat as text and
10+
# normalize to Unix-style line endings
11+
###############################################################################
812
*.asm text eol=lf
913
*.c text eol=lf
1014
*.clj text eol=lf
@@ -49,58 +53,75 @@
4953
*.txt text eol=lf
5054
*.vb text eol=lf
5155
*.yml text eol=lf
56+
###############################################################################
57+
# Set explicit file behavior to:
5258
# treat as text
5359
# normalize to Unix-style line endings and
5460
# diff as csharp
61+
###############################################################################
5562
*.cs text eol=lf diff=csharp
63+
###############################################################################
64+
# Set explicit file behavior to:
65+
# treat as text
66+
# normalize to Unix-style line endings and
5667
# use a union merge when resoling conflicts
68+
###############################################################################
5769
*.csproj text eol=lf merge=union
5870
*.dbproj text eol=lf merge=union
5971
*.fsproj text eol=lf merge=union
6072
*.ncrunchproject text eol=lf merge=union
6173
*.vbproj text eol=lf merge=union
74+
###############################################################################
75+
# Set explicit file behavior to:
76+
# treat as text
6277
# normalize to Windows-style line endings and
78+
# use a union merge when resoling conflicts
79+
###############################################################################
6380
*.sln text eol=crlf merge=union
81+
###############################################################################
82+
# Set explicit file behavior to:
6483
# treat as binary
84+
###############################################################################
6585
*.basis binary
66-
*.bmp binary
67-
*.dds binary
6886
*.dll binary
6987
*.eot binary
7088
*.exe binary
71-
*.gif binary
72-
*.jpg binary
7389
*.ktx binary
7490
*.otf binary
7591
*.pbm binary
7692
*.pdf binary
77-
*.png binary
7893
*.ppt binary
7994
*.pptx binary
8095
*.pvr binary
8196
*.snk binary
82-
*.tga binary
8397
*.ttc binary
8498
*.ttf binary
85-
*.webp binary
99+
*.wbmp binary
86100
*.woff binary
87101
*.woff2 binary
88102
*.xls binary
89103
*.xlsx binary
104+
###############################################################################
105+
# Set explicit file behavior to:
90106
# diff as plain text
107+
###############################################################################
91108
*.doc diff=astextplain
92109
*.docx diff=astextplain
93110
*.dot diff=astextplain
94111
*.pdf diff=astextplain
95112
*.pptx diff=astextplain
96113
*.rtf diff=astextplain
97114
*.svg diff=astextplain
98-
*.jpg filter=lfs diff=lfs merge=lfs -text
99-
*.jpeg filter=lfs diff=lfs merge=lfs -text
100-
*.bmp filter=lfs diff=lfs merge=lfs -text
101-
*.gif filter=lfs diff=lfs merge=lfs -text
102-
*.png filter=lfs diff=lfs merge=lfs -text
103-
*.tif filter=lfs diff=lfs merge=lfs -text
104-
*.tiff filter=lfs diff=lfs merge=lfs -text
105-
*.tga filter=lfs diff=lfs merge=lfs -text
106-
*.webp filter=lfs diff=lfs merge=lfs -text
115+
###############################################################################
116+
# Handle image files by git lfs
117+
###############################################################################
118+
*.jpg filter=lfs diff=lfs merge=lfs -text
119+
*.jpeg filter=lfs diff=lfs merge=lfs -text
120+
*.bmp filter=lfs diff=lfs merge=lfs -text
121+
*.gif filter=lfs diff=lfs merge=lfs -text
122+
*.png filter=lfs diff=lfs merge=lfs -text
123+
*.tif filter=lfs diff=lfs merge=lfs -text
124+
*.tiff filter=lfs diff=lfs merge=lfs -text
125+
*.tga filter=lfs diff=lfs merge=lfs -text
126+
*.webp filter=lfs diff=lfs merge=lfs -text
127+
*.dds filter=lfs diff=lfs merge=lfs -text

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#### **Running tests and Debugging**
3030

3131
* Expected test output is pulled in as a submodule from the [ImageSharp.Tests.Images repository](https://github.com/SixLabors/Imagesharp.Tests.Images/tree/master/ReferenceOutput). To succesfully run tests, make sure that you have updated the submodules!
32-
* Debugging (running tests in Debug mode) is only supported on .NET Core 2.1, because of JIT Code Generation bugs like [dotnet/coreclr#16443](https://github.com/dotnet/coreclr/issues/16443) or [dotnet/coreclr#20657](https://github.com/dotnet/coreclr/issues/20657)
32+
* Debugging (running tests in Debug mode) is only supported on .NET Core 2.1+, because of JIT Code Generation bugs like [dotnet/coreclr#16443](https://github.com/dotnet/coreclr/issues/16443) or [dotnet/coreclr#20657](https://github.com/dotnet/coreclr/issues/20657)
3333

3434
#### **Do you have questions about consuming the library or the source code?**
3535

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a Question
4-
url: https://github.com/SixLabors/ImageSharp/discussions?discussions_q=category%3AHelp
4+
url: https://github.com/SixLabors/ImageSharp/discussions?discussions_q=category%3AQ%26A
55
about: Ask a question about this project.
66
- name: Feature Request
77
url: https://github.com/SixLabors/ImageSharp/discussions?discussions_q=category%3AIdeas

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

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,29 @@ jobs:
1515
matrix:
1616
options:
1717
- os: ubuntu-latest
18-
framework: netcoreapp3.1
18+
framework: net5.0
19+
runtime: -x64
20+
codecov: false
21+
- os: macos-latest
22+
framework: net5.0
1923
runtime: -x64
2024
codecov: false
2125
- os: windows-latest
26+
framework: net5.0
27+
runtime: -x64
28+
codecov: false
29+
- os: ubuntu-latest
2230
framework: netcoreapp3.1
2331
runtime: -x64
2432
codecov: true
33+
- os: macos-latest
34+
framework: netcoreapp3.1
35+
runtime: -x64
36+
codecov: false
37+
- os: windows-latest
38+
framework: netcoreapp3.1
39+
runtime: -x64
40+
codecov: false
2541
- os: windows-latest
2642
framework: netcoreapp2.1
2743
runtime: -x64
@@ -40,6 +56,20 @@ jobs:
4056

4157
steps:
4258
- uses: actions/checkout@v2
59+
60+
# See https://github.com/actions/checkout/issues/165#issuecomment-657673315
61+
- name: Create LFS file list
62+
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
63+
64+
- name: Restore LFS cache
65+
uses: actions/cache@v2
66+
id: lfs-cache
67+
with:
68+
path: .git/lfs
69+
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
70+
71+
- name: Git LFS Pull
72+
run: git lfs pull
4373

4474
- name: Install NuGet
4575
uses: NuGet/setup-nuget@v1
@@ -52,17 +82,34 @@ jobs:
5282
git fetch --prune --unshallow
5383
git submodule -q update --init --recursive
5484
85+
- name: Setup NuGet Cache
86+
uses: actions/cache@v2
87+
id: nuget-cache
88+
with:
89+
path: ~/.nuget
90+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
91+
restore-keys: ${{ runner.os }}-nuget-
92+
5593
- name: Build
5694
shell: pwsh
5795
run: ./ci-build.ps1 "${{matrix.options.framework}}"
96+
env:
97+
SIXLABORS_TESTING: True
5898

5999
- name: Test
60100
shell: pwsh
61101
run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}"
62102
env:
63-
CI: True
103+
SIXLABORS_TESTING: True
64104
XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit
65105

106+
- name: Export Failed Output
107+
uses: actions/upload-artifact@v2
108+
if: failure()
109+
with:
110+
name: actual_output_${{ runner.os }}_${{ matrix.options.framework }}${{ matrix.options.runtime }}.zip
111+
path: tests/Images/ActualOutput/
112+
66113
- name: Update Codecov
67114
uses: codecov/codecov-action@v1
68115
if: matrix.options.codecov == true && startsWith(github.repository, 'SixLabors')

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,4 @@ artifacts/
221221
# Tests
222222
**/Images/ActualOutput
223223
**/Images/ReferenceOutput
224+
.DS_Store

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[submodule "tests/Images/External"]
2-
path = tests/Images/External
3-
url = https://github.com/SixLabors/Imagesharp.Tests.Images.git
4-
branch = master
51
[submodule "shared-infrastructure"]
62
path = shared-infrastructure
73
url = https://github.com/SixLabors/SharedInfrastructure

.runsettings

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<RunSettings>
3+
<RunConfiguration>
4+
<!--Used in conjunction with ActiveIssueAttribute to skip tests with known issues-->
5+
<TestCaseFilter>category!=failing</TestCaseFilter>
6+
</RunConfiguration>
7+
</RunSettings>

Directory.Build.props

Lines changed: 4 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -10,131 +10,12 @@
1010
that is done by the file that imports us.
1111
-->
1212

13-
<!-- Default settings that are used by other settings -->
1413
<PropertyGroup>
15-
<BaseArtifactsPath>$(MSBuildThisFileDirectory)artifacts/</BaseArtifactsPath>
16-
<BaseArtifactsPathSuffix>$(SixLaborsProjectCategory)/$(MSBuildProjectName)</BaseArtifactsPathSuffix>
17-
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/SixLabors/ImageSharp/</RepositoryUrl>
14+
<!-- This MUST be defined before importing props. -->
15+
<SixLaborsSolutionDirectory>$(MSBuildThisFileDirectory)</SixLaborsSolutionDirectory>
1816
</PropertyGroup>
1917

20-
<!-- Default settings that explicitly differ from the Sdk.props defaults -->
21-
<PropertyGroup>
22-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
23-
<BaseIntermediateOutputPath>$(BaseArtifactsPath)obj/$(BaseArtifactsPathSuffix)/</BaseIntermediateOutputPath>
24-
<DebugType>portable</DebugType>
25-
<DebugType Condition="'$(codecov)' != ''">full</DebugType>
26-
<NullableContextOptions>disable</NullableContextOptions>
27-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
28-
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
29-
</PropertyGroup>
30-
31-
<!--
32-
https://apisof.net/
33-
+===================+=======+==========+=====================+=============+=================+====================+==============+=========+============|
34-
| SUPPORTS | MATHF | HASHCODE | EXTENDED_INTRINSICS | SPAN_STREAM | ENCODING_STRING | RUNTIME_INTRINSICS | CODECOVERAGE | HOTPATH | CREATESPAN |
35-
+===================+=======+==========+=====================+=============+=================+====================+==============+=========|============|
36-
| netcoreapp3.1 | Y | Y | Y | Y | Y | Y | Y | Y | Y |
37-
| netcoreapp2.1 | Y | Y | Y | Y | Y | N | Y | N | Y |
38-
| netcoreapp2.0 | Y | N | N | N | N | N | Y | N | Y |
39-
| netstandard2.1 | Y | Y | N | Y | Y | N | Y | N | Y |
40-
| netstandard2.0 | N | N | N | N | N | N | Y | N | N |
41-
| netstandard1.3 | N | N | N | N | N | N | N | N | N |
42-
| net472 | N | N | Y | N | N | N | Y | N | N |
43-
+===================+=======+==========+=====================+=============+=================+====================+==============+=========|============|
44-
-->
45-
46-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
47-
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
48-
<DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants>
49-
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
50-
<DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants>
51-
<DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants>
52-
<DefineConstants>$(DefineConstants);SUPPORTS_RUNTIME_INTRINSICS</DefineConstants>
53-
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
54-
<DefineConstants>$(DefineConstants);SUPPORTS_HOTPATH</DefineConstants>
55-
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
56-
</PropertyGroup>
57-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
58-
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
59-
<DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants>
60-
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
61-
<DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants>
62-
<DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants>
63-
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
64-
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
65-
</PropertyGroup>
66-
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
67-
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
68-
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
69-
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
70-
</PropertyGroup>
71-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
72-
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants>
73-
<DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants>
74-
<DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants>
75-
<DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants>
76-
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
77-
<DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants>
78-
</PropertyGroup>
79-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
80-
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
81-
</PropertyGroup>
82-
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
83-
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
84-
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
85-
</PropertyGroup>
86-
87-
<!-- Default settings that explicitly differ from the Sdk.targets defaults-->
88-
<PropertyGroup>
89-
<Authors>Six Labors and contributors</Authors>
90-
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
91-
<Company>Six Labors</Company>
92-
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(BaseArtifactsPathSuffix)/$(Configuration)/</PackageOutputPath>
93-
<Product>SixLabors.ImageSharp</Product>
94-
<VersionPrefix>0.0.1</VersionPrefix>
95-
<VersionPrefix Condition="'$(packageversion)' != ''">$(PackageVersion)</VersionPrefix>
96-
<VersionSuffix></VersionSuffix>
97-
</PropertyGroup>
98-
99-
<!--MinVer Properties for versioning-->
100-
<PropertyGroup>
101-
<MinVerTagPrefix>v</MinVerTagPrefix>
102-
<MinVerVerbosity>normal</MinVerVerbosity>
103-
</PropertyGroup>
104-
105-
<!-- Default settings that are otherwise undefined -->
106-
<PropertyGroup>
107-
<Copyright>Copyright © Six Labors</Copyright>
108-
<Features>strict;IOperation</Features>
109-
<HighEntropyVA>true</HighEntropyVA>
110-
<LangVersion>8.0</LangVersion>
111-
<NeutralLanguage>en</NeutralLanguage>
112-
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
113-
<PackageIcon>sixlabors.imagesharp.128.png</PackageIcon>
114-
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
115-
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
116-
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
117-
<RepositoryType>git</RepositoryType>
118-
<RestoreSources>
119-
https://www.myget.org/F/sixlabors/api/v3/index.json;
120-
https://api.nuget.org/v3/index.json;
121-
<!-- Contains RemoteExecutor. Taken from: https://github.com/dotnet/runtime/blob/master/NuGet.config -->
122-
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;
123-
</RestoreSources>
124-
<SignAssembly>true</SignAssembly>
125-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)shared-infrastructure/SixLabors.snk</AssemblyOriginatorKeyFile>
126-
<SixLaborsPublicKey>00240000048000009400000006020000002400005253413100040000010001000147e6fe6766715eec6cfed61f1e7dcdbf69748a3e355c67e9d8dfd953acab1d5e012ba34b23308166fdc61ee1d0390d5f36d814a6091dd4b5ed9eda5a26afced924c683b4bfb4b3d64b0586a57eff9f02b1f84e3cb0ddd518bd1697f2c84dcbb97eb8bb5c7801be12112ed0ec86db934b0e9a5171e6bb1384b6d2f7d54dfa97</SixLaborsPublicKey>
127-
<UseSharedCompilation>true</UseSharedCompilation>
128-
</PropertyGroup>
129-
130-
<!-- Package references and additional files which are consumed by all projects -->
131-
<ItemGroup>
132-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" IsImplicitlyDefined="true" />
133-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" IsImplicitlyDefined="true" />
134-
<PackageReference Include="StyleCop.Analyzers" IsImplicitlyDefined="true" />
135-
<AdditionalFiles Include="$(MSBuildThisFileDirectory)shared-infrastructure\stylecop.json" />
136-
<!--NuGet package icon source-->
137-
<None Include="$(MSBuildThisFileDirectory)shared-infrastructure\branding\icons\imagesharp\sixlabors.imagesharp.128.png" Pack="true" PackagePath="" />
138-
</ItemGroup>
18+
<!-- Import the shared global .props file -->
19+
<Import Project="$(MSBuildThisFileDirectory)shared-infrastructure\msbuild\props\SixLabors.Global.props" />
13920

14021
</Project>

0 commit comments

Comments
 (0)