Skip to content

Commit

Permalink
Merge pull request #308 from petabridge/dev
Browse files Browse the repository at this point in the history
v2.0.0 Release
  • Loading branch information
Aaronontheweb committed Feb 24, 2020
2 parents 3225434 + 4313478 commit 42f6394
Show file tree
Hide file tree
Showing 145 changed files with 1,617 additions and 4,089 deletions.
273 changes: 86 additions & 187 deletions NBench.sln

Large diffs are not rendered by default.

334 changes: 3 additions & 331 deletions README.md

Large diffs are not rendered by default.

381 changes: 7 additions & 374 deletions RELEASE_NOTES.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "1e983f21-9ea5-4f21-ab99-28080225efc9",
"TenantId": "2fa36080-af12-4894-a64b-a17d8f29ec52"
},
"Service": {
"Url": "https://pb-sign.azurewebsites.net/",
"ResourceId": "https://SignService/eef8e2e7-24b1-4a3b-a73b-a84d66f9abee"
}
}
}
29 changes: 2 additions & 27 deletions benchmarks/NBench.Microbenchmarks/NBench.Microbenchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\src\common.props" />
<PropertyGroup>
<TargetFrameworks>net452;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\NBench\NBench.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.10.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="1.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="1.3.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="1.3.2" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);THREADPOOL;APPDOMAIN;SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

</Project>
8 changes: 8 additions & 0 deletions build-system/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Azure Pipelines Build Files
These `.yaml` files are used by Windows Azure DevOps Pipelines to help execute the following types of builds:

- Pull request validation on Linux (Mono / .NET Core)
- Pull request validation on Windows (.NET Framework / .NET Core)
- NuGet releases with automatic release notes posted to a Github Release repository.

**NOTE**: you will need to change some of the pipeline variables inside the `windows-release.yaml` for your specific project and you will also want to create variable groups with your signing and NuGet push information.
58 changes: 58 additions & 0 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
parameters:
name: ''
displayName: ''
vmImage: ''
scriptFileName: ''
scriptArgs: 'all'
timeoutInMinutes: 120

jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: false # whether to fetch clean each time
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true
# Linux or macOS
- task: Bash@3
displayName: Linux / OSX Build
inputs:
filePath: ${{ parameters.scriptFileName }}
arguments: ${{ parameters.scriptArgs }}
continueOnError: true
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
# Windows
- task: BatchScript@1
displayName: Windows Build
inputs:
filename: ${{ parameters.scriptFileName }}
arguments: ${{ parameters.scriptArgs }}
continueOnError: true
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx' #TestResults folder usually
testRunTitle: ${{ parameters.name }}
mergeTestResults: true
- script: 'echo 1>&2'
failOnStderr: true
displayName: 'If above is partially succeeded, then fail'
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
- task: CopyFiles@2
displayName: 'Copy Build Output'
inputs:
sourceFolder: ${{ parameters.outputDirectory }}
contents: '**\*'
targetFolder: $(Build.ArtifactStagingDirectory)
continueOnError: true # 'true' if future steps should run even if this step fails; defaults to 'false'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: ${{ parameters.artifactName }}
continueOnError: true

43 changes: 43 additions & 0 deletions build-system/pr-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Pull request validation for Windows against the `dev` and `master` branches
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
trigger:
branches:
include:
- dev
- master

pr:
autoCancel: true # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
branches:
include: [ dev, master ] # branch names which will trigger a build

name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

jobs:
- template: azure-pipeline.template.yaml
parameters:
name: 'windows_tests'
displayName: 'Windows Tests'
vmImage: 'vs2017-win2016'
scriptFileName: build.cmd
scriptArgs: RunTests
outputDirectory: 'TestResults'
artifactName: 'windows_tests-$(Build.BuildId)'
- template: azure-pipeline.template.yaml
parameters:
name: 'windows_integration'
displayName: 'Integration Tests'
vmImage: 'vs2017-win2016'
scriptFileName: build.cmd
scriptArgs: NBench
outputDirectory: 'PerfResults'
artifactName: 'integration_tests-$(Build.BuildId)'
- template: azure-pipeline.template.yaml
parameters:
name: 'nuget_pack'
displayName: 'NuGet Pack'
vmImage: 'vs2017-win2016'
scriptFileName: build.cmd
scriptArgs: Nuget
outputDirectory: 'bin/nuget'
artifactName: 'nuget-$(Build.BuildId)'
40 changes: 40 additions & 0 deletions build-system/windows-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Release task for PbLib projects
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference

pool:
vmImage: vs2017-win2016
demands: Cmd

trigger:
branches:
include:
- refs/tags/*

pr: none

variables:
- group: signingSecrets #create this group with SECRET variables `signingUsername` and `signingPassword`
- group: nugetKeys #create this group with SECRET variables `nugetKey`
- name: githubConnectionName
value: PbReleaseNotes
- name: projectName
value: NBench
- name: githubRepositoryName
value: petabridge/NBench

steps:
- task: BatchScript@1
displayName: 'FAKE Build'
inputs:
filename: build.cmd
arguments: 'nuget SignClientUser=$(signingUsername) SignClientSecret=$(signingPassword) nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'

- task: GitHubRelease@0
displayName: 'GitHub release (create)'
inputs:
gitHubConnection: $(githubConnectionName)
repositoryName: $(githubRepositoryName)
title: '$(projectName) v$(Build.SourceBranchName)'
releaseNotesFile: 'RELEASE_NOTES.md'
assets: |
bin\nuget\*.nupkg
Loading

0 comments on commit 42f6394

Please sign in to comment.