Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3d1d7f8
enable using github actions for building
tocsoft Nov 17, 2019
6e2ba68
stop appveyor publishing pacakges
tocsoft Dec 11, 2019
6a234af
Merge branch 'master' into sw/github-actions
tocsoft Dec 12, 2019
af7077a
Merge branch 'master' into sw/github-actions
JimBobSquarePants Jan 9, 2020
991d6cb
Merge remote-tracking branch 'remotes/origin/master' into sw/github-a…
tocsoft Jan 12, 2020
a1df496
Merge branch 'sw/github-actions' of https://github.com/SixLabors/Imag…
JimBobSquarePants Jan 14, 2020
cb0597a
Merge branch 'master' into sw/github-actions
JimBobSquarePants Jan 14, 2020
b12dd69
Use dotnet test
JimBobSquarePants Jan 15, 2020
9fdc4ea
Update build-and-test.yml
JimBobSquarePants Jan 15, 2020
a1d2e6f
Remove old xunit reference
JimBobSquarePants Jan 15, 2020
fc6ac75
Debug framework skipping
JimBobSquarePants Jan 15, 2020
df66a98
Skip linux for testing
JimBobSquarePants Jan 15, 2020
60ab03b
Update build-and-test.yml
JimBobSquarePants Jan 15, 2020
92e5d5c
Use pwsh for scripts
JimBobSquarePants Jan 15, 2020
44733d3
Fix options naming
JimBobSquarePants Jan 15, 2020
69f3d18
Fix booleans?
JimBobSquarePants Jan 15, 2020
3337d2d
Conditionals are hard.
JimBobSquarePants Jan 15, 2020
3755f88
Update build-and-test.yml
JimBobSquarePants Jan 15, 2020
c7fdf1a
Fix missing quote
JimBobSquarePants Jan 15, 2020
e2f090a
Update build-and-test.yml
JimBobSquarePants Jan 15, 2020
abde989
Fix tests
JimBobSquarePants Jan 15, 2020
f7e62ad
Combine xunit and test for converage
JimBobSquarePants Jan 15, 2020
22661f0
dotnet restore is implicit in core sdk 2+
JimBobSquarePants Jan 15, 2020
f2162a7
Update build.ps1
JimBobSquarePants Jan 15, 2020
30dc32a
Try passing variable as bool
JimBobSquarePants Jan 15, 2020
932673d
Update test.ps1
JimBobSquarePants Jan 15, 2020
b343092
Use strings
JimBobSquarePants Jan 15, 2020
d8610f4
Update test.ps1
JimBobSquarePants Jan 15, 2020
fa05119
Update PngEncoderTests.cs
JimBobSquarePants Jan 15, 2020
194e9ab
Fix codecov condition
JimBobSquarePants Jan 15, 2020
15244d3
Use targets. Coverage should now upload
JimBobSquarePants Jan 15, 2020
2bf586a
Enable ubuntu
JimBobSquarePants Jan 15, 2020
3f8fa7c
Add targeting pack for linux
JimBobSquarePants Jan 15, 2020
3c6bad3
Use dotnet test on linux
JimBobSquarePants Jan 15, 2020
6dad4b5
GitVersion experiment
JimBobSquarePants Jan 16, 2020
b3a71a7
Update build-and-test.yml
JimBobSquarePants Jan 16, 2020
76f27dd
Delete gitversion.yml
JimBobSquarePants Jan 16, 2020
6a40693
Create GitVersion.yml
JimBobSquarePants Jan 16, 2020
afbc1cb
Cleanup
JimBobSquarePants Jan 16, 2020
c6f282c
Update ci-build.ps1
JimBobSquarePants Jan 16, 2020
a9576ef
Cleanup solution
JimBobSquarePants Jan 16, 2020
9dc422d
Add new target frameworks
JimBobSquarePants Jan 16, 2020
c957caa
Add netcore 3.1 SDK action
JimBobSquarePants Jan 16, 2020
ec847de
Revert "Add netcore 3.1 SDK action"
JimBobSquarePants Jan 16, 2020
ce124ac
Add 3.1.101 SDK
JimBobSquarePants Jan 16, 2020
d7338e8
Update Directory.Build.props
JimBobSquarePants Jan 16, 2020
99434bf
Test xunit pipeline
JimBobSquarePants Jan 16, 2020
5021507
Move nuget fix
JimBobSquarePants Jan 16, 2020
0e0ed60
Enable linux
JimBobSquarePants Jan 16, 2020
c41a4c4
Try using bash
JimBobSquarePants Jan 16, 2020
a639460
Test all frameworks
JimBobSquarePants Jan 16, 2020
a8425dd
Only use the xunit runner when we really have to.
JimBobSquarePants Jan 16, 2020
5f06fb9
Restore CI variable and skip troublesome tests
JimBobSquarePants Jan 16, 2020
45bc1bc
Delete bak file and undo bad gitignore changes
JimBobSquarePants Jan 16, 2020
21ad572
Speed up coverage and respond to comments
JimBobSquarePants Jan 17, 2020
1d4887f
Update ci-test.ps1
JimBobSquarePants Jan 17, 2020
3a64f92
Fix netstandard 1.3 build
JimBobSquarePants Jan 17, 2020
2e8f50d
Temporarily disable Stylecop in tests
JimBobSquarePants Jan 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

