Skip to content

Commit

Permalink
.net7 upgrade (#31)
Browse files Browse the repository at this point in the history
* upgrade to .net 7

* upgrade test files

* sca warnings

* upgrade stryker

* Bump up minor build number
  • Loading branch information
tknightnd authored Sep 26, 2023
1 parent 985354c commit 14ef1ab
Show file tree
Hide file tree
Showing 19 changed files with 1,904 additions and 2,255 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-stryker": {
"version": "3.6.1",
"version": "3.10.0",
"commands": [
"dotnet-stryker"
]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/actions_buildtestpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [ main ]

env:
build-version-number: 0.2.${{ github.run_number }}
build-version-number: 0.3.${{ github.run_number }}

jobs:
Build:
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Restore tools
run: dotnet tool restore
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "7.0.x"

- name: dotnet SCA
run: |
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Restore tools
run: dotnet tool restore
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Download package
uses: actions/download-artifact@v3
Expand Down
194 changes: 0 additions & 194 deletions FakeBuild.fsx

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,23 @@ BDNA aggregates and analyses [BenchmarkDotNet](https://benchmarkdotnet.org/) res

## Installation

To install BDNA, you'll need the [.NET 6 SDK or runtime](https://dotnet.microsoft.com/download/dotnet/6.0). BDNA can be downloaded and installed from [Nuget](https://www.nuget.org/packages/bdna/).
To install BDNA, you'll need the [.NET 7 SDK or runtime](https://dotnet.microsoft.com/download/dotnet/7.0). BDNA can be downloaded and installed from [Nuget](https://www.nuget.org/packages/bdna/).


---


## Building locally

To build, you'll need the [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0).
The local build scripts are a [FAKE build script](FakeBuild.fsx) and a [Powershell bootstrapper](build.ps1).
To build, you'll need the [.NET 7 SDK](https://dotnet.microsoft.com/download/dotnet/7.0).

By default, the build script will restore, build, run tests and package:

```powershell
.\build.ps1
```

If you need to build up to a [certain target](FakeBuild.fsx) just give the target's name:
If you need to build up to a [certain target](build.fs) just give the target's name:

```powershell
.\build.ps1 "Unit Tests"
Expand Down
12 changes: 9 additions & 3 deletions benchmarkdotnetanalyser.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
# Visual Studio Version 17
VisualStudioVersion = 17.7.34003.232
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{B8167426-C3AA-49BB-8B3A-371A97800CD6}"
EndProject
Expand All @@ -23,7 +23,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{FBD4B9A3-76D2-4237-BDF1-916CD9085D83}"
ProjectSection(SolutionItems) = preProject
build.ps1 = build.ps1
FakeBuild.fsx = FakeBuild.fsx
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchmarkDotNetAnalyser.Tests.Unit", "test\BenchmarkDotNetAnalyser.Tests.Unit\BenchmarkDotNetAnalyser.Tests.Unit.csproj", "{423AEEF3-7F23-410E-AFA2-75DAD14036F3}"
Expand All @@ -42,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchmarkDotNetAnalyser.Sam
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchmarkDotNetAnalyser.Tests.Integration", "test\BenchmarkDotNetAnalyser.Tests.Integration\BenchmarkDotNetAnalyser.Tests.Integration.csproj", "{BB5D99A6-6283-47BE-B004-2AA13DD2869C}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "build", "build.fsproj", "{6AB2D9FC-C297-4E74-BA60-4CF687558367}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -64,6 +65,10 @@ Global
{BB5D99A6-6283-47BE-B004-2AA13DD2869C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB5D99A6-6283-47BE-B004-2AA13DD2869C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB5D99A6-6283-47BE-B004-2AA13DD2869C}.Release|Any CPU.Build.0 = Release|Any CPU
{6AB2D9FC-C297-4E74-BA60-4CF687558367}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AB2D9FC-C297-4E74-BA60-4CF687558367}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AB2D9FC-C297-4E74-BA60-4CF687558367}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AB2D9FC-C297-4E74-BA60-4CF687558367}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -73,6 +78,7 @@ Global
{1B0573B7-E6CD-4318-A9B0-F4CCB67A9818} = {B8167426-C3AA-49BB-8B3A-371A97800CD6}
{6F8331FF-46E9-4DFE-9666-6819EF25342C} = {3F496CEB-C6A9-4861-A44B-A737DE4F76EA}
{BB5D99A6-6283-47BE-B004-2AA13DD2869C} = {3F496CEB-C6A9-4861-A44B-A737DE4F76EA}
{6AB2D9FC-C297-4E74-BA60-4CF687558367} = {FBD4B9A3-76D2-4237-BDF1-916CD9085D83}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {368CCD8F-9A9E-400A-8CD2-044766E97284}
Expand Down
9 changes: 2 additions & 7 deletions build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let publishDir = "publish"
let unitTestDir = "test/BenchmarkDotNetAnalyser.Tests.Unit"
let integrationTestDir = "test/BenchmarkDotNetAnalyser.Tests.Integration"
let integrationTestResultsDir = "BenchmarkDotNetResults"
let sampleBenchmarksDir = "test/BenchmarkDotNetAnalyser.SampleBenchmarks/bin/Release/net6.0"
let sampleBenchmarksDir = "test/BenchmarkDotNetAnalyser.SampleBenchmarks/bin/Release/net7.0"
let sampleBenchmarksResults = "BenchmarkDotNet.Artifacts/results"
let sampleBenchmarksResultsDir = combine sampleBenchmarksDir sampleBenchmarksResults

Expand All @@ -40,7 +40,7 @@ let versionSuffix = match Fake.BuildServer.GitHubActions.Environment.Ref with
| "refs/heads/main" -> ""
| _ -> "-preview"

let version = sprintf "0.2.%s%s" runNumber versionSuffix
let version = sprintf "0.3.%s%s" runNumber versionSuffix
let infoVersion = match commitSha with
| null -> version
| sha -> sprintf "%s.%s" version sha
Expand Down Expand Up @@ -85,11 +85,6 @@ let publishOptions(runtime: string)(opts: DotNet.PublishOptions)=
}

let initTargets() =
(*
BuildServer.install [
GitHubActions.Installer
]
*)
// Declare build targets
Target.create "Clean" (fun _ ->
Fake.IO.Directory.delete publishDir
Expand Down
5 changes: 4 additions & 1 deletion build.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="build.fs" />
Expand All @@ -12,6 +12,9 @@
<PackageReference Include="Fake.DotNet.Cli" Version="6.0.0" />
<PackageReference Include="Fake.DotNet.MSBuild" Version="6.0.0" />
<PackageReference Include="Fake.IO.FileSystem" Version="6.0.0" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.858" />
<PackageReference Include="NuGet.Common" Version="6.7.0" />
<PackageReference Include="NuGet.Protocol" Version="6.7.0" />
</ItemGroup>

</Project>
Loading

0 comments on commit 14ef1ab

Please sign in to comment.