Skip to content

Commit

Permalink
- folder reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
theburningmonk committed Jan 13, 2014
1 parent afa97c8 commit 3db591a
Show file tree
Hide file tree
Showing 64 changed files with 646 additions and 339 deletions.
4 changes: 4 additions & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit.Runners" version="2.6.3" />
</packages>
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### 1.0.0 - Nov 07, 2011
* Initial release

#### 1.1.0 - Jan 13, 2014
* Full GC at the start of each test run
14 changes: 0 additions & 14 deletions SimpleSpeedTester.Example/packages.config

This file was deleted.

54 changes: 36 additions & 18 deletions SimpleSpeedTester.sln
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSpeedTester", "SimpleSpeedTester\SimpleSpeedTester.csproj", "{87B76A3E-3932-47F1-924D-C80A1AE92787}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSpeedTester.Example", "SimpleSpeedTester.Example\SimpleSpeedTester.Example.csproj", "{7ADA7026-5757-4E93-AC72-D7E69DC08433}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSpeedTester.Tests", "SimpleSpeedTester.Tests\SimpleSpeedTester.Tests.csproj", "{242130B3-5940-4207-9EF8-476C8FF2FCDA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fastJSON", "fastJSON v1.9.6\fastJSON\fastJSON.csproj", "{207E91B1-C9F8-4913-88E1-3549EF5F3273}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{E8ED0C5C-C3B1-4A75-B4F6-7933657B347F}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{7A66622C-5F9A-45FE-A81E-8519DAC031FD}"
ProjectSection(SolutionItems) = preProject
build.fsx = build.fsx
RELEASE_NOTES.md = RELEASE_NOTES.md
nuget\SimpleSpeedTester.nuspec = nuget\SimpleSpeedTester.nuspec
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSpeedTester", "src\SimpleSpeedTester\SimpleSpeedTester.csproj", "{87B76A3E-3932-47F1-924D-C80A1AE92787}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2ECDAF10-D790-4136-BB0E-A1DBD995D5A8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSpeedTester.Tests", "tests\SimpleSpeedTester.Tests\SimpleSpeedTester.Tests.csproj", "{242130B3-5940-4207-9EF8-476C8FF2FCDA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{F891B8A3-232F-4736-9CF7-1C1D2BDCB6F8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSpeedTester.Example", "examples\SimpleSpeedTester.Example\SimpleSpeedTester.Example.csproj", "{7ADA7026-5757-4E93-AC72-D7E69DC08433}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{8FCC7912-0E7B-4520-9BAA-30443A57DD61}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fastJSON", "lib\fastJSON v1.9.6\fastJSON\fastJSON.csproj", "{207E91B1-C9F8-4913-88E1-3549EF5F3273}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -36,16 +49,6 @@ Global
{87B76A3E-3932-47F1-924D-C80A1AE92787}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{87B76A3E-3932-47F1-924D-C80A1AE92787}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{87B76A3E-3932-47F1-924D-C80A1AE92787}.Release|x86.ActiveCfg = Release|Any CPU
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|Any CPU.ActiveCfg = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|Mixed Platforms.Build.0 = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|x86.ActiveCfg = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|x86.Build.0 = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|Any CPU.ActiveCfg = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|Mixed Platforms.ActiveCfg = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|Mixed Platforms.Build.0 = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|x86.ActiveCfg = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|x86.Build.0 = Release|x86
{242130B3-5940-4207-9EF8-476C8FF2FCDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{242130B3-5940-4207-9EF8-476C8FF2FCDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{242130B3-5940-4207-9EF8-476C8FF2FCDA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand All @@ -56,6 +59,16 @@ Global
{242130B3-5940-4207-9EF8-476C8FF2FCDA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{242130B3-5940-4207-9EF8-476C8FF2FCDA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{242130B3-5940-4207-9EF8-476C8FF2FCDA}.Release|x86.ActiveCfg = Release|Any CPU
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|Any CPU.ActiveCfg = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|Mixed Platforms.Build.0 = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|x86.ActiveCfg = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Debug|x86.Build.0 = Debug|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|Any CPU.ActiveCfg = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|Mixed Platforms.ActiveCfg = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|Mixed Platforms.Build.0 = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|x86.ActiveCfg = Release|x86
{7ADA7026-5757-4E93-AC72-D7E69DC08433}.Release|x86.Build.0 = Release|x86
{207E91B1-C9F8-4913-88E1-3549EF5F3273}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{207E91B1-C9F8-4913-88E1-3549EF5F3273}.Debug|Any CPU.Build.0 = Debug|Any CPU
{207E91B1-C9F8-4913-88E1-3549EF5F3273}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand All @@ -70,4 +83,9 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{242130B3-5940-4207-9EF8-476C8FF2FCDA} = {2ECDAF10-D790-4136-BB0E-A1DBD995D5A8}
{7ADA7026-5757-4E93-AC72-D7E69DC08433} = {F891B8A3-232F-4736-9CF7-1C1D2BDCB6F8}
{207E91B1-C9F8-4913-88E1-3549EF5F3273} = {8FCC7912-0E7B-4520-9BAA-30443A57DD61}
EndGlobalSection
EndGlobal
7 changes: 7 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off
cls
if not exist packages\FAKE\tools\Fake.exe (
.nuget\nuget.exe install FAKE -OutputDirectory packages -ExcludeVersion
)
packages\FAKE\tools\FAKE.exe build.fsx All
pause
200 changes: 200 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------

#r @"packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake.Git
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
open System

let buildDir = "build/"
let testDir = "test/"
let tempDir = "temp/"

// --------------------------------------------------------------------------------------
// START TODO: Provide project-specific details below
// --------------------------------------------------------------------------------------

// Information about the project are used
// - for version and project name in generated AssemblyInfo file
// - by the generated NuGet package
// - to run tests and to publish documentation on GitHub gh-pages
// - for documentation, you also need to edit info in "docs/tools/generate.fsx"

// The name of the project
// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src')
let project = "SimpleSpeedTester"

// Short summary of the project
// (used as description in AssemblyInfo and as a short summary for NuGet package)
let summary = "SimpleSpeedTester is a simple, easy to use framework that helps you speed test your .Net code by taking care of some of the orchestration for you."

// Longer description of the project
// (used as a description for NuGet package; line breaks are automatically cleaned up)
let description = """ """
// List of author names (for NuGet package)
let authors = [ "Yan Cui" ]
// Tags for your project (for NuGet package)
let tags = "C# csharp testing benchmark performance"

// File system information
// (<solutionFile>.sln is built during the building process)
let projectFile = "SimpleSpeedTester.csproj"
let testProjectFile = "SimpleSpeedTester.Tests.csproj"
// Pattern specifying assemblies to be tested using NUnit
let testAssemblies = ["tests/*/bin/*/*Tests*.dll"]

// Git configuration (used for publishing documentation in gh-pages branch)
// The profile where the project is posted
let gitHome = "https://github.com/theburningmonk"
// The name of the project on GitHub
let gitName = "SimpleSpeedTester"

// --------------------------------------------------------------------------------------
// END TODO: The rest of the file includes standard build steps
// --------------------------------------------------------------------------------------

// Read additional information from the release notes document
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let release = parseReleaseNotes (IO.File.ReadAllLines "RELEASE_NOTES.md")

// Generate assembly info files with the right version & up-to-date information
Target "AssemblyInfo" (fun _ ->
let fileName = "src/" + project + "/Properties/AssemblyInfo.cs"
CreateFSharpAssemblyInfo fileName
[ Attribute.Title project
Attribute.Product project
Attribute.Description summary
Attribute.Version release.AssemblyVersion
Attribute.FileVersion release.AssemblyVersion ]
)

// --------------------------------------------------------------------------------------
// Clean build results & restore NuGet packages

Target "RestorePackages" RestorePackages

Target "Clean" (fun _ ->
CleanDirs [ buildDir; testDir; tempDir ]
)

Target "CleanDocs" (fun _ ->
CleanDirs [ "docs/output" ]
)

// --------------------------------------------------------------------------------------
// Build library & test project

let files includes =
{ BaseDirectory = __SOURCE_DIRECTORY__
Includes = includes
Excludes = [] }

Target "Build" (fun _ ->
files [ "src/SimpleSpeedTester/" + projectFile ]
|> MSBuildRelease buildDir "Rebuild"
|> ignore
)

// --------------------------------------------------------------------------------------
// Build library & test project

Target "BuildTests" (fun _ ->
files [ "tests/SimpleSpeedTester.Tests/" + testProjectFile ]
|> MSBuildRelease testDir "Rebuild"
|> ignore
)

// --------------------------------------------------------------------------------------
// Run the unit tests using test runner & kill test runner when complete

Target "RunTests" (fun _ ->
ActivateFinalTarget "CloseTestRunner"

{ BaseDirectory = __SOURCE_DIRECTORY__
Includes = testAssemblies
Excludes = [] }
|> NUnit (fun p ->
{ p with
DisableShadowCopy = true
TimeOut = TimeSpan.FromMinutes 20.
OutputFile = "TestResults.xml" })
)

FinalTarget "CloseTestRunner" (fun _ ->
ProcessHelper.killProcess "nunit-agent.exe"
)

// --------------------------------------------------------------------------------------
// Build a NuGet package

Target "NuGet" (fun _ ->
// Format the description to fit on a single line (remove \r\n and double-spaces)
let description = description.Replace("\r", "")
.Replace("\n", "")
.Replace(" ", " ")

NuGet (fun p ->
{ p with
Authors = authors
Project = project
Summary = summary
Description = description
Version = release.NugetVersion
ReleaseNotes = String.Join(Environment.NewLine, release.Notes)
Tags = tags
OutputPath = "nuget"
AccessKey = getBuildParamOrDefault "nugetkey" ""
Publish = hasBuildParam "nugetkey"
Dependencies = [] })
("nuget/" + project + ".nuspec")
)

// --------------------------------------------------------------------------------------
// Generate the documentation

Target "GenerateDocs" (fun _ ->
executeFSIWithArgs "docs/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore
)

// --------------------------------------------------------------------------------------
// Release Scripts

Target "ReleaseDocs" (fun _ ->
let ghPages = "gh-pages"
let ghPagesLocal = "temp/gh-pages"
Repository.clone "temp" (gitHome + "/" + gitName + ".git") ghPages
Branches.checkoutBranch ghPagesLocal ghPages
fullclean ghPagesLocal
CopyRecursive "docs/output" ghPagesLocal true |> printfn "%A"
CommandHelper.runSimpleGitCommand ghPagesLocal "add ." |> printfn "%s"
let cmd = sprintf """commit -a -m "Update generated documentation for version %s""" release.NugetVersion
CommandHelper.runSimpleGitCommand ghPagesLocal cmd |> printfn "%s"
Branches.push ghPagesLocal
)

Target "Release" DoNothing

// --------------------------------------------------------------------------------------
// Run all targets by default. Invoke 'build <Target>' to override

Target "All" DoNothing

"Clean"
==> "RestorePackages"
==> "AssemblyInfo"
==> "Build"
==> "BuildTests"
==> "RunTests"
==> "All"

"All"
// ==> "CleanDocs"
// ==> "GenerateDocs"
// ==> "ReleaseDocs"
==> "NuGet"
==> "Release"

RunTargetOrDefault "All"
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
if [ ! -f packages/FAKE/tools/Fake.exe ]; then
mono .NuGet/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
fi
mono packages/FAKE/tools/FAKE.exe build.fsx $@
Loading

0 comments on commit 3db591a

Please sign in to comment.