@antonfirsov antonfirsov Jan 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth to also test x86 + 3.1 because of the floating point magic we do.

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/[email protected]
with:
versionSpec: "5.1.x"

- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/[email protected]

- 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/[email protected]
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .vscode/launch.json

This file was deleted.

31 changes: 0 additions & 31 deletions .vscode/tasks.json

This file was deleted.

22 changes: 0 additions & 22 deletions CodeCoverage.runsettings

This file was deleted.

67 changes: 33 additions & 34 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup>
<BaseArtifactsPath>$(MSBuildThisFileDirectory)artifacts/</BaseArtifactsPath>
<BaseArtifactsPathSuffix>$(ImageSharpProjectCategory)/$(MSBuildProjectName)</BaseArtifactsPathSuffix>
<RepositoryUrl>https://github.com/SixLabors/ImageSharp/</RepositoryUrl>
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/SixLabors/ImageSharp/</RepositoryUrl>
</PropertyGroup>

<!-- Default settings that explicitly differ from the Sdk.props defaults -->
Expand All @@ -31,43 +31,36 @@

<!--
https://apisof.net/
+===================+================+===================+==============================+======================+==========================+
| Target Framework | SUPPORTS_MATHF | SUPPORTS_HASHCODE | SUPPORTS_EXTENDED_INTRINSICS | SUPPORTS_SPAN_STREAM | SUPPORTS_ENCODING_STRING |
+===================+================+===================+==============================+======================+==========================+
| netcoreapp3.1 | Y | Y | Y | Y | Y |
| netcoreapp2.1 | Y | Y | Y | Y | Y |
| netcoreapp2.0 | Y | N | N | N | N |
| netstandard2.1 | Y | N | N | Y | Y |
| netstandard2.0 | N | N | N | N | N |
| netstandard1.3 | N | N | N | N | N |
| net472 | N | N | Y | N | N |
+===================+================+===================+==============================+======================+==========================+
+===================+=======+==========+=====================+=============+=================+====================+==============+
| SUPPORTS | MATHF | HASHCODE | EXTENDED_INTRINSICS | SPAN_STREAM | ENCODING_STRING | RUNTIME_INTRINSICS | CODECOVERAGE |
+===================+=======+==========+=====================+=============+=================+====================+==============+
| netcoreapp3.1 | Y | Y | Y | Y | Y | Y | Y |
| netcoreapp2.1 | Y | Y | Y | Y | Y | N | Y |
| netcoreapp2.0 | Y | N | N | N | N | N | Y |
| netstandard2.1 | Y | Y | N | Y | Y | N | Y |
| netstandard2.0 | N | N | N | N | N | N | Y |
| netstandard1.3 | N | N | N | N | N | N | N |
| net472 | N | N | Y | N | N | N | Y |
+===================+=======+==========+=====================+=============+=================+====================+==============+
-->

<!-- TODO: Include additional targets to TargetFrameworks -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING;SUPPORTS_RUNTIME_INTRINSICS;SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING;SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<DefineConstants>$(DefineConstants);SUPPORTS_MATHF;SUPPORTS_HASHCODE;SUPPORTS_SPAN_STREAM;SUPPORTS_ENCODING_STRING;SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472'">
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<!--TODO: Check what this is testing for and why does it fail?-->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
<DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS;SUPPORTS_CODECOVERAGE</DefineConstants>
</PropertyGroup>

<!-- Default settings that explicitly differ from the Sdk.targets defaults-->
Expand All @@ -88,10 +81,10 @@
<Copyright>Copyright © Six Labors and Contributors</Copyright>
<Features>strict;IOperation</Features>
<HighEntropyVA>true</HighEntropyVA>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
<NeutralLanguage>en</NeutralLanguage>
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
<PackageIconUrl>https://raw.githubusercontent.com/SixLabors/Branding/master/icons/imagesharp/sixlabors.imagesharp.128.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
Expand All @@ -105,9 +98,15 @@
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>

<!-- Package references which are consumed by all projects -->
<!-- Package references and additional files which are consumed by all projects -->
<ItemGroup>
<PackageReference Include="Microsoft.Net.Compilers.Toolset" IsImplicitlyDefined="true" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" IsImplicitlyDefined="true" />
<!--TODO: Enable this once tests Stylecop issues are fixed-->
<!--<PackageReference Include="StyleCop.Analyzers" IsImplicitlyDefined="true" />-->
<AdditionalFiles Include="$(MSBuildThisFileDirectory)shared-infrastructure\stylecop.json" />
<!--NuGet package icon source-->
<None Include="$(MSBuildThisFileDirectory)shared-infrastructure\branding\icons\imagesharp\sixlabors.imagesharp.128.png" Pack="true" PackagePath="\icon.png" />
</ItemGroup>

</Project>
Loading