Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl committed Dec 26, 2020
2 parents 9d48cfb + 7417e55 commit 486700e
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 52 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to **Dangl.Calculator** are documented here.

## v1.2.1:
- Add `net40` as target framework
- Drop tests for `netcoreapp2.2` and add tests for `netcoreapp3.1`

## v1.2.0
- The generated assemblies now have a strong name. This is a breaking change of the binary API and will require recompilation on all systems that consume this package. The strong name of the generated assembly allows compatibility with other, signed tools. Please note that this does not increase security or provide tamper-proof binaries, as the key is available in the source code per [Microsoft guidelines](https://msdn.microsoft.com/en-us/library/wd40t7ad(v=vs.110).aspx)

Expand Down
36 changes: 14 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
pipeline {
options {
disableConcurrentBuilds()
}
agent {
node {
label 'master'
Expand Down Expand Up @@ -43,28 +46,16 @@ pipeline {
}
post {
always {
warnings(
canComputeNew: false,
canResolveRelativePaths: false,
categoriesPattern: '',
consoleParsers: [[parserName: 'MSBuild']],
defaultEncoding: '',
excludePattern: '',
healthy: '',
includePattern: '',
messagesPattern: '',
unHealthy: '')
openTasks(
canComputeNew: false,
defaultEncoding: '',
excludePattern: '',
healthy: '',
high: 'HACK, FIXME',
ignoreCase: true,
low: '',
normal: 'TODO',
pattern: '**/*.cs, **/*.g4, **/*.ts, **/*.js',
unHealthy: '')
recordIssues(
tools: [
msBuild(),
taskScanner(
excludePattern: '**/*node_modules/**/*',
highTags: 'HACK, FIXME',
ignoreCase: true,
includePattern: '**/*.cs, **/*.g4, **/*.ts, **/*.js',
normalTags: 'TODO')
])
xunit(
testTimeMargin: '3000',
thresholdMode: 1,
Expand Down Expand Up @@ -107,6 +98,7 @@ pipeline {
notifyEveryUnstableBuild: true,
recipients: "[email protected]",
sendToIndividuals: true])
cleanWs()
}
}
}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dangl.Calculator

[![Build Status](https://jenkins.dangl.me/buildStatus/icon?job=Dangl.Calculator/dev)](https://jenkins.dangl.me/job/Dangl.Calculator/job/dev/)
[![Build Status](https://jenkins.dangl.me/buildStatus/icon?job=GeorgDangl%2FDangl.Calculator%2Fdev)](https://jenkins.dangl.me/job/GeorgDangl/job/Dangl.Calculator/job/dev/)
[![NuGet](https://img.shields.io/nuget/v/Dangl.Calculator.svg)](https://www.nuget.org/packages/Dangl.Calculator)
[![MyGet](https://img.shields.io/myget/dangl/v/Dangl.Calculator.svg)]()

Expand Down Expand Up @@ -31,8 +31,9 @@ CI builds are available via MyGet.

## Compatibility

This project targets `netstandard2.0`, `netstandard1.1` and `net45`. Due to .Net 4.5.2 being the currently latest supported version
by Microsoft and the xUnit test suite, no tests are run for `net45` and `net451`.
This project targets `netstandard2.0`, `netstandard1.1`, `net45` and `net40`. Due to .Net 4.5.2 being the currently latest supported version
by Microsoft and the xUnit test suite, no tests are run for `net45` and `net451`.
The .NET 4.0 target is for compatibility reasons, it is not tested and requires .NET compilers for version 4.5 or newer to properly function.

## Project Configuration

Expand Down
23 changes: 9 additions & 14 deletions build/.build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,25 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RootNamespace></RootNamespace>
<IsPackable>False</IsPackable>
<NoWarn>CS0649;CS0169</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dangl.Nuke.CoberturaConverter" Version="1.3.0" />
<PackageReference Include="Nuke.Azure.KeyVault" Version="0.5.0" />
<PackageReference Include="Nuke.Common" Version="0.21.2" />
<PackageReference Include="GitVersion.CommandLine.DotNetCore" Version="5.0.0">
<PackageReference Include="Dangl.Nuke.CoberturaConverter" Version="2.0.0" />
<PackageReference Include="Nuke.Common" Version="5.0.2" />
<PackageDownload Include="GitVersion.Tool" Version="[5.1.3]" />
<PackageReference Include="Nuke.WebDocu" Version="2.0.0" />
<PackageReference Include="Nuke.GitHub" Version="2.0.0" />
<PackageReference Include="JetBrains.dotCover.CommandLineTools" Version="2020.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Nuke.DocFX" Version="0.2.0" />
<PackageReference Include="Nuke.WebDocu" Version="1.4.1" />
<PackageReference Include="Nuke.GitHub" Version="1.5.0" />
<PackageReference Include="JetBrains.dotCover.CommandLineTools" Version="2019.1.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="ReportGenerator" Version="4.2.12" />
<PackageReference Include="docfx.console" Version="2.44.0">
<PackageReference Include="ReportGenerator" Version="4.8.3" />
<PackageReference Include="docfx.console" Version="2.56.6">
<ExcludeAssets>build</ExcludeAssets>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; native; contentfiles; analyzers</IncludeAssets>
Expand Down
23 changes: 13 additions & 10 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Nuke.Azure.KeyVault;
using Nuke.CoberturaConverter;
using Nuke.CoberturaConverter;
using Nuke.Common;
using Nuke.Common.Git;
using Nuke.Common.Tooling;
using Nuke.DocFX;
using Nuke.Common.Tools.DocFX;
using Nuke.Common.Tools.DotCover;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.GitVersion;
Expand All @@ -25,14 +24,17 @@
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.IO.PathConstruction;
using static Nuke.Common.IO.XmlTasks;
using static Nuke.DocFX.DocFXTasks;
using static Nuke.Common.Tools.DocFX.DocFXTasks;
using static Nuke.Common.Tools.DotCover.DotCoverTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.ReportGenerator.ReportGeneratorTasks;
using static Nuke.GitHub.ChangeLogExtensions;
using static Nuke.GitHub.GitHubTasks;
using static Nuke.WebDocu.WebDocuTasks;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tools.AzureKeyVault.Attributes;
using Nuke.Common.Tools.AzureKeyVault;
using Nuke.Common.IO;

class Build : NukeBuild
{
Expand All @@ -53,7 +55,7 @@ class Build : NukeBuild

[Parameter] readonly string Configuration = IsLocalBuild ? "Debug" : "Release";

[GitVersion] readonly GitVersion GitVersion;
[GitVersion(Framework = "netcoreapp3.1")] readonly GitVersion GitVersion;
[GitRepository] readonly GitRepository GitRepository;

[KeyVaultSecret] readonly string DocuBaseUrl;
Expand Down Expand Up @@ -94,7 +96,7 @@ class Build : NukeBuild
DotNetBuild(x => x
.SetConfiguration(Configuration)
.EnableNoRestore()
.SetFileVersion(GitVersion.GetNormalizedFileVersion())
.SetFileVersion(GitVersion.AssemblySemFileVer)
.SetAssemblyVersion(GitVersion.AssemblySemVer)
.SetInformationalVersion(GitVersion.InformationalVersion));
});
Expand Down Expand Up @@ -131,7 +133,7 @@ class Build : NukeBuild
.SelectMany(testProject => GetTestFrameworksForProjectFile(testProject)
.Select(targetFramework => cc
.SetFramework(targetFramework)
.SetWorkingDirectory(Path.GetDirectoryName(testProject))
.SetProcessWorkingDirectory(Path.GetDirectoryName(testProject))
.SetLogger($"xunit;LogFilePath={OutputDirectory / $"{testRun++}_testresults-{targetFramework}.xml"}")))),
degreeOfParallelism: Environment.ProcessorCount);
}
Expand All @@ -148,15 +150,15 @@ class Build : NukeBuild
try
{
DotNetTest(x => x
.SetWorkingDirectory(SolutionDirectory / "test" / "Dangl.Calculator.Tests")
.SetProcessWorkingDirectory(SolutionDirectory / "test" / "Dangl.Calculator.Tests")
.SetTestAdapterPath(".")
.SetFramework("netcoreapp2.2")
.SetFramework("netcoreapp3.1")
.SetLogger($"xunit;LogFilePath={OutputDirectory / "testresults-linux.xml"}")
// See here for more information:
// https://github.com/dotnet/cli/issues/9397
// There's a bug where the 'dotnet test' process hangs for 15 minutes after
// test completion
.SetArgumentConfigurator(ac => ac.Add("-nodereuse:false")));
.SetProcessArgumentConfigurator(ac => ac.Add("-nodereuse:false")));
}
finally
{
Expand Down Expand Up @@ -211,6 +213,7 @@ class Build : NukeBuild
// This is the report that's pretty and visualized in Jenkins
ReportGenerator(c => c
.SetFramework("netcoreapp3.0")
.SetReports(OutputDirectory / "coverage.xml")
.SetTargetDirectory(OutputDirectory / "CoverageReport"));
Expand Down
2 changes: 1 addition & 1 deletion src/Dangl.Calculator/Dangl.Calculator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Copyright>(c) $([System.DateTime]::Now.Year) Georg Dangl</Copyright>
<AssemblyTitle>Dangl.Calculator</AssemblyTitle>
<Authors>Georg Dangl</Authors>
<TargetFrameworks>netstandard2.0;netstandard1.1;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard1.1;net45;net40</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Dangl.Calculator</AssemblyName>
<PackageId>Dangl.Calculator</PackageId>
Expand Down
4 changes: 2 additions & 2 deletions test/Dangl.Calculator.Tests/Dangl.Calculator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<!-- When inside VS, only the latest netcoreapp2.2 target is built, both for performance and for live unit testing -->
<TargetFrameworks Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">netcoreapp2.2;netcoreapp2.1;net461;net46;net47;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">netcoreapp2.2</TargetFrameworks>
<TargetFrameworks Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">netcoreapp3.1;netcoreapp2.1;net461;net46;net47;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">netcoreapp3.1</TargetFrameworks>
<AssemblyName>Dangl.Calculator.Tests</AssemblyName>
<PackageId>Dangl.Calculator.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down

0 comments on commit 486700e

Please sign in to comment.