Skip to content

Commit

Permalink
Allow benchmarks to be run from build.ps1.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmg committed Aug 29, 2018
1 parent 27e6ca7 commit bdea6e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Autofac.Extras.DynamicProxy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5BC3A940-88FD-4AD5-9094-E141CDFF2DBC}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
build.ps1 = build.ps1
global.json = global.json
NuGet.Config = NuGet.Config
EndProjectSection
Expand Down
11 changes: 11 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
########################
# THE BUILD!
########################

param (
[switch]$Bench = $false
)

Push-Location $PSScriptRoot
Import-Module $PSScriptRoot\Build\Autofac.Build.psd1 -Force

Expand Down Expand Up @@ -40,6 +45,12 @@ Get-DotNetProjectDirectory -RootPath $PSScriptRoot\src | Invoke-DotNetPack -Pack
Write-Message "Executing unit tests"
Get-DotNetProjectDirectory -RootPath $PSScriptRoot\test | Where-Object { $_ -inotlike "*Autofac.Extras.DynamicProxy.Test.SatelliteAssembly" } | Invoke-Test

# Benchmark
if ($Bench) {
Get-DotNetProjectDirectory -RootPath $PSScriptRoot\bench | Invoke-Test
Get-ChildItem -Path $PSScriptRoot\bench -Filter "BenchmarkDotNet.Artifacts" -Directory -Recurse | Move-Item -Destination "$PSScriptRoot\artifacts\benchmarks"
}

# Finished
Write-Message "Build finished"
Pop-Location

0 comments on commit bdea6e7

Please sign in to comment.