Skip to content

Modernize everything #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 0 additions & 15 deletions .circleci/config.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = crlf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.cs]
indent_size = 4

[*.{csproj,xml,json}]
indent_size = 2
19 changes: 6 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: coverlet.msbuild
versions:
- 3.0.2
- dependency-name: Microsoft.NET.Test.Sdk
versions:
- 16.8.3
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
118 changes: 118 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: CI
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Build and test
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup dotnet 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"

- name: Setup dotnet 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Setup dotnet 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore

- name: Test .NET Framework 4.8
run: dotnet test -c Release -f net48 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]*

- name: Test .NET Core 3.1
run: dotnet test -c Release -f netcoreapp3.1 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]*

- name: Test .NET 5
run: dotnet test -c Release -f net5 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]*

- name: Test .NET 6
run: dotnet test -c Release -f net6 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]*

- name: Upload code coverage
uses: codecov/codecov-action@v2
with:
files: ./test/BinaryEncoding.Tests/coverage.net48.opencover.xml,./test/BinaryEncoding.Tests/coverage.netcoreapp31.opencover.xml,./test/BinaryEncoding.Tests/coverage.net5.opencover.xml,./test/BinaryEncoding.Tests/coverage.net6.opencover.xml
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

calc-version:
name: Calculate version
runs-on: ubuntu-latest
needs:
- build
outputs:
version: ${{ steps.nbgv.outputs.SemVer2 }}
prerelease: ${{ github.base_ref != 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: dotnet/nbgv@master
id: nbgv

publish:
name: Pack and Publish
runs-on: ubuntu-latest
needs:
- calc-version
steps:
- name: Version Output Check
run: |
echo "${{ needs.calc-version.outputs.version }} - ${{ needs.calc-version.outputs.prerelease }}"

# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0

# - name: Setup dotnet 6.0
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: "6.0.x"

# - name: Build and Publish to NuGet
# uses: drusellers/publish-nuget@master
# with:
# project-file-path: src/BinaryEncoding/BinaryEncoding.csproj
# version: ${{ needs.calc-version.outputs.version }}
# tag-commit: true
# tag-format: v*
# nuget-key: ${{secrets.NUGET_API_KEY}}
# include-symbols: true

# - name: Create release
# uses: "marvinpinto/action-automatic-releases@v1.2.1"
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# prerelease: ${{ needs.calc-version.outputs.prerelease }}
# files: |
# *.nupkg
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

23 changes: 14 additions & 9 deletions BinaryEncoding.sln
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
# Visual Studio Version 17
VisualStudioVersion = 17.0.31808.319
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B40D7F8C-AC59-4C28-954C-B73B01771D66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryEncoding", "src\BinaryEncoding\BinaryEncoding.csproj", "{4FE3B85C-8F9B-489F-9AF2-5928842540E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{863CE3AB-B945-45DD-B9F4-CED015E4FBC7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryEncoding.Tests", "test\BinaryEncoding.Tests\BinaryEncoding.Tests.csproj", "{571EF7FA-9AC3-4059-884C-CEAFE9B2279A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AE44A53-6DC2-4F0A-88CC-F80220044559}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
LICENSE = LICENSE
NuGet.config = NuGet.config
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -49,8 +55,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4FE3B85C-8F9B-489F-9AF2-5928842540E8} = {B40D7F8C-AC59-4C28-954C-B73B01771D66}
{571EF7FA-9AC3-4059-884C-CEAFE9B2279A} = {863CE3AB-B945-45DD-B9F4-CED015E4FBC7}
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F4BD0191-ED63-49B2-A956-FE3111D5E1AA}
EndGlobalSection
EndGlobal
29 changes: 4 additions & 25 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<PropertyGroup>
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>

<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>

<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net472'">$(BaseFrameworkPathOverrideForMono)/4.7.2-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>

<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition=" '$(BaseFrameworkPathOverrideForMono)' != '' ">{RawFileName};{CandidateAssemblyFiles};{HintPathFromItem};$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
<AssemblySearchPaths Condition=" $(TargetFramework.StartsWith('net45')) and '$(BaseFrameworkPathOverrideForMono)' != '' ">$(BaseFrameworkPathOverrideForMono)/4.5;$(BaseFrameworkPathOverrideForMono)/4.5/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
95 changes: 0 additions & 95 deletions appveyor.yml

This file was deleted.

Loading