diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index db142c9e9f..cf97ccdea0 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -32,12 +32,12 @@ jobs:
# runtime: -x86
# codecov: false
- runs-on: ${{ matrix.options.os }}
+ runs-on: ${{matrix.options.os}}
steps:
- uses: actions/checkout@v2
- - name: Install nuget
+ - name: Install NuGet
uses: NuGet/setup-nuget@v1
- name: Setup Git
@@ -47,7 +47,7 @@ jobs:
git fetch --prune --unshallow
git submodule -q update --init --recursive
- - name: Fetch tags for GitVersion
+ - name: Fetch Tags for GitVersion
run: |
git fetch --tags
@@ -63,50 +63,14 @@ jobs:
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/execute-gitversion@v0.3
- - run: |
- echo "Major: ${{ steps.gitversion.outputs.major }}"
- echo "Minor: ${{ steps.gitversion.outputs.minor }}"
- echo "Patch: ${{ steps.gitversion.outputs.patch }}"
- echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}"
- echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}"
- echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}"
- echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}"
- echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}"
- echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}"
- echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}"
- echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}"
- echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
- echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
- echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}"
- echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}"
- echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
- echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
- echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
- echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
- echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
- echo "Sha: ${{ steps.gitversion.outputs.sha }}"
- echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
- echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
- echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
- echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}"
- echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}"
- echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}"
- echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
- echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
- echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
- name: Build
- run: dotnet build -c Release -f "${{matrix.options.framework}}" /p:packageversion="${{ steps.gitversion.outputs.nuGetVersion }}"
-
- # - name: Build
- # shell: pwsh
- # run: |
- # $DebugPreference = "Continue"
- # ./build.ps1 "${{matrix.options.framework}}"
+ shell: pwsh
+ run: ./ci-build.ps1 "${{steps.gitversion.outputs.nuGetVersion}}" "${{matrix.options.framework}}"
- name: Test
shell: pwsh
- run: ./test.ps1 "${{ matrix.options.os }}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}"
+ run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}"
env:
XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit
@@ -117,24 +81,14 @@ jobs:
token: ${{secrets.CODECOV_TOKEN}}
file: "coverage.${{matrix.options.framework}}.xml"
flags: unittests
- # Publish:
- # runs-on: windows-latest
- # needs: [Build]
- # if: github.event_name == 'push'
- # steps:
- # - uses: actions/checkout@v1
- # - name: install nuget
- # uses: NuGet/setup-nuget@v1
- # - name: Enable long file paths
- # run: git config --global core.longpaths true
- # - name: Update submodules
- # run: git submodule -q update --init --recursive
- # - name: Build
- # shell: pwsh
- # run: |
- # $DebugPreference = "Continue"
- # ./build.ps1
- # - name: Publish to nightly feed -myget
- # if: success()
- # 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
+
+ - name: Pack
+ if: matrix.options.codecov == true # We can use this filter as we know it happens only once and takes the most ime to complete.
+ 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/.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/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/ImageSharp.sln b/ImageSharp.sln
index eb6c617d09..9c627791e9 100644
--- a/ImageSharp.sln
+++ b/ImageSharp.sln
@@ -3,24 +3,20 @@ 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
+ GitVersion.yml = GitVersion.yml
ImageSharp.sln.DotSettings = ImageSharp.sln.DotSettings
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}"
diff --git a/README.md b/README.md
index ba897fa7ef..c0bc345737 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?
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 87137da2f3..0000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,67 +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.ps1 b/build.ps1
deleted file mode 100644
index fd7ac61908..0000000000
--- a/build.ps1
+++ /dev/null
@@ -1,150 +0,0 @@
-param(
- [string]$targetFramework = 'ALL'
-)
-
-# Lets calculate the correct version here
-$fallbackVersion = "1.0.0";
-$version = ''
-
-$tagRegex = '^v?(\d+\.\d+\.\d+)(?:-([a-zA-Z]+)\.?(\d*))?$'
-
-function ToBuildNumber {
- param( $date )
-
- if ("$date" -eq "") {
- $date = [System.DateTime]::Now
- }
-
- if ($date.GetType().fullname -ne 'System.DateTime') {
- $date = [System.DateTime]::Parse($date)
- }
-
- return $date.ToString("yyyyMMddhhmmss")
-}
-
-# We are running on the build server
-$isVersionTag = "$env:GITHUB_REF".replace("refs/tags/", "") -match $tagRegex
-
-if ($isVersionTag) {
- Write-Debug "Github tagged build"
-}
-
-if ($isVersionTag -eq $false) {
- if ( "$(git diff --stat)" -eq '') {
- Write-Debug "Clean repo"
- if ("$(git tag --list)" -ne "") {
- Write-Debug "Has tags"
- $tagData = (git describe --tags HEAD)
- $isVersionTag = $tagData -match $tagRegex
- Write-Debug $tagData
- }
- }
- else {
- Write-Debug "Dirty repo"
- }
-}
-
-if ($isVersionTag) {
-
- Write-Debug "Building commit tagged with a compatable version number"
-
- $version = $matches[1]
- $postTag = $matches[2]
- $count = $matches[3]
-
- 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().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}'"
- }
-
- # Create a build number based on the current datetime.
- $buildNumber = ""
-
- if ( "$env:GITHUB_SHA" -ne '') {
- $buildNumber = ToBuildNumber (git show -s --format=%ci $env:GITHUB_SHA)
- }
- elseif ( "$(git diff --stat)" -eq '') {
- $buildNumber = ToBuildNumber (git show -s --format=%ci HEAD)
- }
- else {
- $buildNumber = ToBuildNumber
- }
-
- $buildNumber = "$buildNumber".Trim().PadLeft(12, "0");
-
- Write-Debug "Building a branch commit"
-
- # This is a general branch commit
- $branch = ((git rev-parse --abbrev-ref HEAD) | Out-String).Trim()
-
- if ("$branch" -eq "") {
- $branch = "unknown"
- }
-
- $branch = $branch.Replace("/", "-").ToLower()
-
- if ($branch.ToLower() -eq "master" -or $branch.ToLower() -eq "head") {
- $branch = "dev"
- }
-
- $version = "${version}-${branch}${buildNumber}";
-}
-
-Write-Host "Building version '${version}'"
-
-if ($targetFramework -ne 'ALL') {
- $targetFramework = "-f $targetFramework"
-}
-
-# dotnet restore $targetFramework /p:packageversion=$version /p:DisableImplicitNuGetFallbackFolder=true
-
-$repositoryUrl = ""
-
-if ("$env:GITHUB_REPOSITORY" -ne "") {
- $repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY"
-}
-
-Write-Host "Building projects"
-
-dotnet build -c Release ${$targetFramework} /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl
-
-if ($LASTEXITCODE ) { Exit $LASTEXITCODE }
-
-# Write-Host "Packaging projects"
-
-# dotnet pack -c Release --output "$PSScriptRoot/artifacts" --no-build /p:packageversion=$version /p:skipFullFramework=$skipFullFramework /p:RepositoryUrl=$repositoryUrl
-# if ($LASTEXITCODE ) { Exit $LASTEXITCODE }
diff --git a/ci-build.ps1 b/ci-build.ps1
new file mode 100644
index 0000000000..934b471d1e
--- /dev/null
+++ b/ci-build.ps1
@@ -0,0 +1,19 @@
+param(
+ [Parameter(Mandatory, Position = 0)]
+ [string]$version,
+ [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/test.ps1 b/ci-test.ps1
similarity index 100%
rename from test.ps1
rename to ci-test.ps1
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/tests/CodeCoverage/CodeCoverage.cmd b/tests/CodeCoverage/CodeCoverage.cmd
deleted file mode 100644
index 9b14c163c7..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.7.922\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"
diff --git a/tests/CodeCoverage/CodeCoverage.ps1 b/tests/CodeCoverage/CodeCoverage.ps1
deleted file mode 100644
index b7073998f9..0000000000
--- a/tests/CodeCoverage/CodeCoverage.ps1
+++ /dev/null
@@ -1,11 +0,0 @@
-
-if((Test-Path("$PSScriptRoot\OpenCover.4.6.519")) -eq $false){
- Invoke-WebRequest https://www.nuget.org/api/v2/package/OpenCover/4.7.922 -OutFile "$PSScriptRoot\opencover.zip"
- [IO.Compression.Zipfile]::ExtractToDirectory("$PSScriptRoot\opencover.zip","$PSScriptRoot\OpenCover.4.6.519")
-}
-
-dotnet clean ImageSharp.sln -c Release
-
-& "$PSScriptRoot\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:skipFullFramework=true /p:codecov=true" -register:user -threshold:10 -oldStyle -safemode:off -output:.\ImageSharp.Coverage.xml -hideskipped:All -returntargetcode -filter:"+[SixLabors.ImageSharp*]*"
-
-if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
\ 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