diff --git a/.gitattributes b/.gitattributes
index 0f550f4074..dd66250813 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -87,18 +87,24 @@
# Set explicit file behavior to:
# treat as binary
###############################################################################
+*.basis binary
*.bmp binary
+*.dds binary
*.dll binary
*.eot binary
*.exe binary
*.gif binary
*.jpg binary
+*.ktx binary
+*.pbm binary
*.pdf binary
*.png binary
*.ppt binary
*.pptx binary
+*.pvr binary
*.ttf binary
*.snk binary
+*.tga binary
*.ttf binary
*.woff binary
*.woff2 binary
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
new file mode 100644
index 0000000000..4cb40d36a0
--- /dev/null
+++ b/.github/workflows/build-and-test.yml
@@ -0,0 +1,105 @@
+name: Build
+
+on:
+ push:
+ branches:
+ - master
+ tags:
+ - "v*"
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ Build:
+ strategy:
+ matrix:
+ options:
+ - os: ubuntu-latest
+ framework: netcoreapp3.1
+ runtime: -x64
+ codecov: false
+ - os: windows-latest
+ framework: netcoreapp3.1
+ runtime: -x64
+ codecov: true
+ - os: windows-latest
+ framework: netcoreapp2.1
+ runtime: -x64
+ codecov: false
+ - os: windows-latest
+ framework: net472
+ runtime: -x64
+ codecov: false
+ - os: windows-latest
+ framework: net472
+ runtime: -x86
+ codecov: false
+
+ runs-on: ${{matrix.options.os}}
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install NuGet
+ uses: NuGet/setup-nuget@v1
+
+ - name: Setup Git
+ shell: bash
+ run: |
+ git config --global core.autocrlf false
+ git config --global core.longpaths true
+ git fetch --prune --unshallow
+ git submodule -q update --init --recursive
+
+ - name: Fetch Tags for GitVersion
+ run: |
+ git fetch --tags
+
+ - name: Fetch master for GitVersion
+ if: github.ref != 'refs/heads/master'
+ run: git branch --create-reflog master origin/master
+
+ - name: Install GitVersion
+ uses: gittools/actions/setup-gitversion@v0.3
+ with:
+ versionSpec: "5.1.x"
+
+ - name: Use GitVersion
+ id: gitversion # step id used as reference for output values
+ uses: gittools/actions/execute-gitversion@v0.3
+
+ - name: Setup DotNet SDK
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: "3.1.101"
+
+ - name: Build
+ shell: pwsh
+ run: ./ci-build.ps1 "${{steps.gitversion.outputs.nuGetVersion}}" "${{matrix.options.framework}}"
+
+ - name: Test
+ shell: pwsh
+ 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
+
+ - name: Update Codecov
+ uses: iansu/codecov-action-node@v1.0.0
+ if: matrix.options.codecov == true
+ with:
+ token: ${{secrets.CODECOV_TOKEN}}
+ file: "coverage.${{matrix.options.framework}}.xml"
+ flags: unittests
+
+ - name: Pack # We can use this filter as we know it happens only once and takes the most time to complete.
+ if: (github.event_name == 'push') && (matrix.options.codecov == true)
+ shell: pwsh
+ run: ./ci-build.ps1 "${{steps.gitversion.outputs.nuGetVersion}}"
+
+ - name: Publish to MyGet
+ if: (github.event_name == 'push') && (matrix.options.codecov == true)
+ shell: pwsh
+ run: nuget.exe push .\artifacts\*.nupkg ${{secrets.MYGET_TOKEN}} -Source https://www.myget.org/F/sixlabors/api/v2/package
+ # TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org
diff --git a/.gitignore b/.gitignore
index d8f376a419..8fcb5ef405 100644
--- a/.gitignore
+++ b/.gitignore
@@ -137,7 +137,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6fd38484dd..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-language: csharp
-solution: ImageSharp.sln
-
-matrix:
- include:
- - os: linux # Ubuntu 16.04
- dist: xenial
- sudo: required
- dotnet: 2.1.603
- mono: latest
-# - os: osx # OSX 10.11
-# osx_image: xcode7.3.1
-# dotnet: 1.0.0-preview2-003121
-# mono: latest
-
-branches:
- only:
- - master
- - coverity_scan
-
-script:
- - git submodule -q update --init
- - dotnet restore
- - dotnet test tests/ImageSharp.Tests/ImageSharp.Tests.csproj -c Release -f "netcoreapp2.1"
-
-env:
- global:
- # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
- # via the "travis encrypt" command using the project repo's public key
- - secure: "rjMvEMN9rpvIXqXqCAAKzbHyABzr7E4wPU/dYJ/mHBqlCccFpQrEXVVM1MfRFXYuWZSaIioknhLATZjT5xvIYpTNM6D57z4OTmqeRHhYm80="
-
-before_install:
- - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
-
-addons:
- coverity_scan:
- project:
- name: "SixLabors/ImageSharp"
- description: "Build submitted via Travis CI"
- notification_email: james_south@hotmail.com
- build_command_prepend: "dotnet restore"
- build_command: "dotnet build -c Release"
- branch_pattern: coverity_scan
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index c772e647ce..0000000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- // Use IntelliSense to find out which attributes exist for C# debugging
- // Use hover for the description of the existing attributes
- // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
- "version": "0.2.0",
- "configurations": [
- {
- "name": ".NET Core Launch (console)",
- "type": "coreclr",
- "request": "launch",
- "preLaunchTask": "build",
- // If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceRoot}/tests/ImageSharp.Benchmarks/bin/Debug/netcoreapp2.0/ImageSharp.Benchmarks.dll",
- "args": [],
- "cwd": "${workspaceRoot}/samples/AvatarWithRoundedCorner",
- // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
- "console": "internalConsole",
- "stopAtEntry": false,
- "internalConsoleOptions": "openOnSessionStart"
- },
- {
- "name": ".NET Core Attach",
- "type": "coreclr",
- "request": "attach",
- "processId": "${command:pickProcess}"
- }
- ]
-}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index 82aaa2f8d0..0000000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- "version": "0.1.0",
- "command": "dotnet",
- "isShellCommand": true,
- "args": [],
- "tasks": [
- {
- "taskName": "build",
- "args": [ "ImageSharp.sln" ],
- "isBuildCommand": true,
- "showOutput": "always",
- "problemMatcher": "$msCompile"
- },
- {
- "taskName": "build benchmark",
- "suppressTaskName": true,
- "args": [ "build", "tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj", "-f", "netcoreapp2.0", "-c", "Release" ],
- "showOutput": "always",
- "problemMatcher": "$msCompile"
- },
- {
- "taskName": "test",
- "args": ["tests/ImageSharp.Tests/ImageSharp.Tests.csproj", "-c", "release", "-f", "netcoreapp2.0"],
- "isTestCommand": true,
- "showOutput": "always",
- "problemMatcher": "$msCompile"
- }
- ]
-}
\ No newline at end of file
diff --git a/CodeCoverage.runsettings b/CodeCoverage.runsettings
deleted file mode 100644
index d9c0848f13..0000000000
--- a/CodeCoverage.runsettings
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
- .*ImageSharp.dll
-
-
- .*tests*
- .*Tests*
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index 9fcdf13961..346da14be8 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,7 +14,7 @@
$(MSBuildThisFileDirectory)artifacts/
$(ImageSharpProjectCategory)/$(MSBuildProjectName)
- https://github.com/SixLabors/ImageSharp/
+ https://github.com/SixLabors/ImageSharp/
@@ -31,43 +31,36 @@
-
-
- $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING
+
+ $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING;SUPPORTS_RUNTIME_INTRINSICS;SUPPORTS_CODECOVERAGE
-
- $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING
+
+ $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING;SUPPORTS_CODECOVERAGE
-
- $(DefineConstants);SUPPORTS_MATHF;
+
+ $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_CODECOVERAGE
-
- $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING
+
+ $(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING;SUPPORTS_CODECOVERAGE
-
- $(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS
+
+ $(DefineConstants);SUPPORTS_CODECOVERAGE
-
-
- true
-
-
-
-
- false
+
+ $(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_CODECOVERAGE
@@ -88,10 +81,10 @@
Copyright © Six Labors and Contributors
strict;IOperation
true
- 7.3
+ 8.0
en
true
- https://raw.githubusercontent.com/SixLabors/Branding/master/icons/imagesharp/sixlabors.imagesharp.128.png
+ icon.png
Apache-2.0
$(RepositoryUrl)
true
@@ -105,9 +98,15 @@
true
-
+
+
+
+
+
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index f6523fee03..eb0764d899 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -15,34 +15,21 @@
$(DefineConstants);$(OS)
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
diff --git a/GitVersion.yml b/GitVersion.yml
new file mode 100644
index 0000000000..42dc350f95
--- /dev/null
+++ b/GitVersion.yml
@@ -0,0 +1,6 @@
+continuous-delivery-fallback-tag: ci
+branches:
+ master:
+ tag: dev
+ pull-request:
+ tag: pr
diff --git a/ImageSharp.sln b/ImageSharp.sln
index 227512cd1f..875ede1b2d 100644
--- a/ImageSharp.sln
+++ b/ImageSharp.sln
@@ -3,24 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28902.138
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
.gitmodules = .gitmodules
- .travis.yml = .travis.yml
- appveyor.yml = appveyor.yml
- build.cmd = build.cmd
- build.ps1 = build.ps1
- codecov.yml = codecov.yml
- CodeCoverage.runsettings = CodeCoverage.runsettings
+ ci-build.ps1 = ci-build.ps1
+ ci-test.ps1 = ci-test.ps1
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
- ImageSharp.sln.DotSettings = ImageSharp.sln.DotSettings
+ GitVersion.yml = GitVersion.yml
LICENSE = LICENSE
README.md = README.md
- run-tests.ps1 = run-tests.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1799C43E-5C54-4A8F-8D64-B1475241DB0D}"
@@ -36,25 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEM
.github\ISSUE_TEMPLATE\feature-request.md = .github\ISSUE_TEMPLATE\feature-request.md
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".vscode", ".vscode", "{0274D4CF-9932-47CC-8E89-54DC05B8F06E}"
- ProjectSection(SolutionItems) = preProject
- .vscode\launch.json = .vscode\launch.json
- .vscode\tasks.json = .vscode\tasks.json
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E919DF0B-2607-4462-8FC0-5C98FE50F8C9}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "icons", "icons", "{2B02E303-7CC6-4E15-97EE-DBE86B287553}"
- ProjectSection(SolutionItems) = preProject
- build\icons\imagesharp-logo-128.png = build\icons\imagesharp-logo-128.png
- build\icons\imagesharp-logo-256.png = build\icons\imagesharp-logo-256.png
- build\icons\imagesharp-logo-32.png = build\icons\imagesharp-logo-32.png
- build\icons\imagesharp-logo-512.png = build\icons\imagesharp-logo-512.png
- build\icons\imagesharp-logo-64.png = build\icons\imagesharp-logo-64.png
- build\icons\imagesharp-logo.png = build\icons\imagesharp-logo.png
- build\icons\imagesharp-logo.svg = build\icons\imagesharp-logo.svg
- EndProjectSection
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{815C0625-CD3D-440F-9F80-2D83856AB7AE}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
@@ -70,12 +46,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{56801022
tests\Directory.Build.targets = tests\Directory.Build.targets
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeCoverage", "CodeCoverage", "{D4C5EC58-F8E6-4636-B9EE-C99D2578E5C6}"
- ProjectSection(SolutionItems) = preProject
- tests\CodeCoverage\CodeCoverage.cmd = tests\CodeCoverage\CodeCoverage.cmd
- tests\CodeCoverage\packages.config = tests\CodeCoverage\packages.config
- EndProjectSection
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Images", "Images", "{FA55F5DE-11A6-487D-ABA4-BC93A02717DD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Input", "Input", "{9DA226A1-8656-49A8-A58A-A8B5C081AD66}"
@@ -354,7 +324,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Benchmarks", "te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Sandbox46", "tests\ImageSharp.Sandbox46\ImageSharp.Sandbox46.csproj", "{561B880A-D9EE-44EF-90F5-817C54A9D9AB}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{C0D7754B-5277-438E-ABEB-2BA34401B5A7}"
+ ProjectSection(SolutionItems) = preProject
+ .github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml
+ EndProjectSection
+EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SharedInfrastructure", "shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.shproj", "{68A8CC40-6AED-4E96-B524-31B1158FDEEA}"
+EndProject
Global
+ GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems*{68a8cc40-6aed-4e96-b524-31b1158fdeea}*SharedItemsImports = 13
+ EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
@@ -418,9 +398,7 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{FBE8C1AD-5AEC-4514-9B64-091D8E145865} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D}
- {2B02E303-7CC6-4E15-97EE-DBE86B287553} = {E919DF0B-2607-4462-8FC0-5C98FE50F8C9}
{2AA31A1F-142C-43F4-8687-09ABCA4B3A26} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
- {D4C5EC58-F8E6-4636-B9EE-C99D2578E5C6} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{FA55F5DE-11A6-487D-ABA4-BC93A02717DD} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{9DA226A1-8656-49A8-A58A-A8B5C081AD66} = {FA55F5DE-11A6-487D-ABA4-BC93A02717DD}
{1A82C5F6-90E0-4E97-BE16-A825C046B493} = {9DA226A1-8656-49A8-A58A-A8B5C081AD66}
@@ -438,6 +416,8 @@ Global
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{2BF743D8-2A06-412D-96D7-F448F00C5EA5} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{561B880A-D9EE-44EF-90F5-817C54A9D9AB} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
+ {C0D7754B-5277-438E-ABEB-2BA34401B5A7} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D}
+ {68A8CC40-6AED-4E96-B524-31B1158FDEEA} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5F8B9D1F-CD8B-4CC5-8216-D531E25BD795}
diff --git a/ImageSharp.sln.DotSettings b/ImageSharp.sln.DotSettings
deleted file mode 100644
index ece3dddb3c..0000000000
--- a/ImageSharp.sln.DotSettings
+++ /dev/null
@@ -1,393 +0,0 @@
-
- <?xml version="1.0" encoding="utf-16"?>
-<Profile name="StyleCop">
- <CSUpdateFileHeader>False</CSUpdateFileHeader>
- <CSArrangeQualifiers>True</CSArrangeQualifiers>
- <CSOptimizeUsings>
- <OptimizeUsings>True</OptimizeUsings>
- <EmbraceInRegion>False</EmbraceInRegion>
- <RegionName></RegionName>
- </CSOptimizeUsings>
- <CSReformatCode>True</CSReformatCode>
- <CSReorderTypeMembers>True</CSReorderTypeMembers>
-</Profile>
- StyleCop
- public protected internal private static new abstract virtual override sealed readonly extern unsafe volatile async
- Field, Property, Event, Method
- True
- True
- True
- True
- True
- True
- True
- True
- True
- NEXT_LINE_SHIFTED_2
- 1
- 1
- 1
- 1
- 1
- NEXT_LINE_SHIFTED_2
- ALWAYS_ADD
- ALWAYS_ADD
- ALWAYS_ADD
- ALWAYS_ADD
- ALWAYS_ADD
- NEXT_LINE_SHIFTED_2
- 1
- 1
- False
- False
- False
- NEVER
- False
- False
- NEVER
- False
- ALWAYS
- False
- True
- ON_SINGLE_LINE
- False
- True
- True
- False
- True
- True
- CHOP_IF_LONG
- True
- True
- CHOP_IF_LONG
- CHOP_IF_LONG
- <?xml version="1.0" encoding="utf-16"?>
-<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
- <TypePattern DisplayName="COM interfaces or structs">
- <TypePattern.Match>
- <Or>
- <And>
- <Kind Is="Interface" />
- <Or>
- <HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
- <HasAttribute Name="System.Runtime.InteropServices.ComImport" />
- </Or>
- </And>
- <Kind Is="Struct" />
- </Or>
- </TypePattern.Match>
- </TypePattern>
- <TypePattern DisplayName="P/Invoke classes called 'NativeMethods' (StyleCop)">
- <TypePattern.Match>
- <And>
- <Kind Is="Class" />
- <Name Is=".*NativeMethods" />
- </And>
- </TypePattern.Match>
- </TypePattern>
- <TypePattern DisplayName="DataMember serialisation classes (StyleCop)">
- <TypePattern.Match>
- <And>
- <Or>
- <Kind Is="Field" />
- <Kind Is="Property" />
- </Or>
- <HasAttribute Name="System.Runtime.Serialization.DataMemberAttribute" />
- </And>
- </TypePattern.Match>
- </TypePattern>
- <TypePattern DisplayName="Default Pattern (StyleCop)" RemoveRegions="All">
- <Entry DisplayName="Constants">
- <Entry.Match>
- <Kind Is="Constant" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Static fields">
- <Entry.Match>
- <And>
- <Kind Is="Field" />
- <Static />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Readonly />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Fields">
- <Entry.Match>
- <Kind Is="Field" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Readonly />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="200" DisplayName="Constructors and Destructors">
- <Entry.Match>
- <Or>
- <Kind Is="Constructor" />
- <Kind Is="Destructor" />
- </Or>
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- <Kind Order="Constructor Destructor" />
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Delegates">
- <Entry.Match>
- <Kind Is="Delegate" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Public events">
- <Entry.Match>
- <And>
- <Kind Is="Event" />
- <Access Is="Public" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Interface events">
- <Entry.Match>
- <And>
- <Kind Is="Event" />
- <ImplementsInterface />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <ImplementsInterface Immediate="True" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Other events">
- <Entry.Match>
- <Kind Is="Event" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Enums">
- <Entry.Match>
- <Kind Is="Enum" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Interfaces">
- <Entry.Match>
- <Kind Is="Interface" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Public properties">
- <Entry.Match>
- <And>
- <Kind Is="Property" />
- <Access Is="Public" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Interface properties">
- <Entry.Match>
- <And>
- <Kind Is="Property" />
- <ImplementsInterface />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <ImplementsInterface Immediate="True" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Other properties">
- <Entry.Match>
- <Kind Is="Property" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="1000" DisplayName="Public indexers">
- <Entry.Match>
- <And>
- <Kind Is="Indexer" />
- <Access Is="Public" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="1000" DisplayName="Interface indexers">
- <Entry.Match>
- <And>
- <Kind Is="Indexer" />
- <ImplementsInterface />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <ImplementsInterface Immediate="True" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="1000" DisplayName="Other indexers">
- <Entry.Match>
- <Kind Is="Indexer" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Public methods and operators">
- <Entry.Match>
- <And>
- <Or>
- <Kind Is="Method" />
- <Kind Is="Operator" />
- </Or>
- <Access Is="Public" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Interface methods">
- <Entry.Match>
- <And>
- <Kind Is="Method" />
- <ImplementsInterface />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <ImplementsInterface Immediate="True" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Other methods">
- <Entry.Match>
- <Kind Is="Method" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Operators">
- <Entry.Match>
- <Kind Is="Operator" />
- </Entry.Match>
- <Entry.SortBy>
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Static />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="600" DisplayName="Nested structs">
- <Entry.Match>
- <Kind Is="Struct" />
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="700" DisplayName="Nested classes">
- <Entry.Match>
- <Kind Is="Class" />
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- <Access Order="Public Internal ProtectedInternal Protected Private" />
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="All other members" />
- </TypePattern>
-</Patterns>
- False
- True
- // Copyright (c) Six Labors and contributors.
-// Licensed under the Apache License, Version 2.0.
-
- AC
- DC
- DCT
- EOF
- FDCT
- IDCT
- JPEG
- MCU
- PNG
- RGB
- RLE
- XY
- XYZ
- $object$_On$event$
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
-
\ No newline at end of file
diff --git a/README.md b/README.md
index ba897fa7ef..ceb1e51d22 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,6 @@ Install stable releases via Nuget; development releases are available via MyGet.
| Package Name | Release (NuGet) | Nightly (MyGet) |
|--------------------------------|-----------------|-----------------|
| `SixLabors.ImageSharp` | [](https://www.nuget.org/packages/SixLabors.ImageSharp/) | [](https://www.myget.org/feed/sixlabors/package/nuget/SixLabors.ImageSharp) |
-| `SixLabors.ImageSharp.Drawing` | [](https://www.nuget.org/packages/SixLabors.ImageSharp.Drawing/) | [](https://www.myget.org/feed/sixlabors/package/nuget/SixLabors.ImageSharp.Drawing) |
### Packages
@@ -46,17 +45,11 @@ The **ImageSharp** library is made up of multiple packages:
- Transform methods like Resize, Crop, Skew, Rotate - anything that alters the dimensions of the image
- Non-transform methods like Gaussian Blur, Pixelate, Edge Detection - anything that maintains the original image dimensions
-- **SixLabors.ImageSharp.Drawing**
- - Brushes and various drawing algorithms, including drawing images
- - Various vector drawing methods for drawing paths, polygons etc.
- - Text drawing
-
### Build Status
-| |Build Status|Code Coverage|
-|-------------|:----------:|:-----------:|
-|**Linux/Mac**|[](https://travis-ci.org/SixLabors/ImageSharp)|[](https://codecov.io/gh/SixLabors/ImageSharp)|
-|**Windows** |[](https://ci.appveyor.com/project/six-labors/imagesharp/branch/master)|[](https://codecov.io/gh/SixLabors/ImageSharp)|
+|Build Status|Code Coverage|
+|:----------:|:-----------:|
+|[](https://github.com/SixLabors/ImageSharp/actions)|[](https://codecov.io/gh/SixLabors/ImageSharp)|
### Questions?
@@ -113,9 +106,9 @@ For more examples check out:
If you prefer, you can compile ImageSharp yourself (please do and help!)
-- Using [Visual Studio 2017](https://visualstudio.microsoft.com/vs/)
+- Using [Visual Studio 2019](https://visualstudio.microsoft.com/vs/)
- Make sure you have the latest version installed
- - Make sure you have [the .NET Core 2.1 SDK](https://www.microsoft.com/net/core#windows) installed
+ - Make sure you have [the .NET Core 3.1 SDK](https://www.microsoft.com/net/core#windows) installed
Alternatively, you can work from command line and/or with a lightweight editor on **both Linux/Unix and Windows**:
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 2588b8065e..0000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-version: 1.0.0.{build}
-image: Visual Studio 2017
-
-# prevent the double build when a branch has an active PR
-skip_branch_with_pr: true
-
-environment:
- matrix:
- - target_framework: netcoreapp2.1
- is_32bit: False
-
- - target_framework: netcoreapp2.1
- is_32bit: True
-
- - target_framework: net472
- is_32bit: False
-
- - target_framework: net472
- is_32bit: True
-
- - target_framework: net462
- is_32bit: False
-
- - target_framework: net462
- is_32bit: True
-
- #- target_framework: mono
- # is_32bit: False
- #- target_framework: mono
- # is_32bit: True
- #- target_framework: net47
- # is_32bit: False
- #- target_framework: net47
- # is_32bit: True
-
-install:
- - ps: |
- if ($env:target_framework -eq "mono") {
- if ($env:is_32bit -eq "True") {
- cinst mono --x86
- } else {
- cinst mono
- }
- }
-
-before_build:
- - git submodule -q update --init
- - cmd: dotnet --info
-
-build_script:
-- cmd: build.cmd
-
-test_script:
-- ps: .\run-tests.ps1 $env:target_framework $env:is_32bit
-
-after_test:
- - cmd: appveyor PushArtifact "artifacts\SixLabors.ImageSharp.%APPVEYOR_BUILD_VERSION%.nupkg"
-
-deploy:
- # MyGet Deployment for builds & releases
- - provider: NuGet
- server: https://www.myget.org/F/sixlabors/api/v2/package
- symbol_server: https://www.myget.org/F/sixlabors/symbols/api/v2/package
- api_key:
- secure: V/lEHP0UeMWIpWd0fiNlY2IgbCnJKQlGdRksECdJbOBdaE20Fl0RNL7WyqHe02o4
- artifact: /.*\.nupkg/
- on:
- branch: master
diff --git a/build.cmd b/build.cmd
deleted file mode 100644
index 6372b41253..0000000000
--- a/build.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo Off
-
-PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '.\build.ps1'"
-
-if not "%errorlevel%"=="0" goto failure
-
-:success
-ECHO successfully built project
-REM exit 0
-goto end
-
-:failure
-ECHO failed to build.
-REM exit -1
-goto end
-
-:end
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
deleted file mode 100644
index 4584ebc603..0000000000
--- a/build.ps1
+++ /dev/null
@@ -1,119 +0,0 @@
-
-# lets calulat the correct version here
-$fallbackVersion = "1.0.0";
-$version = ''
-
-$tagRegex = '^v?(\d+\.\d+\.\d+)(-([a-zA-Z]+)\.?(\d*))?$'
-
-# we are running on the build server
-$isVersionTag = $env:APPVEYOR_REPO_TAG_NAME -match $tagRegex
-
- if($isVersionTag) {
-
- Write-Debug "Building commit tagged with a compatable version number"
-
- $version = $matches[1]
- $postTag = $matches[3]
- $count = $matches[4]
- Write-Debug "version number: ${version} post tag: ${postTag} count: ${count}"
- if("$postTag" -ne ""){
- $version = "${version}-${postTag}"
- }
- if("$count" -ne ""){
- # for consistancy with previous releases we pad the counter to only 4 places
- $padded = $count.Trim().Trim('0').PadLeft(4,"0");
- Write-Debug "count '$count', padded '${padded}'"
-
- $version = "${version}${padded}"
- }
- }
- else {
-
- Write-Debug "Untagged"
- $lastTag = (git tag --list --sort=-taggerdate) | Out-String
- $list = $lastTag.Split("`n")
- foreach ($tag in $list) {
-
- Write-Debug "testing ${tag}"
- $tag = $tag.Trim();
- if($tag -match $tagRegex){
- Write-Debug "matched ${tag}"
- $version = $matches[1];
- break;
- }
- }
-
- if("$version" -eq ""){
- $version = $fallbackVersion
- Write-Debug "Failed to discover base version Fallback to '${version}'"
- }else{
-
- Write-Debug "Discovered base version from tags '${version}'"
- }
-
- $buildNumber = $env:APPVEYOR_BUILD_NUMBER
-
- # build number replacement is padded to 6 places
- $buildNumber = "$buildNumber".Trim().Trim('0').PadLeft(6,"0");
- if("$env:APPVEYOR_PULL_REQUEST_NUMBER" -ne ""){
- Write-Debug "building a PR"
-
- $prNumber = "$env:APPVEYOR_PULL_REQUEST_NUMBER".Trim().Trim('0').PadLeft(5,"0");
- # this is a PR
- $version = "${version}-PullRequest${prNumber}${buildNumber}";
- }else{
- Write-Debug "building a branch commit"
-
- # this is a general branch commit
- $branch = $env:APPVEYOR_REPO_BRANCH
-
- if("$branch" -eq ""){
- $branch = ((git rev-parse --abbrev-ref HEAD) | Out-String).Trim()
-
- if("$branch" -eq ""){
- $branch = "unknown"
- }
- }
-
- $branch = $branch.Replace("/","-").ToLower()
-
- if($branch.ToLower() -eq "master"){
- $branch = "dev"
- }
-
- $version = "${version}-${branch}${buildNumber}";
- }
- }
-
-if("$env:APPVEYOR_API_URL" -ne ""){
- # update appveyor build number for this build
- Invoke-RestMethod -Method "PUT" `
- -Uri "${env:APPVEYOR_API_URL}api/build" `
- -Body "{version:'${version}'}" `
- -ContentType "application/json"
-}
-
-Write-Host "Building version '${version}'"
-dotnet restore /p:packageversion=$version /p:DisableImplicitNuGetFallbackFolder=true
-
-Write-Host "Building projects"
-dotnet build -c Release /p:packageversion=$version
-
-if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
-
-#
-# TODO: DO WE NEED TO RUN TESTS IMPLICITLY?
-#
-# if ( $env:CI -ne "True") {
-# cd ./tests/ImageSharp.Tests/
-# dotnet xunit -nobuild -c Release -f netcoreapp2.0 --fx-version 2.0.0
-# ./RunExtendedTests.cmd
-# cd ../..
-# }
-#
-
-if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
-
-Write-Host "Packaging projects"
-dotnet pack ./src/ImageSharp/ -c Release --output ../../artifacts --no-build /p:packageversion=$version
-if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
diff --git a/build/icons/imagesharp-logo-128.png b/build/icons/imagesharp-logo-128.png
deleted file mode 100644
index b60966e042..0000000000
Binary files a/build/icons/imagesharp-logo-128.png and /dev/null differ
diff --git a/build/icons/imagesharp-logo-256.png b/build/icons/imagesharp-logo-256.png
deleted file mode 100644
index 075f498ba0..0000000000
Binary files a/build/icons/imagesharp-logo-256.png and /dev/null differ
diff --git a/build/icons/imagesharp-logo-32.png b/build/icons/imagesharp-logo-32.png
deleted file mode 100644
index 48e9ab718c..0000000000
Binary files a/build/icons/imagesharp-logo-32.png and /dev/null differ
diff --git a/build/icons/imagesharp-logo-512.png b/build/icons/imagesharp-logo-512.png
deleted file mode 100644
index 053dba951f..0000000000
Binary files a/build/icons/imagesharp-logo-512.png and /dev/null differ
diff --git a/build/icons/imagesharp-logo-64.png b/build/icons/imagesharp-logo-64.png
deleted file mode 100644
index 2d9a0045e4..0000000000
Binary files a/build/icons/imagesharp-logo-64.png and /dev/null differ
diff --git a/build/icons/imagesharp-logo.png b/build/icons/imagesharp-logo.png
deleted file mode 100644
index 053dba951f..0000000000
Binary files a/build/icons/imagesharp-logo.png and /dev/null differ
diff --git a/build/icons/imagesharp-logo.svg b/build/icons/imagesharp-logo.svg
deleted file mode 100644
index 620287457a..0000000000
--- a/build/icons/imagesharp-logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/ci-build.ps1 b/ci-build.ps1
new file mode 100644
index 0000000000..ad757dc9e2
--- /dev/null
+++ b/ci-build.ps1
@@ -0,0 +1,20 @@
+param(
+ [Parameter(Mandatory, Position = 0)]
+ [string]$version,
+ [Parameter(Mandatory = $false, Position = 1)]
+ [string]$targetFramework = 'ALL'
+)
+
+dotnet clean -c Release
+
+$repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY"
+if ($targetFramework -ne 'ALL') {
+
+ # Building for a specific framework.
+ dotnet build -c Release -f $targetFramework /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl
+}
+else {
+
+ # Building for packing and publishing.
+ dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl
+}
diff --git a/ci-test.ps1 b/ci-test.ps1
new file mode 100644
index 0000000000..fc368b22fb
--- /dev/null
+++ b/ci-test.ps1
@@ -0,0 +1,41 @@
+param(
+ [Parameter(Mandatory, Position = 0)]
+ [string]$os,
+ [Parameter(Mandatory, Position = 1)]
+ [string]$targetFramework,
+ [Parameter(Mandatory, Position = 2)]
+ [string]$platform,
+ [Parameter(Mandatory, Position = 3)]
+ [string]$codecov,
+ [Parameter(Position = 4)]
+ [string]$codecovProfile = 'Release'
+)
+
+$netFxRegex = '^net\d+'
+
+if ($codecov -eq 'true') {
+
+ # Allow toggling of profile to workaround any potential JIT errors caused by code injection.
+ dotnet clean -c $codecovProfile
+ dotnet test -c $codecovProfile -f $targetFramework /p:codecov=true
+}
+elseif ($platform -eq '-x86' -and $targetFramework -match $netFxRegex) {
+
+ # xunit doesn't run on core with NET SDK 3.1+.
+ # xunit doesn't actually understand -x64 as an option.
+ #
+ # xunit requires explicit path.
+ Set-Location $env:XUNIT_PATH
+
+ dotnet xunit --no-build -c Release -f $targetFramework ${fxVersion} $platform
+
+ Set-Location $PSScriptRoot
+}
+else {
+
+ dotnet test --no-build -c Release -f $targetFramework
+}
+
+# Explicitly exit with 0 to ignore errors caused by coverlet attempting to read
+# project files that dotnet test is set to ignore.
+exit 0
diff --git a/codecov.yml b/codecov.yml
deleted file mode 100644
index ae6dd5f6bf..0000000000
--- a/codecov.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-ignore:
- "src/ImageSharp/Common/Helpers/DebugGuard.cs"
-
-
\ No newline at end of file
diff --git a/run-tests.ps1 b/run-tests.ps1
deleted file mode 100644
index 4aeaa14908..0000000000
--- a/run-tests.ps1
+++ /dev/null
@@ -1,112 +0,0 @@
-param(
- [string]$targetFramework,
- [string]$is32Bit = "False"
-)
-
-if (!$targetFramework){
- Write-Host "run-tests.ps1 ERROR: targetFramework is undefined!"
- exit 1
-}
-
-function VerifyPath($path, $errorMessage) {
- if (!(Test-Path -Path $path)) {
- Write-Host "run-tests.ps1 $errorMessage `n $xunitRunnerPath"
- exit 1
- }
-}
-
-function CheckSubmoduleStatus() {
- $submoduleStatus = (git submodule status) | Out-String
- # if the result string is empty, the command failed to run (we didn't capture the error stream)
- if ($submoduleStatus) {
- # git has been called successfully, what about the status?
- if (($submoduleStatus -match "\-") -or ($submoduleStatus -match "\(\(null\)\)"))
- {
- # submodule has not been initialized!
- return 2;
- }
- elseif ($submoduleStatus -match "\+")
- {
- # submodule is not synced:
- return 1;
- }
- else {
- # everything fine:
- return 0;
- }
- } else {
- # git call failed, so we should warn
- return 3;
- }
-}
-
-
-if ( ($targetFramework -eq "netcoreapp2.1") -and ($env:CI -eq "True") -and ($is32Bit -ne "True")) {
- # We execute CodeCoverage.cmd only for one specific job on CI (netcoreapp2.1 + 64bit )
- $testRunnerCmd = ".\tests\CodeCoverage\CodeCoverage.cmd"
-}
-elseif ($targetFramework -eq "mono") {
- $testDllPath = "$PSScriptRoot\tests\ImageSharp.Tests\bin\Release\net462\SixLabors.ImageSharp.Tests.dll"
- VerifyPath($testDllPath, "test dll missing:")
-
- $xunitRunnerPath = "${env:HOMEPATH}\.nuget\packages\xunit.runner.console\2.3.1\tools\net452\"
-
- VerifyPath($xunitRunnerPath, "xunit console runner is missing on path:")
-
- cd "$xunitRunnerPath"
-
- if ($is32Bit -ne "True") {
- $monoPath = "${env:PROGRAMFILES}\Mono\bin\mono.exe"
- }
- else {
- $monoPath = "${env:ProgramFiles(x86)}\Mono\bin\mono.exe"
- }
-
- VerifyPath($monoPath, "mono runtime missing:")
-
- $testRunnerCmd = "& `"${monoPath}`" .\xunit.console.exe `"${testDllPath}`""
-}
-else {
- cd .\tests\ImageSharp.Tests
- $xunitArgs = "-nobuild -c Release -framework $targetFramework"
-
- if ($targetFramework -eq "netcoreapp2.1") {
- # There were issues matching the correct installed runtime if we do not specify it explicitly:
- $xunitArgs += " --fx-version 2.1.0"
- }
-
- if ($is32Bit -eq "True") {
- $xunitArgs += " -x86"
- }
-
- $testRunnerCmd = "dotnet xunit $xunitArgs"
-}
-
-Write-Host "running:"
-Write-Host $testRunnerCmd
-Write-Host "..."
-
-Invoke-Expression $testRunnerCmd
-
-cd $PSScriptRoot
-
-$exitCodeOfTests = $LASTEXITCODE;
-
-if (0 -ne ([int]$exitCodeOfTests)) {
- # check submodule status
- $submoduleStatus = CheckSubmoduleStatus
- if ([int]$submoduleStatus -eq 1) {
- # not synced
- Write-Host -ForegroundColor Yellow "Check if submodules are up to date. You can use 'git submodule update' to fix this";
- } elseif ($submoduleStatus -eq 2) {
- # not initialized
- Write-Host -ForegroundColor Yellow "Check if submodules are initialized. You can run 'git submodule init' to initialize them."
- } elseif ($submoduleStatus -eq 3) {
- # git not found, maybe submodules not synced?
- Write-Host -ForegroundColor Yellow "Could not check if submodules are initialized correctly. Maybe git is not installed?"
- } else {
- #Write-Host "Submodules are up to date";
- }
-}
-
-exit $exitCodeOfTests
diff --git a/shared-infrastructure b/shared-infrastructure
index c2e689abe9..36b2d55f5b 160000
--- a/shared-infrastructure
+++ b/shared-infrastructure
@@ -1 +1 @@
-Subproject commit c2e689abe9227209e6d5bc4bf56255d92b4a5d62
+Subproject commit 36b2d55f5bb0d91024955bd26ba220ee41cc96e5
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 6fbbb7c916..5e3f9b0618 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -22,11 +22,14 @@
true
-
-
-
+
+ true
+
+
+
+
@@ -34,8 +37,4 @@
-
-
-
-
diff --git a/src/ImageSharp/Advanced/AotCompilerTools.cs b/src/ImageSharp/Advanced/AotCompilerTools.cs
index 60c1f4178a..bb4ddb7d0c 100644
--- a/src/ImageSharp/Advanced/AotCompilerTools.cs
+++ b/src/ImageSharp/Advanced/AotCompilerTools.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats;
@@ -19,6 +20,7 @@ namespace SixLabors.ImageSharp.Advanced
/// None of the methods in this class should ever be called, the code only has to exist at compile-time to be picked up by the AoT compiler.
/// (Very similar to the LinkerIncludes.cs technique used in Xamarin.Android projects.)
///
+ [ExcludeFromCodeCoverage]
internal static class AotCompilerTools
{
static AotCompilerTools()
diff --git a/src/ImageSharp/Common/Helpers/TestHelpers.cs b/src/ImageSharp/Common/Helpers/TestHelpers.cs
index d330233c4c..c6574e4b58 100644
--- a/src/ImageSharp/Common/Helpers/TestHelpers.cs
+++ b/src/ImageSharp/Common/Helpers/TestHelpers.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Six Labors and contributors.
+// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Common.Helpers
@@ -13,14 +13,18 @@ internal static class TestHelpers
/// Only intended to be used in tests!
///
internal const string ImageSharpBuiltAgainst =
-#if NET472
- "netfx4.7.2";
+#if NETCOREAPP3_1
+ "netcoreapp3.1";
#elif NETCOREAPP2_1
"netcoreapp2.1";
+#elif NETSTANDARD2_1
+ "netstandard2.1";
+#elif NETSTANDARD2_0
+ "netstandard2.0";
#elif NETSTANDARD1_3
"netstandard1.3";
#else
- "netstandard2.0";
+ "net472";
#endif
}
-}
\ No newline at end of file
+}
diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj
index d86da5dcdf..a6beac7258 100644
--- a/src/ImageSharp/ImageSharp.csproj
+++ b/src/ImageSharp/ImageSharp.csproj
@@ -10,7 +10,7 @@
$(packageversion)
0.0.1
- netcoreapp2.1;netstandard2.0;netstandard1.3;net472
+ netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472
true
true
@@ -19,10 +19,6 @@
SixLabors.ImageSharp
-
-
-
-
True
@@ -116,10 +112,6 @@
-
-
-
-
TextTemplatingFileGenerator
@@ -196,7 +188,6 @@
-
@@ -212,4 +203,6 @@
+
+
diff --git a/tests/CodeCoverage/CodeCoverage.cmd b/tests/CodeCoverage/CodeCoverage.cmd
deleted file mode 100644
index 01e342b3d2..0000000000
--- a/tests/CodeCoverage/CodeCoverage.cmd
+++ /dev/null
@@ -1,21 +0,0 @@
-@echo off
-
-
-cd tests\CodeCoverage
-
-nuget restore packages.config -PackagesDirectory .
-
-cd ..
-cd ..
-
-dotnet restore ImageSharp.sln
-rem Clean the solution to force a rebuild with /p:codecov=true
-dotnet clean ImageSharp.sln -c Release
-rem The -threshold options prevents this taking ages...
-tests\CodeCoverage\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test tests\ImageSharp.Tests\ImageSharp.Tests.csproj -c Release -f netcoreapp2.1 /p:codecov=true" -register:user -threshold:10 -oldStyle -safemode:off -output:.\ImageSharp.Coverage.xml -hideskipped:All -returntargetcode -filter:"+[SixLabors.ImageSharp*]*"
-
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%
-pip install codecov
-codecov -f "ImageSharp.Coverage.xml"
\ No newline at end of file
diff --git a/tests/CodeCoverage/packages.config b/tests/CodeCoverage/packages.config
deleted file mode 100644
index 973b7f81b4..0000000000
--- a/tests/CodeCoverage/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
index 97bd9b6e7c..22c634d9b2 100644
--- a/tests/Directory.Build.props
+++ b/tests/Directory.Build.props
@@ -13,10 +13,13 @@
$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.props
tests
+ false
- CS0618;$(NoWarn)
+ $(MSBuildThisFileDirectory)..\shared-infrastructure\SixLabors.Tests.ruleset
+
+ $(NoWarn);CS0618
@@ -25,6 +28,12 @@
+
+
+
+
+
+
diff --git a/tests/Directory.Build.targets b/tests/Directory.Build.targets
index f8a4936e23..26baee07e3 100644
--- a/tests/Directory.Build.targets
+++ b/tests/Directory.Build.targets
@@ -16,4 +16,40 @@
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ opencover
+
+ $(MSBuildThisFileDirectory)..\coverage.xml
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/ImageSharp.Benchmarks/Config.cs b/tests/ImageSharp.Benchmarks/Config.cs
index 018a2e02bf..cb4fcbba18 100644
--- a/tests/ImageSharp.Benchmarks/Config.cs
+++ b/tests/ImageSharp.Benchmarks/Config.cs
@@ -21,6 +21,7 @@ public ShortClr()
{
this.Add(
Job.Default.With(ClrRuntime.Net472).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3),
+ Job.Default.With(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3),
Job.Default.With(CoreRuntime.Core21).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(3)
);
}
diff --git a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj
index a714d1f0d7..60b1fde8e0 100644
--- a/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj
+++ b/tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj
@@ -5,9 +5,10 @@
ImageSharp.Benchmarks
Exe
SixLabors.ImageSharp.Benchmarks
- netcoreapp2.1;net472
- false
+ netcoreapp3.1;netcoreapp2.1;net472
false
+
+ false
@@ -20,12 +21,7 @@
-
-
-
-
-
diff --git a/tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj b/tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj
index fc764b53b1..e89b28dc11 100644
--- a/tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj
+++ b/tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj
@@ -1,4 +1,4 @@
-
+
@@ -8,7 +8,10 @@
false
SixLabors.ImageSharp.Sandbox46
win7-x64
- net472
+ netcoreapp3.1;netcoreapp2.1;net472
+ SixLabors.ImageSharp.Sandbox46.Program
+
+ false
@@ -18,10 +21,7 @@
-
-
-
-
+
diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
index d3e675b907..6aaa0c80ce 100644
--- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
@@ -181,6 +181,12 @@ public void WorksWithAllCompressionLevels(TestImageProvider prov
public void WorksWithAllBitDepths(TestImageProvider provider, PngColorType pngColorType, PngBitDepth pngBitDepth)
where TPixel : struct, IPixel
{
+ // TODO: Investigate WuQuantizer to see if we can reduce memory pressure.
+ if (TestEnvironment.RunsOnCI && !TestEnvironment.Is64BitProcess)
+ {
+ return;
+ }
+
foreach (PngInterlaceMode interlaceMode in InterlaceMode)
{
TestPngEncoderCore(
@@ -200,6 +206,12 @@ public void WorksWithAllBitDepths(TestImageProvider provider, Pn
public void PaletteColorType_WuQuantizer(TestImageProvider provider, int paletteSize)
where TPixel : struct, IPixel
{
+ // TODO: Investigate WuQuantizer to see if we can reduce memory pressure.
+ if (TestEnvironment.RunsOnCI && !TestEnvironment.Is64BitProcess)
+ {
+ return;
+ }
+
foreach (PngInterlaceMode interlaceMode in InterlaceMode)
{
TestPngEncoderCore(
diff --git a/tests/ImageSharp.Tests/Image/ImageTests.WrapMemory.cs b/tests/ImageSharp.Tests/Image/ImageTests.WrapMemory.cs
index 63c2e57c8c..04d05f6dc7 100644
--- a/tests/ImageSharp.Tests/Image/ImageTests.WrapMemory.cs
+++ b/tests/ImageSharp.Tests/Image/ImageTests.WrapMemory.cs
@@ -172,7 +172,7 @@ public void WrapSystemDrawingBitmap_WhenOwned()
}
private static bool ShouldSkipBitmapTest =>
- !TestEnvironment.Is64BitProcess || TestHelpers.ImageSharpBuiltAgainst != "netcoreapp2.1";
+ !TestEnvironment.Is64BitProcess || (TestHelpers.ImageSharpBuiltAgainst != "netcoreapp3.1" && TestHelpers.ImageSharpBuiltAgainst != "netcoreapp2.1");
}
}
}
diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
index 28867ddc20..41e6749be6 100644
--- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
+++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
@@ -1,12 +1,9 @@
-
+
- netcoreapp2.1;net462;net472
+ netcoreapp3.1;netcoreapp2.1;net472
True
- latest
- full
- portable
True
SixLabors.ImageSharp.Tests
AnyCPU;x64;x86
@@ -14,14 +11,13 @@
-
-
-
-
+
-
+
+
+
@@ -36,9 +32,5 @@
-
-
-
-
diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.v3.ncrunchproject b/tests/ImageSharp.Tests/ImageSharp.Tests.v3.ncrunchproject
deleted file mode 100644
index f015b4b86e..0000000000
--- a/tests/ImageSharp.Tests/ImageSharp.Tests.v3.ncrunchproject
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- False
- UseStaticAnalysis
-
- False
- False
-
-
\ No newline at end of file
diff --git a/tests/ImageSharp.Tests/RunExtendedTests.cmd b/tests/ImageSharp.Tests/RunExtendedTests.cmd
deleted file mode 100644
index c2f4b9f537..0000000000
--- a/tests/ImageSharp.Tests/RunExtendedTests.cmd
+++ /dev/null
@@ -1,9 +0,0 @@
-dotnet build -c Release
-dotnet xunit -nobuild -c Release -f net462
-dotnet xunit -nobuild -c Release -f net462 -x86
-dotnet xunit -nobuild -c Release -f net47
-dotnet xunit -nobuild -c Release -f net47 -x86
-dotnet xunit -nobuild -c Release -f net471
-dotnet xunit -nobuild -c Release -f net471 -x86
-dotnet xunit -nobuild -c Release -f net472
-dotnet xunit -nobuild -c Release -f net472 -x86
diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs
index 567a1b0302..07523f6178 100644
--- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs
+++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs
@@ -33,29 +33,6 @@ private void CheckPath(string path)
Assert.True(Directory.Exists(path));
}
- /////
- ///// We need this test to make sure that the netcoreapp2.1 test execution actually covers the netcoreapp2.1 build configuration of ImageSharp.
- /////
- //[Fact]
- //public void ImageSharpAssemblyUnderTest_MatchesExpectedTargetFramework()
- //{
- // this.Output.WriteLine("NetCoreVersion: " + TestEnvironment.NetCoreVersion);
- // this.Output.WriteLine("ImageSharpBuiltAgainst: " + TestHelpers.ImageSharpBuiltAgainst);
-
- // if (string.IsNullOrEmpty(TestEnvironment.NetCoreVersion))
- // {
- // this.Output.WriteLine("Not running under .NET Core!");
- // }
- // else if (TestEnvironment.NetCoreVersion.StartsWith("2.1"))
- // {
- // Assert.Equal("netcoreapp2.1", TestHelpers.ImageSharpBuiltAgainst);
- // }
- // else
- // {
- // Assert.Equal("netstandard2.0", TestHelpers.ImageSharpBuiltAgainst);
- // }
- //}
-
[Fact]
public void SolutionDirectoryFullPath()
{