Skip to content
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

Configuration for Windows and netcore Preview4 fsproj #4

Merged
merged 10 commits into from
Dec 9, 2016
Merged
Show file tree
Hide file tree
Changes from 9 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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ packages/*
.nuget/*.exe
*.sln.ide
project.lock.json
paket-files/
BenchmarkDotNet.Artifacts/
paket-files/
BenchmarkDotNet.Artifacts/
/.fake/
/.vs/
21 changes: 21 additions & 0 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Mark that this target file has been loaded. -->
<IsPaketRestoreTargetsFileLoaded>true</IsPaketRestoreTargetsFileLoaded>
</PropertyGroup>

<UsingTask TaskName="Paket.Build.Tasks.PaketRestoreTask" AssemblyFile="PaketRestoreTask.dll" />

<Target Name="PaketRestore" BeforeTargets="_GenerateRestoreGraphWalkPerFramework" >
<Exec Command="$(MSBuildThisFileDirectory)\paket.exe restore --project $(MSBuildProjectFullPath)" />

<!-- Write out package references for NETCore -->
<PaketRestoreTask
ProjectUniqueName="$(MSBuildProjectFullPath)"
PackageReferences="@(PackageReference)"
TargetFrameworks="$(TargetFramework)">
<Output TaskParameter="NewPackageReferences" ItemName="PackageReference" />
<Output TaskParameter="AlternativeConfigFile" ItemName="RestoreConfigFile" />
</PaketRestoreTask>
</Target>
</Project>
110 changes: 110 additions & 0 deletions .paket/PaketRestoreTask.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v1.0",
"signature": "4bc084c4aa235e3b5760a404fab9f87822632c58"
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v1.0": {
"paketrestoretask/1.0.0": {
"dependencies": {
"Microsoft.Build.Framework": "14.3.0-prerelease02",
"Microsoft.Build.Tasks.Core": "14.3.0-prerelease02",
"Microsoft.Build.Utilities.Core": "14.3.0-prerelease02",
"Microsoft.NET.Sdk": "1.0.0-alpha-20161019-1"
},
"runtime": {
"PaketRestoreTask.dll": {}
}
},
"microsoft.build.framework/14.3.0-prerelease02": {},
"microsoft.build.tasks.core/14.3.0-prerelease02": {
"dependencies": {
"Microsoft.Build.Framework": "14.3.0-prerelease02",
"Microsoft.Build.Utilities.Core": "14.3.0-prerelease02"
}
},
"microsoft.build.utilities.core/14.3.0-prerelease02": {
"dependencies": {
"Microsoft.Build.Framework": "14.3.0-prerelease02",
"System.Collections.Specialized": "4.0.1"
}
},
"microsoft.net.sdk/1.0.0-alpha-20161019-1": {
"dependencies": {
"NuGet.Build.Tasks.Pack": "3.6.0-rc-1984"
}
},
"nuget.build.tasks.pack/3.6.0-rc-1984": {},
"system.collections.nongeneric/4.0.1": {
"runtime": {
"lib/netstandard1.3/System.Collections.NonGeneric.dll": {}
}
},
"system.collections.specialized/4.0.1": {
"dependencies": {
"System.Collections.NonGeneric": "4.0.1"
},
"runtime": {
"lib/netstandard1.3/System.Collections.Specialized.dll": {}
}
}
}
},
"libraries": {
"paketrestoretask/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"microsoft.build.framework/14.3.0-prerelease02": {
"type": "package",
"serviceable": true,
"sha512": "sha512-CfdwrqSEDw0AwKkpwtX/TCBzanschsOrbVezh8MIWw0cqMiZw9qf84+Zo0seT1J9KTLyZvZZ6g58wBiENaaE7w==",
"path": "microsoft.build.framework/14.3.0-prerelease02",
"hashPath": "microsoft.build.framework.14.3.0-prerelease02.nupkg.sha512"
},
"microsoft.build.tasks.core/14.3.0-prerelease02": {
"type": "package",
"serviceable": true,
"sha512": "sha512-YTWNhYpTIuCC/2HCNPcSD+yOtBIvlf2jDC+QNUnRKRAgslg913euBVx36TyZ00x1gJ6L35EobOOH/YkMqLarpg==",
"path": "microsoft.build.tasks.core/14.3.0-prerelease02",
"hashPath": "microsoft.build.tasks.core.14.3.0-prerelease02.nupkg.sha512"
},
"microsoft.build.utilities.core/14.3.0-prerelease02": {
"type": "package",
"serviceable": true,
"sha512": "sha512-A2XERwPRwrYTGjkOwW19p6+0M6euhJPIBxT3741bUACY3N3P22IOQdz1VygThLpovl/tU2jGCBzCPiwWPCqCdA==",
"path": "microsoft.build.utilities.core/14.3.0-prerelease02",
"hashPath": "microsoft.build.utilities.core.14.3.0-prerelease02.nupkg.sha512"
},
"microsoft.net.sdk/1.0.0-alpha-20161019-1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-RozsUJziqKro+8bRU6RxiDXD4/rldrBr57Vjl1/acH9u8rxdQqueOZl+lrrtYHSJ7zO3C5aj8oSfB24CWvL3eA==",
"path": "microsoft.net.sdk/1.0.0-alpha-20161019-1",
"hashPath": "microsoft.net.sdk.1.0.0-alpha-20161019-1.nupkg.sha512"
},
"nuget.build.tasks.pack/3.6.0-rc-1984": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gEF8smuszJ7jFWskbgrt5ASK+67ZDNvmxh5y0xH0P+4ysAKdnAw8WGH6l26rj+G/Bh0TFC9+UQqgpnU7Oi+pBQ==",
"path": "nuget.build.tasks.pack/3.6.0-rc-1984",
"hashPath": "nuget.build.tasks.pack.3.6.0-rc-1984.nupkg.sha512"
},
"system.collections.nongeneric/4.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-hMxFT2RhhlffyCdKLDXjx8WEC5JfCvNozAZxCablAuFRH74SCV4AgzE8yJCh/73bFnEoZgJ9MJmkjQ0dJmnKqA==",
"path": "system.collections.nongeneric/4.0.1",
"hashPath": "system.collections.nongeneric.4.0.1.nupkg.sha512"
},
"system.collections.specialized/4.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/HKQyVP0yH1I0YtK7KJL/28snxHNH/bi+0lgk/+MbURF6ULhAE31MDI+NZDerNWu264YbxklXCCygISgm+HMug==",
"path": "system.collections.specialized/4.0.1",
"hashPath": "system.collections.specialized.4.0.1.nupkg.sha512"
}
}
}
Binary file added .paket/PaketRestoreTask.dll
Binary file not shown.
Binary file modified .paket/paket.bootstrapper.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions .paket/paket.bootstrapper.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Prerelease" value="True"/>
</appSettings>
</configuration>
43 changes: 43 additions & 0 deletions .paket/paket.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages>
<!-- Download Paket.exe if it does not already exist -->
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket>
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath>
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
</PropertyGroup>
<PropertyGroup>
<!-- Paket command -->
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT' AND Exists('$(PaketBootStrapperExePath)')">"$(PaketBootStrapperExePath)" $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' AND Exists('$(PaketBootStrapperExePath)')">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath) $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<!-- Commands -->
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="!Exists('$(PaketReferences)')">$(MSBuildStartupDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences>
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand>
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate paket.exe -->
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" />
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" />
</Target>
<Target Name="DownloadPaket">
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true"
Condition=" '$(DownloadPaket)' == 'true' AND '$(DownloadPaketCommand)' != '' AND !Exists('$(PaketExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" ContinueOnError="true" />
</Target>
</Project>
14 changes: 14 additions & 0 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Setup


1. **EditorConfig**
If you haven't already, install the EditorConfig extension to prevent any conflicts between your default F# formatting conventions and the ones used by this project.

* Visual Studio - [EditorConfig VS Extension](https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig)
* vscode - [EditorConfig VScode Extension](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)


2. Install the latest version of the [**netcore SDK**](https://github.com/dotnet/cli#installers-and-binaries)



29 changes: 15 additions & 14 deletions Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ open BenchmarkDotNet.Loggers
open BenchmarkDotNet.Order
open BenchmarkDotNet.Validators
open Expecto
open Expecto.Logging
open Expecto.Logging.Message
//open Expecto.Logging
//open Expecto.Logging.Message
open Logary.Facade

[<AutoOpen; CompilationRepresentationAttribute(CompilationRepresentationFlags.ModuleSuffix)>]
module BenchmarkDotNet =
Expand All @@ -24,27 +25,27 @@ module BenchmarkDotNet =
type SetupAttribute = BenchmarkDotNet.Attributes.SetupAttribute

type BenchmarkConfig =
{ columns : IColumn list
{ columns : IColumnProvider list
exporters : IExporter list
loggers : ILogger list
diagnosers : IDiagnoser list
analysers : IAnalyser list
jobs : IJob list
jobs : Job list
validators : IValidator list
orderProvider : IOrderProvider
unionRule : ConfigUnionRule
keepFiles : bool }

interface IConfig with
member x.GetColumns() : IColumn seq = upcast x.columns
member x.GetExporters() : seq<IExporter> = upcast x.exporters
member x.GetLoggers() : seq<ILogger> = upcast x.loggers
member x.GetDiagnosers() : seq<IDiagnoser> = upcast x.diagnosers
member x.GetAnalysers() : seq<IAnalyser> = upcast x.analysers
member x.GetJobs() : seq<IJob> = upcast x.jobs
member x.GetValidators() : seq<IValidator> = upcast x.validators
member x.GetOrderProvider() : IOrderProvider = x.orderProvider
member x.UnionRule : ConfigUnionRule = x.unionRule
member x.GetColumnProviders() = x.columns :> IColumnProvider seq
member x.GetExporters() = x.exporters :> seq<IExporter>
member x.GetLoggers() = x.loggers :> seq<ILogger>
member x.GetDiagnosers() = x.diagnosers :> seq<IDiagnoser>
member x.GetAnalysers() = x.analysers :> seq<IAnalyser>
member x.GetJobs() = x.jobs :> seq<Job>
member x.GetValidators() = x.validators :> seq<IValidator>
member x.GetOrderProvider() = x.orderProvider : IOrderProvider
member x.UnionRule = x.unionRule : ConfigUnionRule
/// Determines if all auto-generated files should be kept or removed after running benchmarks
member x.KeepBenchmarkFiles = x.keepFiles

Expand All @@ -61,7 +62,7 @@ module BenchmarkDotNet =

let benchmarkConfig =
let def = DefaultConfig.Instance
{ columns = def.GetColumns() |> List.ofSeq
{ columns = def.GetColumnProviders() |> List.ofSeq
exporters = def.GetExporters() |> List.ofSeq
loggers = [ synchronisedLogger ]
diagnosers = def.GetDiagnosers() |> List.ofSeq
Expand Down
Loading